Commit 9584e638 by Thomas Schwinge Committed by Thomas Schwinge

nvptx mkoffload: __OPENMP_TARGET__ -> __OFFLOAD_TABLE__.

	gcc/
	* config/nvptx/mkoffload.c (process): Refer to __OFFLOAD_TABLE__
	instead of __OPENMP_TARGET__.

From-SVN: r220620
parent e6f229ca
2015-02-11 Thomas Schwinge <thomas@codesourcery.com>
* config/nvptx/mkoffload.c (process): Refer to __OFFLOAD_TABLE__
instead of __OPENMP_TARGET__.
* config/nvptx/mkoffload.c: Include "gomp-constants.h".
(process): Use its GOMP_DEVICE_NVIDIA_PTX instead of (wrongly)
hard-coding PTX_ID.
......
......@@ -791,9 +791,9 @@ process (FILE *in, FILE *out)
fprintf (out, "extern void GOMP_offload_register (const void *, int, void *);\n");
fprintf (out, "extern void *__OPENMP_TARGET__[];\n\n");
fprintf (out, "extern void *__OFFLOAD_TABLE__[];\n\n");
fprintf (out, "static __attribute__((constructor)) void init (void)\n{\n");
fprintf (out, " GOMP_offload_register (__OPENMP_TARGET__, %d,\n",
fprintf (out, " GOMP_offload_register (__OFFLOAD_TABLE__, %d,\n",
GOMP_DEVICE_NVIDIA_PTX);
fprintf (out, " &target_data);\n");
fprintf (out, "};\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment