Kwok Cheung Yeung
af9bd92015
[amdgcn] Remove dependency on stdint.h in libgcc
...
2020-01-10 Kwok Cheung Yeung <kcy@codesourcery.com>
libgcc/
* config/gcn/atomic.c: Remove include of stdint.h.
(__sync_val_compare_and_swap_##SIZE): Replace uintptr_t with
__UINTPTR_TYPE__.
From-SVN: r280152
2020-01-10 23:19:41 +00:00
Kwok Cheung Yeung
d6491d1567
[amdgcn] Add support for sub-word sync_compare_and_swap operations
...
2020-01-09 Kwok Cheung Yeung <kcy@codesourcery.com>
libgcc/
* config/gcn/atomic.c: New.
* config/gcn/t-amdgcn (LIB2ADD): Add atomic.c.
From-SVN: r280055
2020-01-09 15:35:14 +00:00
Jakub Jelinek
8d9254fc8a
Update copyright years.
...
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Andrew Stubbs
52a47d2856
Stub implementation of unwinding for AMD GCN.
...
2019-06-25 Andrew Stubbs <ams@codesourcery.com>
libgcc/
* config/gcn/t-amdgcn (LIB2ADD): Add unwind-gcn.c.
* config/gcn/unwind-gcn.c: New file.
From-SVN: r272648
2019-06-25 11:41:33 +00:00
Kwok Cheung Yeung
76d4633107
Create GCN-specific gthreads
...
2019-06-25 Kwok Cheung Yeung <kcy@codesourcery.com>
Andrew Stubbs <ams@codesourcery.com>
gcc/
* config.gcc (thread_file): Set to gcn for AMD GCN.
* config/gcn/gcn.c (gcn_emutls_var_init): New function.
(TARGET_EMUTLS_VAR_INIT): New hook.
config/
* gthr.m4 (GCC_AC_THREAD_HEADER): Add case for gcn.
libgcc/
* configure: Regenerate.
* config/gcn/gthr-gcn.h: New.
Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>
From-SVN: r272647
2019-06-25 11:41:29 +00:00
Kwok Cheung Yeung
7039cebfa8
Add support for constructors and destuctors on GCN
...
2019-05-22 Kwok Cheung Yeung <kcy@codesourcery.com>
Andrew Stubbs <amd@codesourcery.com>
gcc/
* config.gcc (gcc_cv_initfini_array): Set for AMD GCN.
* config/gcn/gcn-run.c (init_array_kernel, fini_array_kernel): New.
(kernel): Rename to...
(main_kernel): ... this.
(load_image): Load _init_array and _fini_array kernels.
(run): Add argument for kernel to run.
(main): Run init_array_kernel before main_kernel, and
fini_array_kernel after.
* config/gcn/gcn.c (gcn_handle_amdgpu_hsa_kernel_attribute): Allow
amdgpu_hsa_kernel attribute on functions.
(gcn_disable_constructors): Delete.
(TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR): Delete.
* config/gcn/crt0.c (size_t): Define.
(_init_array, _fini_array): New.
(__preinit_array_start, __preinit_array_end,
__init_array_start, __init_array_end,
__fini_array_start, __fini_array_end): Declare weak references.
Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>
From-SVN: r271526
2019-05-22 22:14:08 +00:00
Andrew Stubbs
91d7b7fe84
GCN libgcc.
...
This patch contains the GCN port of libgcc.
2019-01-17 Andrew Stubbs <ams@codesourcery.com>
Kwok Cheung Yeung <kcy@codesourcery.com>
Julian Brown <julian@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
libgcc/
* config.host: Recognize amdgcn*-*-amdhsa.
* config/gcn/crt0.c: New file.
* config/gcn/lib2-divmod-hi.c: New file.
* config/gcn/lib2-divmod.c: New file.
* config/gcn/lib2-gcn.h: New file.
* config/gcn/sfp-machine.h: New file.
* config/gcn/t-amdgcn: New file.
Co-Authored-By: Julian Brown <julian@codesourcery.com>
Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com>
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r268021
2019-01-17 12:29:13 +00:00