diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2015-08-24 17:10:06 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2015-08-24 17:10:06 +0000 |
commit | 2a21ff193a35df1cd72089f5c2a044557abded28 (patch) | |
tree | 139836bcec017a86c8257b2582f253251c7abb45 /gcc | |
parent | 5cdf54b7654d7245f3f683d352184e6bd353063a (diff) | |
download | gcc-2a21ff193a35df1cd72089f5c2a044557abded28.zip gcc-2a21ff193a35df1cd72089f5c2a044557abded28.tar.gz gcc-2a21ff193a35df1cd72089f5c2a044557abded28.tar.bz2 |
libgomp.map: Add 4.0.2 version.
libgomp/
* libgomp.map: Add 4.0.2 version.
* target.c (offload_image_descr): Add version field.
(gomp_load_image_to_device): Add version argument. Adjust plugin
call. Improve load mismatch diagnostic.
(gomp_unload_image_from_device): Add version argument. Adjust plugin
call.
(GOMP_offload_regster): Make stub function, move bulk to ...
(GOMP_offload_register_ver): ... here. Process version argument.
(GOMP_offload_unregister): Make stub function, move bulk to ...
(GOMP_offload_unregister_ver): ... here. Process version argument.
(gomp_init_device): Process version field.
(gomp_unload_device): Process version field.
(gomp_load_plugin_for_device): Reimplement DLSYM & DLSYM_OPT
macros. Check plugin version.
* libgomp.h (gomp_device_descr): Add version function field. Adjust
loader and unloader types.
* oacc-host.c: Include gomp-constants.h.
(host_version): New.
(host_load_image, host_unload_image): Adjust.
(host_dispatch): Add host_version.
* plugin/plugin-nvptx.c: Include gomp-constants.h.
(GOMP_OFFLOAD_version): New.
(GOMP_OFFLOAD_load_image): Add version arg and check it.
(GOMP_OFFLOAD_unload_image): Likewise.
* plugin/plugin-host.c: Include gomp-constants.h.
(GOMP_OFFLOAD_version): New.
(GOMP_OFFLOAD_load_image): Add version arg.
(GOMP_OFFLOAD_unload_image): Likewise.
liboffloadmic/
* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_version): New.
(GOMP_OFFLOAD_load_image): Add version arg and check it.
(GOMP_OFFLOAD_unload_image): Likewise.
include/
* gomp-constants.h (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX,
GOMP_VERSION_INTEL_MIC): New.
(GOMP_VERSION_PACK, GOMP_VERSION_LIB, GOMP_VERSION_DEV): New.
gcc/
* config/nvptx/mkoffload.c (process): Replace
GOMP_offload_{,un}register with GOMP_offload_{,un}register_ver.
From-SVN: r227137
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/nvptx/mkoffload.c | 24 |
2 files changed, 19 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1bac366..6ed8dea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-24 Nathan Sidwell <nathan@codesourcery.com> + + * config/nvptx/mkoffload.c (process): Replace + GOMP_offload_{,un}register with GOMP_offload_{,un}register_ver. + 2015-08-24 H.J. Lu <hongjiu.lu@intel.com> PR target/67329 diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index 1e154c8..ba0454e 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -881,10 +881,10 @@ process (FILE *in, FILE *out) "extern \"C\" {\n" "#endif\n"); - fprintf (out, "extern void GOMP_offload_register" - " (const void *, int, const void *);\n"); - fprintf (out, "extern void GOMP_offload_unregister" - " (const void *, int, const void *);\n"); + fprintf (out, "extern void GOMP_offload_register_ver" + " (unsigned, const void *, int, const void *);\n"); + fprintf (out, "extern void GOMP_offload_unregister_ver" + " (unsigned, const void *, int, const void *);\n"); fprintf (out, "#ifdef __cplusplus\n" "}\n" @@ -894,15 +894,19 @@ process (FILE *in, FILE *out) fprintf (out, "static __attribute__((constructor)) void init (void)\n" "{\n" - " GOMP_offload_register (__OFFLOAD_TABLE__, %d/*NVIDIA_PTX*/,\n" - " &target_data);\n" - "};\n", GOMP_DEVICE_NVIDIA_PTX); + " GOMP_offload_register_ver (%#x, __OFFLOAD_TABLE__," + "%d/*NVIDIA_PTX*/, &target_data);\n" + "};\n", + GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX), + GOMP_DEVICE_NVIDIA_PTX); fprintf (out, "static __attribute__((destructor)) void fini (void)\n" "{\n" - " GOMP_offload_unregister (__OFFLOAD_TABLE__, %d/*NVIDIA_PTX*/,\n" - " &target_data);\n" - "};\n", GOMP_DEVICE_NVIDIA_PTX); + " GOMP_offload_unregister_ver (%#x, __OFFLOAD_TABLE__," + "%d/*NVIDIA_PTX*/, &target_data);\n" + "};\n", + GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX), + GOMP_DEVICE_NVIDIA_PTX); } static void |