aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-05-16 11:43:29 +0100
committerNick Clifton <nickc@redhat.com>2024-05-16 11:43:29 +0100
commite9ee1927d1ad1bc08c32c791aac3a1acc6701ac4 (patch)
treea5338df67d747caa4daf276a06e559b21a17b0ea
parent7e544ad81a55941cda38d9195e79dace243f48d0 (diff)
downloadgdb-e9ee1927d1ad1bc08c32c791aac3a1acc6701ac4.zip
gdb-e9ee1927d1ad1bc08c32c791aac3a1acc6701ac4.tar.gz
gdb-e9ee1927d1ad1bc08c32c791aac3a1acc6701ac4.tar.bz2
Move assembler "IRP \+" test into a separate file. Add XFAILs for targets that do not support it.
-rw-r--r--gas/testsuite/gas/macros/count.l3
-rw-r--r--gas/testsuite/gas/macros/count.s7
-rw-r--r--gas/testsuite/gas/macros/irp-count.d2
-rw-r--r--gas/testsuite/gas/macros/irp-count.l3
-rw-r--r--gas/testsuite/gas/macros/irp-count.s7
-rw-r--r--gas/testsuite/gas/macros/macros.exp6
6 files changed, 19 insertions, 9 deletions
diff --git a/gas/testsuite/gas/macros/count.l b/gas/testsuite/gas/macros/count.l
index ca666ea..dc4951d 100644
--- a/gas/testsuite/gas/macros/count.l
+++ b/gas/testsuite/gas/macros/count.l
@@ -1,3 +1,4 @@
+#...
0
0
1
@@ -8,5 +9,3 @@
1
4
2
-\+
-\+
diff --git a/gas/testsuite/gas/macros/count.s b/gas/testsuite/gas/macros/count.s
index 4a5b078..c752ca8 100644
--- a/gas/testsuite/gas/macros/count.s
+++ b/gas/testsuite/gas/macros/count.s
@@ -17,10 +17,3 @@
mac1 2
mac2 3
-
- .irp i,1
- .print "\+"
- .endr
- .irpc i,1
- .print "\+"
- .endr
diff --git a/gas/testsuite/gas/macros/irp-count.d b/gas/testsuite/gas/macros/irp-count.d
new file mode 100644
index 0000000..66c51a6
--- /dev/null
+++ b/gas/testsuite/gas/macros/irp-count.d
@@ -0,0 +1,2 @@
+#name: Macro counters inside IRP commands (irp-count.d)
+# Tests that \+ does not trip up IRP commands
diff --git a/gas/testsuite/gas/macros/irp-count.l b/gas/testsuite/gas/macros/irp-count.l
new file mode 100644
index 0000000..d101555
--- /dev/null
+++ b/gas/testsuite/gas/macros/irp-count.l
@@ -0,0 +1,3 @@
+#...
+\+
+\+
diff --git a/gas/testsuite/gas/macros/irp-count.s b/gas/testsuite/gas/macros/irp-count.s
new file mode 100644
index 0000000..1ff5c7b
--- /dev/null
+++ b/gas/testsuite/gas/macros/irp-count.s
@@ -0,0 +1,7 @@
+ .irp i,1
+ .print "\+"
+ .endr
+
+ .irpc i,1
+ .print "\+"
+ .endr
diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp
index 3108f3f..ed08e75 100644
--- a/gas/testsuite/gas/macros/macros.exp
+++ b/gas/testsuite/gas/macros/macros.exp
@@ -103,3 +103,9 @@ gas_test_error "exit.s" "" ".exitm outside of a macro"
run_list_test altmacro
run_list_test count
+
+# The AVR, CRIS, MSP430 and Z80 targets define ONLY_STANDARD_ESCAPES,
+# so \+ is rejected.
+# AIX targets need an extended regexp to match "\+".
+setup_xfail "avr-*-*" "cris*-*-*" "msp430-*-*" "z80-*-*" "*-*-aix*"
+run_list_test irp-count