From ae33e02d8fb319ff797cb5709471ce6cd15ac3b2 Mon Sep 17 00:00:00 2001 From: Arnold Metselaar Date: Wed, 18 Jan 2006 14:52:11 +0000 Subject: [PATCH] Add tests for instructions with offsets. --- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/z80/offset.d | 24 ++++++++++++++++++++++++ gas/testsuite/gas/z80/offset.s | 23 +++++++++++++++++++++++ gas/testsuite/gas/z80/z80.exp | 2 ++ 4 files changed, 55 insertions(+) create mode 100644 gas/testsuite/gas/z80/offset.d create mode 100644 gas/testsuite/gas/z80/offset.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index ee720a0..6069d12 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-01-18 Arnold Metselaar + + * gas/z80/z80.exp: Add offset. + * gas/z80/ofseet.d: New file. + * gas/z80/ofseet.s: New file. + 2006-01-16 Paul Brook * gas/m68k/all.exp: Add mcf-fpu. diff --git a/gas/testsuite/gas/z80/offset.d b/gas/testsuite/gas/z80/offset.d new file mode 100644 index 0000000..41499b1 --- /dev/null +++ b/gas/testsuite/gas/z80/offset.d @@ -0,0 +1,24 @@ +#objdump: -d +#name: instructions with offsets + +.*: .* + +Disassembly of section .text: + +0+ <.text>: + +[ ]+0:[ ]+18 7e[ ]+jr 0x0080 +[ ]+2:[ ]+dd 34 05[ ]+inc \(ix\+5\) +[ ]+5:[ ]+fd 35 ff[ ]+dec \(iy\+?-1\) +[ ]+8:[ ]+dd 7e 80[ ]+ld a,\(ix\+?-128\) +[ ]+b:[ ]+fd 77 7f[ ]+ld \(iy\+127\),a +[ ]+e:[ ]+10 f0[ ]+djnz 0x0000 +[ ]+10:[ ]+28 02[ ]+jr z,0x0014 +[ ]+12:[ ]+38 04[ ]+jr c,0x0018 +[ ]+14:[ ]+20 02[ ]+jr nz,0x0018 +[ ]+16:[ ]+30 fc[ ]+jr nc,0x0014 +[ ]+18:[ ]+dd 36 22 09[ ]+ld \(ix\+34\),0x09 +[ ]+1c:[ ]+fd 36 de f7[ ]+ld \(iy\+?-34\),0xf7 +[ ]+20:[ ]+dd cb 37 1e[ ]+rr \(ix\+55\) +[ ]+24:[ ]+fd cb c9 16[ ]+rl \(iy\+?-55\) +#pass diff --git a/gas/testsuite/gas/z80/offset.s b/gas/testsuite/gas/z80/offset.s new file mode 100644 index 0000000..6e4b33f --- /dev/null +++ b/gas/testsuite/gas/z80/offset.s @@ -0,0 +1,23 @@ +;;; various instructions involving offsets + + .section .text + .org 0 +10: + jr 1f + inc (ix+5) + dec (iy-1) + ld a,(ix-128) + ld (iy+127),a + djnz 10b + jr z,2f + jr c,3f +2: + jr nz,3f + jr nc,2b +3: + ld (ix+34),9 + ld (iy-34),-9 + rr (ix+55) + rl (iy-55) + .balign 0x80 +1: diff --git a/gas/testsuite/gas/z80/z80.exp b/gas/testsuite/gas/z80/z80.exp index db11bb7..68b4b86 100644 --- a/gas/testsuite/gas/z80/z80.exp +++ b/gas/testsuite/gas/z80/z80.exp @@ -7,4 +7,6 @@ if [istarget z80-*-*] then { run_dump_test "quotes" # test suffixes run_dump_test "suffix" +# test assembling and disassembling insturction involving offsets + run_dump_test "offset" } -- 2.7.4