Skip to content
Snippets Groups Projects
Commit 6f83861c authored by Tobias Burnus's avatar Tobias Burnus
Browse files

gcn: Add __builtin_gcn_kernarg_ptr


Add __builtin_gcn_kernarg_ptr to avoid using hard-coded register values
and permit future ABI changes while keeping the API.

gcc/ChangeLog:

	* config/gcn/gcn-builtins.def (KERNARG_PTR): Add.
	* config/gcn/gcn.cc (gcn_init_builtin_types): Change siptr_type_node,
	sfptr_type_node and voidptr_type_node from FLAT to ADDR_SPACE_DEFAULT.
	(gcn_expand_builtin_1): Handle GCN_BUILTIN_KERNARG_PTR.
	(gcn_oacc_dim_size): Return in ADDR_SPACE_FLAT.

libgomp/ChangeLog:

	* config/gcn/team.c (gomp_gcn_enter_kernel): Use
	__builtin_gcn_kernarg_ptr instead of asm ("s8").

Co-Authored-By: default avatarAndrew Stubbs <ams@codesourcery.com>
parent 21501ec7
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment