diff options
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/all/cond.l | 31 | ||||
-rw-r--r-- | gas/testsuite/gas/all/cond.s | 36 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/equ.e | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/equ.s | 14 |
5 files changed, 82 insertions, 12 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index a7e9c9fc9e8..41a06b34fde 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2005-12-22 Jan Beulich <jbeulich@novell.com> + + * gas/all/cond.s: Also check .if works on equates to undefined + when the expression value can be known without knowing the + value of the symbol. + * gas/all/cond.l: Adjust. + * gas/i386/equ.s: Also check .if works on (equates to) + registers when the expression value can be known without + knowing the value of the register. + * gas/i386/equ.e: Adjust. + 2005-12-14 Jan Beulich <jbeulich@novell.com> * gas/i386/rex.[sd]: New. diff --git a/gas/testsuite/gas/all/cond.l b/gas/testsuite/gas/all/cond.l index 6939ee85080..36f00664440 100644 --- a/gas/testsuite/gas/all/cond.l +++ b/gas/testsuite/gas/all/cond.l @@ -27,13 +27,32 @@ [ ]*[1-9][0-9]*[ ]+\.comm[ ]+c,[ ]*1[ ]* [ ]*[1-9][0-9]*[ ]+\.ifndef[ ]+c[ ]* [ ]*[1-9][0-9]*[ ]+\.endif[ ]* -[ ]*[1-9][0-9]*[ ]+ -[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+x,[ ]*y[ ]* -[ ]*[1-9][0-9]*[ ]+\.ifndef[ ]+x[ ]* +[ ]*[1-9][0-9]*[ ]* +[ ]*[1-9][0-9]*[ ]+\.if[ ]+x[ ]*<>[ ]*x[ ]* +[ ]*[1-9][0-9]*[ ]+\.endif[ ]* +[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+y,[ ]*x[ ]* +[ ]*[1-9][0-9]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9][0-9]*[ ]+ [ ]*[1-9][0-9]*[ ]+\.macro[ ]+m[ ]+x,[ ]*y[ ]* diff --git a/gas/testsuite/gas/all/cond.s b/gas/testsuite/gas/all/cond.s index 94136acb237..164e055b12b 100644 --- a/gas/testsuite/gas/all/cond.s +++ b/gas/testsuite/gas/all/cond.s @@ -35,14 +35,40 @@ .err .endif - .equiv x, y - .ifndef x + .if x <> x .err .endif - .equiv y, 0 - .if x + .equiv y, x + .ifndef y .err - .elseif x + .endif + .if x <> y + .err + .endif + .equiv z, x + .if y <> z + .err + .endif + + .equiv a, y + 1 + .equiv b, z - 1 + .if a == x + .err + .endif + .if a - 1 <> x + .err + .endif + .if a <> b + 2 + .err + .endif + .if a - b <> 2 + .err + .endif + + .equiv x, 0 + .if y + .err + .elseif y .err .endif diff --git a/gas/testsuite/gas/i386/equ.e b/gas/testsuite/gas/i386/equ.e index b91d71c671f..8a485d1ee94 100644 --- a/gas/testsuite/gas/i386/equ.e +++ b/gas/testsuite/gas/i386/equ.e @@ -1,2 +1,2 @@ .*: Assembler messages: -.*:23: Warning: Treating .* as memory reference +.*:30: Warning: Treating .* as memory reference diff --git a/gas/testsuite/gas/i386/equ.s b/gas/testsuite/gas/i386/equ.s index 792c46ac28d..1b7a796ad04 100644 --- a/gas/testsuite/gas/i386/equ.s +++ b/gas/testsuite/gas/i386/equ.s @@ -16,6 +16,13 @@ _start: .equ x, %st(1) fadd x + .if r <> %ecx + .err + .endif + .if r == s + .err + .endif + .intel_syntax noprefix .equ r, -2 .equ s, -2 @@ -33,5 +40,12 @@ _start: .equ x, st(7) fadd x + .if s <> gs + .err + .endif + .if s == x + .err + .endif + .equ r, -3 .equ s, -3 |