+2022-11-16 Tobias Burnus <tobias@codesourcery.com>
+
+ Backported from master:
+ 2022-11-16 Tobias Burnus <tobias@codesourcery.com>
+
+ * config/nvptx/mkoffload.cc (process): Recognize '$nohost$...'
+ besides tailing '$nohost' as being for reverse offload.
+
2022-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
* config/gcn/gcn.cc (gcn_expand_builtin_1): Expand first argument
Alternatively, besides searching for 'BEGIN FUNCTION DECL',
checking for '.visible .entry ' + id->ptx_name would be
required. */
- if (!endswith (id->ptx_name, "$nohost"))
+ if (!endswith (id->ptx_name, "$nohost")
+ && !strstr (id->ptx_name, "$nohost$"))
continue;
fprintf (out, "\t\".extern ");
const char *p = input + file_idx[fidx];
"$offload_func_table[] = {");
for (comma = "", id = func_ids; id; comma = ",", id = id->next)
fprintf (out, "%s\"\n\t\t\"%s", comma,
- endswith (id->ptx_name, "$nohost") ? id->ptx_name : "0");
+ (endswith (id->ptx_name, "$nohost")
+ || strstr (id->ptx_name, "$nohost$")) ? id->ptx_name : "0");
fprintf (out, "};\\n\";\n\n");
}