From eb5d719dd774afd445dbf2be891868cf1973058c Mon Sep 17 00:00:00 2001 From: konglin1 Date: Mon, 1 Jul 2024 23:01:12 -0700 Subject: x86-64: Verify that TLS IE works with APX NF Verify that {nf} add %reg1, foo@gottpoff(%rip), %reg2 {nf} add foo@gottpoff(%rip), %reg, %reg2 work correctly with ld and gold. gas/ * testsuite/gas/i386/x86-64-gottpoff.d: Updated. * testsuite/gas/i386/x86-64-gottpoff.s: Add tests for "{nf} add %reg1, foo@gottpoff(%rip), %reg2" and "{nf} add foo@gottpoff(%rip), %reg, %reg2". gold/ * testsuite/x86_64_ie_to_le.s: Add tests for "{nf} add %reg1, foo@gottpoff(%rip), %reg2" and "{nf} add foo@gottpoff(%rip), %reg, %reg2". * testsuite/x86_64_ie_to_le.sh: Updated. ld/ * testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF for APX NF tests. * testsuite/ld-x86-64/tlsbindesc.d: Updated. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. Co-Authored-By: H.J. Lu Signed-off-by: H.J. Lu --- gold/testsuite/x86_64_ie_to_le.s | 2 ++ gold/testsuite/x86_64_ie_to_le.sh | 2 ++ 2 files changed, 4 insertions(+) (limited to 'gold') diff --git a/gold/testsuite/x86_64_ie_to_le.s b/gold/testsuite/x86_64_ie_to_le.s index bd0643d..56f3dfc 100644 --- a/gold/testsuite/x86_64_ie_to_le.s +++ b/gold/testsuite/x86_64_ie_to_le.s @@ -9,6 +9,8 @@ _start: movq foo@gottpoff(%rip), %r20 addq %r30, foo@gottpoff(%rip), %r8 addq foo@gottpoff(%rip), %rax, %r20 + {nf} addq %r30, foo@gottpoff(%rip), %r8 + {nf} addq foo@gottpoff(%rip), %rax, %r20 .size _start, .-_start .section .tdata,"awT",@progbits .align 4 diff --git a/gold/testsuite/x86_64_ie_to_le.sh b/gold/testsuite/x86_64_ie_to_le.sh index 5308712..2927272 100755 --- a/gold/testsuite/x86_64_ie_to_le.sh +++ b/gold/testsuite/x86_64_ie_to_le.sh @@ -29,3 +29,5 @@ grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r16" x86_64_ie_to_le.stdout grep -q "mov[ \t]\+\$0x[a-f0-9]\+,%r20" x86_64_ie_to_le.stdout grep -q "add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout grep -q "add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%r30,%r8" x86_64_ie_to_le.stdout +grep -q "\{nf\} add[ \t]\+\$0x[a-f0-9]\+,%rax,%r20" x86_64_ie_to_le.stdout -- cgit v1.1