aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorSergey Belyashov <sergey.belyashov@gmail.com>2021-05-20 16:14:10 +0100
committerNick Clifton <nickc@redhat.com>2021-05-20 16:14:10 +0100
commit9a01ec4c0368048fb5ea1ba1b3af9afbd651b529 (patch)
tree03d54f33ce20121595129c3b59e1c9ef7aa0e238 /gas/testsuite
parented3130b74053766de776a0d29176610c1bbbdc31 (diff)
downloadgdb-9a01ec4c0368048fb5ea1ba1b3af9afbd651b529.zip
gdb-9a01ec4c0368048fb5ea1ba1b3af9afbd651b529.tar.gz
gdb-9a01ec4c0368048fb5ea1ba1b3af9afbd651b529.tar.bz2
Fix overflow detection in the Z80 assembler.
* config/tc-z80.c (emit_data_val): Warn on constant overflow. (signed_overflow): New function. (unsigned_overflow): New function. (is_overflow): Use new functions. (md_apply_fix): Use signed_overflow. * testsuite/gas/z80/ez80_adl_suf.d: Fix test. * testsuite/gas/z80/ez80_isuf.s: Likewise. * testsuite/gas/z80/ez80_z80_suf.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/z80/ez80_adl_suf.d2
-rw-r--r--gas/testsuite/gas/z80/ez80_isuf.s380
-rw-r--r--gas/testsuite/gas/z80/ez80_z80_suf.d2
3 files changed, 192 insertions, 192 deletions
diff --git a/gas/testsuite/gas/z80/ez80_adl_suf.d b/gas/testsuite/gas/z80/ez80_adl_suf.d
index 0e22362..6b92b1d 100644
--- a/gas/testsuite/gas/z80/ez80_adl_suf.d
+++ b/gas/testsuite/gas/z80/ez80_adl_suf.d
@@ -1,4 +1,4 @@
-#as: -march=ez80+adl
+#as: -march=ez80+adl --defsym VALUE=0x123456
#objdump: -d
#name: eZ80 instructions with sufficies in ADL cpu mode
#source: ez80_isuf.s
diff --git a/gas/testsuite/gas/z80/ez80_isuf.s b/gas/testsuite/gas/z80/ez80_isuf.s
index 8b20852..145b56e 100644
--- a/gas/testsuite/gas/z80/ez80_isuf.s
+++ b/gas/testsuite/gas/z80/ez80_isuf.s
@@ -1,121 +1,121 @@
- call.s 0x123456
- call.s c,0x123456
- call.s m,0x123456
- call.s nc,0x123456
- call.s nz,0x123456
- call.s p,0x123456
- call.s pe,0x123456
- call.s po,0x123456
- call.s z,0x123456
- jp.s 0x123456
- jp.s c,0x123456
- jp.s m,0x123456
- jp.s nc,0x123456
- jp.s nz,0x123456
- jp.s p,0x123456
- jp.s pe,0x123456
- jp.s po,0x123456
- jp.s z,0x123456
- ld.s (0x123456),a
- ld.s (0x123456),bc
- ld.s (0x123456),de
- ld.s (0x123456),hl
- ld.s (0x123456),ix
- ld.s (0x123456),iy
- ld.s (0x123456),sp
- ld.s a,(0x123456)
- ld.s bc,(0x123456)
- ld.s bc,0x123456
- ld.s de,(0x123456)
- ld.s de,0x123456
- ld.s hl,(0x123456)
- ld.s hl,0x123456
- ld.s ix,(0x123456)
- ld.s ix,0x123456
- ld.s iy,(0x123456)
- ld.s iy,0x123456
- ld.s sp,(0x123456)
- ld.s sp,0x123456
+ call.s VALUE
+ call.s c,VALUE
+ call.s m,VALUE
+ call.s nc,VALUE
+ call.s nz,VALUE
+ call.s p,VALUE
+ call.s pe,VALUE
+ call.s po,VALUE
+ call.s z,VALUE
+ jp.s VALUE
+ jp.s c,VALUE
+ jp.s m,VALUE
+ jp.s nc,VALUE
+ jp.s nz,VALUE
+ jp.s p,VALUE
+ jp.s pe,VALUE
+ jp.s po,VALUE
+ jp.s z,VALUE
+ ld.s (VALUE),a
+ ld.s (VALUE),bc
+ ld.s (VALUE),de
+ ld.s (VALUE),hl
+ ld.s (VALUE),ix
+ ld.s (VALUE),iy
+ ld.s (VALUE),sp
+ ld.s a,(VALUE)
+ ld.s bc,(VALUE)
+ ld.s bc,VALUE
+ ld.s de,(VALUE)
+ ld.s de,VALUE
+ ld.s hl,(VALUE)
+ ld.s hl,VALUE
+ ld.s ix,(VALUE)
+ ld.s ix,VALUE
+ ld.s iy,(VALUE)
+ ld.s iy,VALUE
+ ld.s sp,(VALUE)
+ ld.s sp,VALUE
.page
- call.l 0x123456
- call.l c,0x123456
- call.l m,0x123456
- call.l nc,0x123456
- call.l nz,0x123456
- call.l p,0x123456
- call.l pe,0x123456
- call.l po,0x123456
- call.l z,0x123456
- jp.l 0x123456
- jp.l c,0x123456
- jp.l m,0x123456
- jp.l nc,0x123456
- jp.l nz,0x123456
- jp.l p,0x123456
- jp.l pe,0x123456
- jp.l po,0x123456
- jp.l z,0x123456
- ld.l (0x123456),a
- ld.l (0x123456),bc
- ld.l (0x123456),de
- ld.l (0x123456),hl
- ld.l (0x123456),ix
- ld.l (0x123456),iy
- ld.l (0x123456),sp
- ld.l a,(0x123456)
- ld.l bc,(0x123456)
- ld.l bc,0x123456
- ld.l de,(0x123456)
- ld.l de,0x123456
- ld.l hl,(0x123456)
- ld.l hl,0x123456
- ld.l ix,(0x123456)
- ld.l ix,0x123456
- ld.l iy,(0x123456)
- ld.l iy,0x123456
- ld.l sp,(0x123456)
- ld.l sp,0x123456
+ call.l VALUE
+ call.l c,VALUE
+ call.l m,VALUE
+ call.l nc,VALUE
+ call.l nz,VALUE
+ call.l p,VALUE
+ call.l pe,VALUE
+ call.l po,VALUE
+ call.l z,VALUE
+ jp.l VALUE
+ jp.l c,VALUE
+ jp.l m,VALUE
+ jp.l nc,VALUE
+ jp.l nz,VALUE
+ jp.l p,VALUE
+ jp.l pe,VALUE
+ jp.l po,VALUE
+ jp.l z,VALUE
+ ld.l (VALUE),a
+ ld.l (VALUE),bc
+ ld.l (VALUE),de
+ ld.l (VALUE),hl
+ ld.l (VALUE),ix
+ ld.l (VALUE),iy
+ ld.l (VALUE),sp
+ ld.l a,(VALUE)
+ ld.l bc,(VALUE)
+ ld.l bc,VALUE
+ ld.l de,(VALUE)
+ ld.l de,VALUE
+ ld.l hl,(VALUE)
+ ld.l hl,VALUE
+ ld.l ix,(VALUE)
+ ld.l ix,VALUE
+ ld.l iy,(VALUE)
+ ld.l iy,VALUE
+ ld.l sp,(VALUE)
+ ld.l sp,VALUE
.page
- call.is 0x123456
- call.is c,0x123456
- call.is m,0x123456
- call.is nc,0x123456
- call.is nz,0x123456
- call.is p,0x123456
- call.is pe,0x123456
- call.is po,0x123456
- call.is z,0x123456
- jp.is 0x123456
- jp.is c,0x123456
- jp.is m,0x123456
- jp.is nc,0x123456
- jp.is nz,0x123456
- jp.is p,0x123456
- jp.is pe,0x123456
- jp.is po,0x123456
- jp.is z,0x123456
- ld.is (0x123456),a
- ld.is (0x123456),bc
- ld.is (0x123456),de
- ld.is (0x123456),hl
- ld.is (0x123456),ix
- ld.is (0x123456),iy
- ld.is (0x123456),sp
- ld.is a,(0x123456)
- ld.is bc,(0x123456)
- ld.is bc,0x123456
- ld.is de,(0x123456)
- ld.is de,0x123456
- ld.is hl,(0x123456)
- ld.is hl,0x123456
- ld.is ix,(0x123456)
- ld.is ix,0x123456
- ld.is iy,(0x123456)
- ld.is iy,0x123456
- ld.is sp,(0x123456)
- ld.is sp,0x123456
+ call.is 0x3456
+ call.is c,0x3456
+ call.is m,0x3456
+ call.is nc,0x3456
+ call.is nz,0x3456
+ call.is p,0x3456
+ call.is pe,0x3456
+ call.is po,0x3456
+ call.is z,0x3456
+ jp.is 0x3456
+ jp.is c,0x3456
+ jp.is m,0x3456
+ jp.is nc,0x3456
+ jp.is nz,0x3456
+ jp.is p,0x3456
+ jp.is pe,0x3456
+ jp.is po,0x3456
+ jp.is z,0x3456
+ ld.is (0x3456),a
+ ld.is (0x3456),bc
+ ld.is (0x3456),de
+ ld.is (0x3456),hl
+ ld.is (0x3456),ix
+ ld.is (0x3456),iy
+ ld.is (0x3456),sp
+ ld.is a,(0x3456)
+ ld.is bc,(0x3456)
+ ld.is bc,0x3456
+ ld.is de,(0x3456)
+ ld.is de,0x3456
+ ld.is hl,(0x3456)
+ ld.is hl,0x3456
+ ld.is ix,(0x3456)
+ ld.is ix,0x3456
+ ld.is iy,(0x3456)
+ ld.is iy,0x3456
+ ld.is sp,(0x3456)
+ ld.is sp,0x3456
.page
call.il 0x123456
@@ -158,84 +158,84 @@
ld.il sp,0x123456
.page
- call.sis 0x123456
- call.sis c,0x123456
- call.sis m,0x123456
- call.sis nc,0x123456
- call.sis nz,0x123456
- call.sis p,0x123456
- call.sis pe,0x123456
- call.sis po,0x123456
- call.sis z,0x123456
- jp.sis 0x123456
- jp.sis c,0x123456
- jp.sis m,0x123456
- jp.sis nc,0x123456
- jp.sis nz,0x123456
- jp.sis p,0x123456
- jp.sis pe,0x123456
- jp.sis po,0x123456
- jp.sis z,0x123456
- ld.sis (0x123456),a
- ld.sis (0x123456),bc
- ld.sis (0x123456),de
- ld.sis (0x123456),hl
- ld.sis (0x123456),ix
- ld.sis (0x123456),iy
- ld.sis (0x123456),sp
- ld.sis a,(0x123456)
- ld.sis bc,(0x123456)
- ld.sis bc,0x123456
- ld.sis de,(0x123456)
- ld.sis de,0x123456
- ld.sis hl,(0x123456)
- ld.sis hl,0x123456
- ld.sis ix,(0x123456)
- ld.sis ix,0x123456
- ld.sis iy,(0x123456)
- ld.sis iy,0x123456
- ld.sis sp,(0x123456)
- ld.sis sp,0x123456
+ call.sis 0x3456
+ call.sis c,0x3456
+ call.sis m,0x3456
+ call.sis nc,0x3456
+ call.sis nz,0x3456
+ call.sis p,0x3456
+ call.sis pe,0x3456
+ call.sis po,0x3456
+ call.sis z,0x3456
+ jp.sis 0x3456
+ jp.sis c,0x3456
+ jp.sis m,0x3456
+ jp.sis nc,0x3456
+ jp.sis nz,0x3456
+ jp.sis p,0x3456
+ jp.sis pe,0x3456
+ jp.sis po,0x3456
+ jp.sis z,0x3456
+ ld.sis (0x3456),a
+ ld.sis (0x3456),bc
+ ld.sis (0x3456),de
+ ld.sis (0x3456),hl
+ ld.sis (0x3456),ix
+ ld.sis (0x3456),iy
+ ld.sis (0x3456),sp
+ ld.sis a,(0x3456)
+ ld.sis bc,(0x3456)
+ ld.sis bc,0x3456
+ ld.sis de,(0x3456)
+ ld.sis de,0x3456
+ ld.sis hl,(0x3456)
+ ld.sis hl,0x3456
+ ld.sis ix,(0x3456)
+ ld.sis ix,0x3456
+ ld.sis iy,(0x3456)
+ ld.sis iy,0x3456
+ ld.sis sp,(0x3456)
+ ld.sis sp,0x3456
.page
- call.lis 0x123456
- call.lis c,0x123456
- call.lis m,0x123456
- call.lis nc,0x123456
- call.lis nz,0x123456
- call.lis p,0x123456
- call.lis pe,0x123456
- call.lis po,0x123456
- call.lis z,0x123456
- jp.lis 0x123456
- jp.lis c,0x123456
- jp.lis m,0x123456
- jp.lis nc,0x123456
- jp.lis nz,0x123456
- jp.lis p,0x123456
- jp.lis pe,0x123456
- jp.lis po,0x123456
- jp.lis z,0x123456
- ld.lis (0x123456),a
- ld.lis (0x123456),bc
- ld.lis (0x123456),de
- ld.lis (0x123456),hl
- ld.lis (0x123456),ix
- ld.lis (0x123456),iy
- ld.lis (0x123456),sp
- ld.lis a,(0x123456)
- ld.lis bc,(0x123456)
- ld.lis bc,0x123456
- ld.lis de,(0x123456)
- ld.lis de,0x123456
- ld.lis hl,(0x123456)
- ld.lis hl,0x123456
- ld.lis ix,(0x123456)
- ld.lis ix,0x123456
- ld.lis iy,(0x123456)
- ld.lis iy,0x123456
- ld.lis sp,(0x123456)
- ld.lis sp,0x123456
+ call.lis 0x3456
+ call.lis c,0x3456
+ call.lis m,0x3456
+ call.lis nc,0x3456
+ call.lis nz,0x3456
+ call.lis p,0x3456
+ call.lis pe,0x3456
+ call.lis po,0x3456
+ call.lis z,0x3456
+ jp.lis 0x3456
+ jp.lis c,0x3456
+ jp.lis m,0x3456
+ jp.lis nc,0x3456
+ jp.lis nz,0x3456
+ jp.lis p,0x3456
+ jp.lis pe,0x3456
+ jp.lis po,0x3456
+ jp.lis z,0x3456
+ ld.lis (0x3456),a
+ ld.lis (0x3456),bc
+ ld.lis (0x3456),de
+ ld.lis (0x3456),hl
+ ld.lis (0x3456),ix
+ ld.lis (0x3456),iy
+ ld.lis (0x3456),sp
+ ld.lis a,(0x3456)
+ ld.lis bc,(0x3456)
+ ld.lis bc,0x3456
+ ld.lis de,(0x3456)
+ ld.lis de,0x3456
+ ld.lis hl,(0x3456)
+ ld.lis hl,0x3456
+ ld.lis ix,(0x3456)
+ ld.lis ix,0x3456
+ ld.lis iy,(0x3456)
+ ld.lis iy,0x3456
+ ld.lis sp,(0x3456)
+ ld.lis sp,0x3456
.page
call.sil 0x123456
diff --git a/gas/testsuite/gas/z80/ez80_z80_suf.d b/gas/testsuite/gas/z80/ez80_z80_suf.d
index 4fa7cd9c..1269402 100644
--- a/gas/testsuite/gas/z80/ez80_z80_suf.d
+++ b/gas/testsuite/gas/z80/ez80_z80_suf.d
@@ -1,4 +1,4 @@
-#as: -march=ez80
+#as: -march=ez80 --defsym VALUE=0x3456
#objdump: -d
#name: eZ80 instructions with sufficies in Z80 cpu mode
#source: ez80_isuf.s