Add tests for instructions with offsets.

This commit is contained in:
Arnold Metselaar 2006-01-18 14:52:11 +00:00
parent 9e919b5f1d
commit ae33e02d8f
4 changed files with 55 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-01-18 Arnold Metselaar <arnoldm@sourceware.org>
* gas/z80/z80.exp: Add offset.
* gas/z80/ofseet.d: New file.
* gas/z80/ofseet.s: New file.
2006-01-16 Paul Brook <paul@codesourcery.com>
* gas/m68k/all.exp: Add mcf-fpu.

View File

@ -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

View File

@ -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:

View File

@ -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"
}