diff options
author | Alan Modra <amodra@gmail.com> | 2025-01-03 12:48:51 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-01-03 13:21:47 +1030 |
commit | c935dfcc798e89f6ed3fa390eefc9452681243b0 (patch) | |
tree | b454c54e97257de9173ed18aa1c5ead1f28d3b6b | |
parent | abbdd7248999ad66c0b59aa9656866ee1931b913 (diff) | |
download | gdb-c935dfcc798e89f6ed3fa390eefc9452681243b0.zip gdb-c935dfcc798e89f6ed3fa390eefc9452681243b0.tar.gz gdb-c935dfcc798e89f6ed3fa390eefc9452681243b0.tar.bz2 |
macro nesting testcases
Fix a bunch of regressions. Don't start anything besides a label in
first column, don't name macros the same as directives, and make
labels global.
-rw-r--r-- | gas/testsuite/gas/macros/nesting1.s | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/macros/nesting2.s | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/macros/nesting3.s | 17 |
3 files changed, 25 insertions, 22 deletions
diff --git a/gas/testsuite/gas/macros/nesting1.s b/gas/testsuite/gas/macros/nesting1.s index 3d415e1..dda2480 100644 --- a/gas/testsuite/gas/macros/nesting1.s +++ b/gas/testsuite/gas/macros/nesting1.s @@ -1,14 +1,15 @@ .text -.macro entry fname + .macro entry fname + .global \fname \fname: -.endm + .endm -.macro func fname, t - entry \fname - .macro data - .dc.\()\t 0 + .macro func1 fname, t + entry \fname + .macro data1 + .dc.\()\t 0 + .endm + data1 .endm - data -.endm -func foo, a + func1 foo, a diff --git a/gas/testsuite/gas/macros/nesting2.s b/gas/testsuite/gas/macros/nesting2.s index ff8a7f4..af9e1bb 100644 --- a/gas/testsuite/gas/macros/nesting2.s +++ b/gas/testsuite/gas/macros/nesting2.s @@ -1,10 +1,11 @@ -.macro function name - .macro endfunc + .macro function name + .macro endfunction .endm .text + .global \name \name: -.endm + .endm -function foo + function foo .dc.a 0 -endfunc + endfunction diff --git a/gas/testsuite/gas/macros/nesting3.s b/gas/testsuite/gas/macros/nesting3.s index 4488009..befc06f 100644 --- a/gas/testsuite/gas/macros/nesting3.s +++ b/gas/testsuite/gas/macros/nesting3.s @@ -1,13 +1,14 @@ .text -.macro func + .macro func1 foo -.endm + .endm -.macro do_foo -.macro foo + .macro do_foo + .macro foo + .global foo foo: .dc.a 0 -.endm -.endm -do_foo -func + .endm + .endm + do_foo + func1 |