aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-12-22 17:05:40 +0000
committerJan Beulich <jbeulich@novell.com>2005-12-22 17:05:40 +0000
commit2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9 (patch)
tree2bf9eadc3b6d46bd73d99669201c6d00d8806abe /gas/testsuite
parente5cc6d1129fca9be54457c858449fdef17405fa7 (diff)
downloadgdb-2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9.zip
gdb-2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9.tar.gz
gdb-2e1e12b1f4d5cdd1c9953a141cde51ee5aa43ee9.tar.bz2
gas/
2005-12-22 Jan Beulich <jbeulich@novell.com> * symbols.h (snapshot_symbol): First parameter is now pointer to pointer to symbolS. * symbols.c (snapshot_symbol): Likewise. Store resulting symbol there. Use symbol_equated_p. * expr.c (resolve_expression): Change first argument to snapshot_symbol. Track possibly changed add_symbol consistently across function. Resolve more special cases with known result. Also update final_val when replacing add_symbol. gas/testsuite/ 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.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog11
-rw-r--r--gas/testsuite/gas/all/cond.l31
-rw-r--r--gas/testsuite/gas/all/cond.s36
-rw-r--r--gas/testsuite/gas/i386/equ.e2
-rw-r--r--gas/testsuite/gas/i386/equ.s14
5 files changed, 82 insertions, 12 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index a7e9c9f..41a06b3 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 6939ee8..36f0066 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]*[ ]+\.ifndef[ ]+y[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+x[ ]*<>[ ]*y[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+z,[ ]*x[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+y[ ]*<>[ ]*z[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]*
+[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+a,[ ]*y[ ]*\+[ ]*1[ ]*
+[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+b,[ ]*z[ ]*-[ ]*1[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+a[ ]*==[ ]*x[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+a[ ]*-[ ]*1[ ]*<>[ ]*x[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+a[ ]*<>[ ]*b[ ]*\+[ ]*2[ ]*
+[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+a[ ]*-[ ]*b[ ]*<>[ ]*2[ ]*
[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
-[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+y,[ ]*0[ ]*
-[ ]*[1-9][0-9]*[ ]+\.if[ ]+x[ ]*
-[ ]*[1-9][0-9]*[ ]+\.elseif[ ]+x[ ]*
+[ ]*[1-9][0-9]*[ ]*
+[ ]*[1-9][0-9]*[ ]+\.equiv[ ]+x,[ ]*0[ ]*
+[ ]*[1-9][0-9]*[ ]+\.if[ ]+y[ ]*
+[ ]*[1-9][0-9]*[ ]+\.elseif[ ]+y[ ]*
[ ]*[1-9][0-9]*[ ]+\.endif[ ]*
[ ]*[1-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 94136ac..164e055 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 b91d71c..8a485d1 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 792c46a..1b7a796 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