Skip to content
Snippets Groups Projects
Commit 7f2cf0c4 authored by H.J. Lu's avatar H.J. Lu Committed by H.J. Lu
Browse files

x86-64: Check R_X86_64_CODE_6_GOTTPOFF support

If assembler and linker supports

add %reg1, name@gottpoff(%rip), %reg2

with R_X86_64_CODE_6_GOTTPOFF, we can generate it instead of

mov name@gottpoff(%rip), %reg2
add %reg1, %reg2

gcc/

	* configure.ac (HAVE_AS_R_X86_64_CODE_6_GOTTPOFF): Defined as 1
	if R_X86_64_CODE_6_GOTTPOFF is supported.
	* config.in: Regenerated.
	* configure: Likewise.
	* config/i386/predicates.md (apx_ndd_add_memory_operand): Allow
	UNSPEC_GOTNTPOFF if R_X86_64_CODE_6_GOTTPOFF is supported.

gcc/testsuite/

	* gcc.target/i386/apx-ndd-tls-1b.c: New test.
	* lib/target-supports.exp
	(check_effective_target_code_6_gottpoff_reloc): New.
parent 9266d9fc
No related branches found
No related tags found
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