1. Add a macro test for expression argument with inner white spaces and
a white space before argument added by C preprocessor.
2. Add a x86-64 specific macro test.
PR gas/32073
* testsuite/gas/i386/x86-64-macro-1.d: New file.
* testsuite/gas/i386/x86-64-macro-1.s: Likewise.
* testsuite/gas/i386/x86-64.exp: Run x86-64-macro-1.
* testsuite/gas/macros/arg1.d: New file.
* testsuite/gas/macros/arg1.s: Likewise.
* testsuite/gas/macros/macros.exp: Run arg1.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
--- /dev/null
+#as: -mrelax-relocations=yes
+#objdump: -dwr
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+ +[a-f0-9]+: ff 15 00 00 00 00 call \*0x0\(%rip\) # 6 <_start\+0x6> 2: R_X86_64_GOTPCRELX acos-0x4
+#pass
--- /dev/null
+# Test a white space before argument added by C preprocessor.
+
+ .macro WRAPPER_IMPL_SSE2 callee
+ call *\ callee@GOTPCREL(%rip)
+ .endm
+
+ .text
+_start:
+ WRAPPER_IMPL_SSE2 acos
run_dump_test "x86-64-no-got"
+ run_dump_test "x86-64-macro-1"
+
run_dump_test "x86-64-addend"
run_dump_test "x86-64-nop-3"
run_dump_test "x86-64-nop-4"
--- /dev/null
+#objdump: -s -j .data
+
+.*: .*
+
+Contents of section .data:
+ 0000 10111213 1415 ......
+#pass
--- /dev/null
+# Test expression argument with inner white spaces and a white space
+# before argument added by C preprocessor.
+
+ .macro test arg1, arg2, arg3
+ .byte \arg1
+ .byte \arg2
+ .byte \ arg3
+ .endm
+
+ .data
+ test 0x10 + 0, 0x10 + 1, 0x10 + 2
+ test 0x10 + 3, 0x10 + 4, 0x15
run_list_test app6 ""
}
+run_dump_test arg1
+
run_list_test badarg ""
switch -glob $target_triplet {