diff options
author | Arnold Metselaar <arnold.metselaar@planet.nl> | 2008-09-14 14:04:00 +0000 |
---|---|---|
committer | Arnold Metselaar <arnold.metselaar@planet.nl> | 2008-09-14 14:04:00 +0000 |
commit | c3229d3803e1f5802fc26f6e5a08101bcb6620d7 (patch) | |
tree | 6a04b4a7e77801dd13ad06995a47b859a12a95ee | |
parent | d04117369bdf589dd7ad899960b89a77fe0597ae (diff) | |
download | gdb-c3229d3803e1f5802fc26f6e5a08101bcb6620d7.zip gdb-c3229d3803e1f5802fc26f6e5a08101bcb6620d7.tar.gz gdb-c3229d3803e1f5802fc26f6e5a08101bcb6620d7.tar.bz2 |
Add new tests for z80
-rw-r--r-- | gas/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/arith.d | 149 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/arith.s | 162 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/bit.d | 249 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/bit.s | 245 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/block.d | 25 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/block.s | 23 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/branch.d | 54 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/branch.s | 57 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/inout.d | 24 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/inout.s | 23 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/ld-group.d | 154 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/ld-group.s | 169 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/misc.d | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/misc.s | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/rotate.d | 86 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/rotate.s | 81 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/z80.exp | 16 |
18 files changed, 1581 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 4a205ed..bc25499 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2008-09-14 Arnold Metselaar <arnold.metselaar@planet.nl> + + * gas/z80/ld-group.s, gas/z80/ld-group.d: New test. + * gas/z80/block.s, gas/z80/block.d: New test + * gas/z80/arith.s, gas/z80/arith.d: New test + * gas/z80/rotate.s, gas/z80/rotate.d: New test + * gas/z80/bit.s, gas/z80/bit.d: New test + * gas/z80/branch.s, gas/z80/branch.d: New test + * gas/z80/inout.s, gas/z80/inout.d: New test + * gas/z80/misc.s, gas/z80/misc.d: New test + * gas/z80/z80.exp: Run them. + 2008-09-11 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/sse2avx.s: Remove pclmulXXX tests. Add tests for diff --git a/gas/testsuite/gas/z80/arith.d b/gas/testsuite/gas/z80/arith.d new file mode 100644 index 0000000..3a6781c --- /dev/null +++ b/gas/testsuite/gas/z80/arith.d @@ -0,0 +1,149 @@ +#objdump: -d +#name: arithmetic and logic + +.*: .* + +Disassembly of section .text: + +0+ <.text>: +[ ]+[0-9a-f]+:[ ]+87[ ]+add a,a +[ ]+[0-9a-f]+:[ ]+80[ ]+add a,b +[ ]+[0-9a-f]+:[ ]+81[ ]+add a,c +[ ]+[0-9a-f]+:[ ]+82[ ]+add a,d +[ ]+[0-9a-f]+:[ ]+83[ ]+add a,e +[ ]+[0-9a-f]+:[ ]+84[ ]+add a,h +[ ]+[0-9a-f]+:[ ]+85[ ]+add a,l +[ ]+[0-9a-f]+:[ ]+86[ ]+add a,\(hl\) +[ ]+[0-9a-f]+:[ ]+dd 86 05[ ]+add a,\(ix\+5\) +[ ]+[0-9a-f]+:[ ]+fd 86 05[ ]+add a,\(iy\+5\) +[ ]+[0-9a-f]+:[ ]+c6 11[ ]+add a,0x11 +[ ]+[0-9a-f]+:[ ]+8f[ ]+adc a,a +[ ]+[0-9a-f]+:[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[ ]+33[ ]+inc sp +[ ]+[0-9a-f]+:[ ]+dd 23[ ]+inc ix +[ ]+[0-9a-f]+:[ ]+fd 23[ ]+inc iy +[ ]+[0-9a-f]+:[ ]+0b[ ]+dec bc +[ ]+[0-9a-f]+:[ ]+1b[ ]+dec de +[ ]+[0-9a-f]+:[ ]+2b[ ]+dec hl +[ ]+[0-9a-f]+:[ ]+3b[ ]+dec sp +[ ]+[0-9a-f]+:[ ]+dd 2b[ ]+dec ix +[ ]+[0-9a-f]+:[ ]+fd 2b[ ]+dec iy +#pass diff --git a/gas/testsuite/gas/z80/arith.s b/gas/testsuite/gas/z80/arith.s new file mode 100644 index 0000000..1aa66b7 --- /dev/null +++ b/gas/testsuite/gas/z80/arith.s @@ -0,0 +1,162 @@ + .text + .org 0 +;;; 8-bit arithmetic and logic + add a,a + add a,b + add a,c + add a,d + add a,e + add a,h + add a,l + add a,(hl) + add a,(ix+5) + add a,(iy+5) + add a,17 + + adc a,a + adc a,b + adc a,c + adc a,d + adc a,e + adc a,h + adc a,l + adc a,(hl) + adc a,(ix+5) + adc a,(iy+5) + adc a,17 + + sub a + sub b + sub c + sub d + sub e + sub h + sub l + sub (hl) + sub (ix+5) + sub (iy+5) + sub 17 + + sbc a,a + sbc a,b + sbc a,c + sbc a,d + sbc a,e + sbc a,h + sbc a,l + sbc a,(hl) + sbc a,(ix+5) + sbc a,(iy+5) + sbc a,17 + + and a + and b + and c + and d + and e + and h + and l + and (hl) + and (ix+5) + and (iy+5) + and 17 + + xor a + xor b + xor c + xor d + xor e + xor h + xor l + xor (hl) + xor (ix+5) + xor (iy+5) + xor 17 + + or a + or b + or c + or d + or e + or h + or l + or (hl) + or (ix+5) + or (iy+5) + or 17 + + cp a + cp b + cp c + cp d + cp e + cp h + cp l + cp (hl) + cp (ix+5) + cp (iy+5) + cp 17 + + inc a + inc b + inc c + inc d + inc e + inc h + inc l + inc (hl) + inc (ix+5) + inc (iy+5) + + dec a + dec b + dec c + dec d + dec e + dec h + dec l + dec (hl) + dec (ix+5) + dec (iy+5) + +;;; 16-bit arithmetic anmd logic + add hl,bc + add hl,de + add hl,hl + add hl,sp + + add ix,bc + add ix,de + add ix,ix + add ix,sp + + add iy,bc + add iy,de + add iy,iy + add iy,sp + + adc hl,bc + adc hl,de + adc hl,hl + adc hl,sp + + sbc hl,bc + sbc hl,de + sbc hl,hl + sbc hl,sp + + inc bc + inc de + inc hl + inc sp + inc ix + inc iy + + dec bc + dec de + dec hl + dec sp + dec ix + dec iy + +
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/bit.d b/gas/testsuite/gas/z80/bit.d new file mode 100644 index 0000000..ccd30fc --- /dev/null +++ b/gas/testsuite/gas/z80/bit.d @@ -0,0 +1,249 @@ +#objdump: -d +#name: bit manipulations + +.*: .* + +Disassembly of section .text: + +0+ <.text>: + +[ ]+[0-9a-f]+:[ ]+cb 47[ ]+bit 0,a +[ ]+[0-9a-f]+:[ ]+cb 40[ ]+bit 0,b +[ ]+[0-9a-f]+:[ ]+cb 41[ ]+bit 0,c +[ ]+[0-9a-f]+:[ ]+cb 42[ ]+bit 0,d +[ ]+[0-9a-f]+:[ ]+cb 43[ ]+bit 0,e +[ ]+[0-9a-f]+:[ ]+cb 44[ ]+bit 0,h +[ ]+[0-9a-f]+:[ ]+cb 45[ ]+bit 0,l +[ ]+[0-9a-f]+:[ ]+cb 46[ ]+bit 0,\(hl\) +[ ]+[0-9a-f]+:[ ]+dd cb 05 46[ ]+bit 0,\(ix\+5\) +[ ]+[0-9a-f]+:[ ]+fd cb 05 46[ ]+bit 0,\(iy\+5\) +[ ]+[0-9a-f]+:[ ]+cb 4f[ ]+bit 1,a +[ ]+[0-9a-f]+:[ ]+cb 48[ ]+bit 1,b +[ ]+[0-9a-f]+:[ ]+cb 49[ ]+bit 1,c +[ ]+[0-9a-f]+:[ ]+cb 4a[ ]+bit 1,d +[ ]+[0-9a-f]+:[ ]+cb 4b[ ]+bit 1,e +[ ]+[0-9a-f]+:[ ]+cb 4c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6[ ]+set 6,\(ix\+5\) +[ ]+[0-9a-f]+:[ ]+fd cb 05 f6[ ]+set 6,\(iy\+5\) +[ ]+[0-9a-f]+:[ ]+cb ff[ ]+set 7,a +[ ]+[0-9a-f]+:[ ]+cb f8[ ]+set 7,b +[ ]+[0-9a-f]+:[ ]+cb f9[ ]+set 7,c +[ ]+[0-9a-f]+:[ ]+cb fa[ ]+set 7,d +[ ]+[0-9a-f]+:[ ]+cb fb[ ]+set 7,e +[ ]+[0-9a-f]+:[ ]+cb fc[ ]+set 7,h +[ ]+[0-9a-f]+:[ ]+cb fd[ ]+set 7,l +[ ]+[0-9a-f]+:[ ]+cb fe[ ]+set 7,\(hl\) +[ ]+[0-9a-f]+:[ ]+dd cb 05 fe[ ]+set 7,\(ix\+5\) +[ ]+[0-9a-f]+:[ ]+fd cb 05 fe[ ]+set 7,\(iy\+5\) diff --git a/gas/testsuite/gas/z80/bit.s b/gas/testsuite/gas/z80/bit.s new file mode 100644 index 0000000..40a5f9e --- /dev/null +++ b/gas/testsuite/gas/z80/bit.s @@ -0,0 +1,245 @@ + .text + .org 0 +;;; bit manipulation + bit 0,a + bit 0,b + bit 0,c + bit 0,d + bit 0,e + bit 0,h + bit 0,l + bit 0,(hl) + bit 0,(ix+5) + bit 0,(iy+5) + bit 1,a + bit 1,b + bit 1,c + bit 1,d + bit 1,e + bit 1,h + bit 1,l + bit 1,(hl) + bit 1,(ix+5) + bit 1,(iy+5) + bit 2,a + bit 2,b + bit 2,c + bit 2,d + bit 2,e + bit 2,h + bit 2,l + bit 2,(hl) + bit 2,(ix+5) + bit 2,(iy+5) + bit 3,a + bit 3,b + bit 3,c + bit 3,d + bit 3,e + bit 3,h + bit 3,l + bit 3,(hl) + bit 3,(ix+5) + bit 3,(iy+5) + bit 4,a + bit 4,b + bit 4,c + bit 4,d + bit 4,e + bit 4,h + bit 4,l + bit 4,(hl) + bit 4,(ix+5) + bit 4,(iy+5) + bit 5,a + bit 5,b + bit 5,c + bit 5,d + bit 5,e + bit 5,h + bit 5,l + bit 5,(hl) + bit 5,(ix+5) + bit 5,(iy+5) + bit 6,a + bit 6,b + bit 6,c + bit 6,d + bit 6,e + bit 6,h + bit 6,l + bit 6,(hl) + bit 6,(ix+5) + bit 6,(iy+5) + bit 7,a + bit 7,b + bit 7,c + bit 7,d + bit 7,e + bit 7,h + bit 7,l + bit 7,(hl) + bit 7,(ix+5) + bit 7,(iy+5) + + res 0,a + res 0,b + res 0,c + res 0,d + res 0,e + res 0,h + res 0,l + res 0,(hl) + res 0,(ix+5) + res 0,(iy+5) + res 1,a + res 1,b + res 1,c + res 1,d + res 1,e + res 1,h + res 1,l + res 1,(hl) + res 1,(ix+5) + res 1,(iy+5) + res 2,a + res 2,b + res 2,c + res 2,d + res 2,e + res 2,h + res 2,l + res 2,(hl) + res 2,(ix+5) + res 2,(iy+5) + res 3,a + res 3,b + res 3,c + res 3,d + res 3,e + res 3,h + res 3,l + res 3,(hl) + res 3,(ix+5) + res 3,(iy+5) + res 4,a + res 4,b + res 4,c + res 4,d + res 4,e + res 4,h + res 4,l + res 4,(hl) + res 4,(ix+5) + res 4,(iy+5) + res 5,a + res 5,b + res 5,c + res 5,d + res 5,e + res 5,h + res 5,l + res 5,(hl) + res 5,(ix+5) + res 5,(iy+5) + res 6,a + res 6,b + res 6,c + res 6,d + res 6,e + res 6,h + res 6,l + res 6,(hl) + res 6,(ix+5) + res 6,(iy+5) + res 7,a + res 7,b + res 7,c + res 7,d + res 7,e + res 7,h + res 7,l + res 7,(hl) + res 7,(ix+5) + res 7,(iy+5) + + set 0,a + set 0,b + set 0,c + set 0,d + set 0,e + set 0,h + set 0,l + set 0,(hl) + set 0,(ix+5) + set 0,(iy+5) + set 1,a + set 1,b + set 1,c + set 1,d + set 1,e + set 1,h + set 1,l + set 1,(hl) + set 1,(ix+5) + set 1,(iy+5) + set 2,a + set 2,b + set 2,c + set 2,d + set 2,e + set 2,h + set 2,l + set 2,(hl) + set 2,(ix+5) + set 2,(iy+5) + set 3,a + set 3,b + set 3,c + set 3,d + set 3,e + set 3,h + set 3,l + set 3,(hl) + set 3,(ix+5) + set 3,(iy+5) + set 4,a + set 4,b + set 4,c + set 4,d + set 4,e + set 4,h + set 4,l + set 4,(hl) + set 4,(ix+5) + set 4,(iy+5) + set 5,a + set 5,b + set 5,c + set 5,d + set 5,e + set 5,h + set 5,l + set 5,(hl) + set 5,(ix+5) + set 5,(iy+5) + set 6,a + set 6,b + set 6,c + set 6,d + set 6,e + set 6,h + set 6,l + set 6,(hl) + set 6,(ix+5) + set 6,(iy+5) + set 7,a + set 7,b + set 7,c + set 7,d + set 7,e + set 7,h + set 7,l + set 7,(hl) + set 7,(ix+5) + set 7,(iy+5) diff --git a/gas/testsuite/gas/z80/block.d b/gas/testsuite/gas/z80/block.d new file mode 100644 index 0000000..c334656 --- /dev/null +++ b/gas/testsuite/gas/z80/block.d @@ -0,0 +1,25 @@ +#objdump: -d +#name: block instructions + +.*: .* + +Disassembly of section .text: + +0+ <.text>: +[ ]+0:[ ]+ed a0[ ]+ldi +[ ]+2:[ ]+ed b0[ ]+ldir +[ ]+4:[ ]+ed a8[ ]+ldd +[ ]+6:[ ]+ed b8[ ]+lddr +[ ]+8:[ ]+ed a1[ ]+cpi +[ ]+a:[ ]+ed b1[ ]+cpir +[ ]+c:[ ]+ed a9[ ]+cpd +[ ]+e:[ ]+ed b9[ ]+cpdr +[ ]+10:[ ]+ed a3[ ]+outi +[ ]+12:[ ]+ed b3[ ]+otir +[ ]+14:[ ]+ed ab[ ]+outd +[ ]+16:[ ]+ed bb[ ]+otdr +[ ]+18:[ ]+ed a2[ ]+ini +[ ]+1a:[ ]+ed b2[ ]+inir +[ ]+1c:[ ]+ed aa[ ]+ind +[ ]+1e:[ ]+ed ba[ ]+indr +#pass diff --git a/gas/testsuite/gas/z80/block.s b/gas/testsuite/gas/z80/block.s new file mode 100644 index 0000000..259b204 --- /dev/null +++ b/gas/testsuite/gas/z80/block.s @@ -0,0 +1,23 @@ + .text + .org 0 +;;; block instructions + ldi + ldir + ldd + lddr + + cpi + cpir + cpd + cpdr + + outi + otir + outd + otdr + + ini + inir + ind + indr +
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/branch.d b/gas/testsuite/gas/z80/branch.d new file mode 100644 index 0000000..c3a47a1 --- /dev/null +++ b/gas/testsuite/gas/z80/branch.d @@ -0,0 +1,54 @@ +#objdump: -d +#name: branch instructions + +.*: .* + +Disassembly of section .text: + +0+ <.text>: +[ ]+0:[ ]+c3 05 84[ ]+jp 0x8405 +[ ]+3:[ ]+da 05 84[ ]+jp c,0x8405 +[ ]+6:[ ]+d2 05 84[ ]+jp nc,0x8405 +[ ]+9:[ ]+ca 05 84[ ]+jp z,0x8405 +[ ]+c:[ ]+c2 05 84[ ]+jp nz,0x8405 +[ ]+f:[ ]+ea 05 84[ ]+jp pe,0x8405 +[ ]+12:[ ]+e2 05 84[ ]+jp po,0x8405 +[ ]+15:[ ]+fa 05 84[ ]+jp m,0x8405 +[ ]+18:[ ]+f2 05 84[ ]+jp p,0x8405 +[ ]+1b:[ ]+18 e3[ ]+jr (0x)?0+ +[ ]+1d:[ ]+38 e1[ ]+jr c,(0x)?0+ +[ ]+1f:[ ]+30 df[ ]+jr nc,(0x)?0+ +[ ]+21:[ ]+28 dd[ ]+jr z,(0x)?0+ +[ ]+23:[ ]+20 db[ ]+jr nz,(0x)?0+ +[ ]+25:[ ]+e9[ ]+jp \(hl\) +[ ]+26:[ ]+dd e9[ ]+jp \(ix\) +[ ]+28:[ ]+fd e9[ ]+jp \(iy\) +[ ]+2a:[ ]+cd 05 84[ ]+call 0x8405 +[ ]+2d:[ ]+dc 05 84[ ]+call c,0x8405 +[ ]+30:[ ]+d4 05 84[ ]+call nc,0x8405 +[ ]+33:[ ]+cc 05 84[ ]+call z,0x8405 +[ ]+36:[ ]+c4 05 84[ ]+call nz,0x8405 +[ ]+39:[ ]+ec 05 84[ ]+call pe,0x8405 +[ ]+3c:[ ]+e4 05 84[ ]+call po,0x8405 +[ ]+3f:[ ]+fc 05 84[ ]+call m,0x8405 +[ ]+42:[ ]+f4 05 84[ ]+call p,0x8405 +[ ]+45:[ ]+10 b9[ ]+djnz (0x)?0+ +[ ]+47:[ ]+c9[ ]+ret +[ ]+48:[ ]+d8[ ]+ret c +[ ]+49:[ ]+d0[ ]+ret nc +[ ]+4a:[ ]+c8[ ]+ret z +[ ]+4b:[ ]+c0[ ]+ret nz +[ ]+4c:[ ]+e8[ ]+ret pe +[ ]+4d:[ ]+e0[ ]+ret po +[ ]+4e:[ ]+f8[ ]+ret m +[ ]+4f:[ ]+f0[ ]+ret p +[ ]+50:[ ]+ed 4d[ ]+reti +[ ]+52:[ ]+ed 45[ ]+retn +[ ]+54:[ ]+c7[ ]+rst (0x)?0+ +[ ]+55:[ ]+cf[ ]+rst (0x0?)?8 +[ ]+56:[ ]+d7[ ]+rst 0x10 +[ ]+57:[ ]+df[ ]+rst 0x18 +[ ]+58:[ ]+e7[ ]+rst 0x20 +[ ]+59:[ ]+ef[ ]+rst 0x28 +[ ]+5a:[ ]+f7[ ]+rst 0x30 +[ ]+5b:[ ]+ff[ ]+rst 0x38
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/branch.s b/gas/testsuite/gas/z80/branch.s new file mode 100644 index 0000000..e240934 --- /dev/null +++ b/gas/testsuite/gas/z80/branch.s @@ -0,0 +1,57 @@ + .text + .org 0 +;;; branch instructions +2: + jp 0x8405 + jp c,0x8405 + jp nc,0x8405 + jp z,0x8405 + jp nz,0x8405 + jp pe,0x8405 + jp po,0x8405 + jp m,0x8405 + jp p,0x8405 + + jr 2b + jr c,2b + jr nc,2b + jr z,2b + jr nz,2b + + jp (hl) + jp (ix) + jp (iy) + + call 0x8405 + call c,0x8405 + call nc,0x8405 + call z,0x8405 + call nz,0x8405 + call pe,0x8405 + call po,0x8405 + call m,0x8405 + call p,0x8405 + + djnz 2b + + ret + ret c + ret nc + ret z + ret nz + ret pe + ret po + ret m + ret p + + reti + retn + + rst 0h + rst 8h + rst 10h + rst 18h + rst 20h + rst 28h + rst 30h + rst 38h diff --git a/gas/testsuite/gas/z80/inout.d b/gas/testsuite/gas/z80/inout.d new file mode 100644 index 0000000..639a418 --- /dev/null +++ b/gas/testsuite/gas/z80/inout.d @@ -0,0 +1,24 @@ +#objdump: -d +#name: input and output + +.*: .* + +Disassembly of section .text: + +0+ <.text>: +[ ]+0:[ ]+db 76[ ]+in a,\(0x76\) +[ ]+2:[ ]+ed 78[ ]+in a,\(c\) +[ ]+4:[ ]+ed 40[ ]+in b,\(c\) +[ ]+6:[ ]+ed 48[ ]+in c,\(c\) +[ ]+8:[ ]+ed 50[ ]+in d,\(c\) +[ ]+a:[ ]+ed 58[ ]+in e,\(c\) +[ ]+c:[ ]+ed 60[ ]+in h,\(c\) +[ ]+e:[ ]+ed 68[ ]+in l,\(c\) +[ ]+10:[ ]+d3 76[ ]+out \(0x76\),a +[ ]+12:[ ]+ed 79[ ]+out \(c\),a +[ ]+14:[ ]+ed 41[ ]+out \(c\),b +[ ]+16:[ ]+ed 49[ ]+out \(c\),c +[ ]+18:[ ]+ed 51[ ]+out \(c\),d +[ ]+1a:[ ]+ed 59[ ]+out \(c\),e +[ ]+1c:[ ]+ed 61[ ]+out \(c\),h +[ ]+1e:[ ]+ed 69[ ]+out \(c\),l diff --git a/gas/testsuite/gas/z80/inout.s b/gas/testsuite/gas/z80/inout.s new file mode 100644 index 0000000..bbe458a --- /dev/null +++ b/gas/testsuite/gas/z80/inout.s @@ -0,0 +1,23 @@ + .text + .org 0 +;;; input + in a,(0x76) + in a,(c) + in b,(c) + in c,(c) + in d,(c) + in e,(c) + in h,(c) + in l,(c) + +;;; output + out (0x76),a + out (c),a + out (c),b + out (c),c + out (c),d + out (c),e + out (c),h + out (c),l + +
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/ld-group.d b/gas/testsuite/gas/z80/ld-group.d new file mode 100644 index 0000000..6da44b07 --- /dev/null +++ b/gas/testsuite/gas/z80/ld-group.d @@ -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:[ ]+ed 53 32 84[ ]+ld \(0x8432\),de +[ ]+fd:[ ]+22 32 84[ ]+ld \(0x8432\),hl +[ ]+100:[ ]+ed 73 32 84[ ]+ld \(0x8432\),sp +[ ]+104:[ ]+dd 22 32 84[ ]+ld \(0x8432\),ix +[ ]+108:[ ]+fd 22 32 84[ ]+ld \(0x8432\),iy +[ ]+10c:[ ]+f5[ ]+push af +[ ]+10d:[ ]+c5[ ]+push bc +[ ]+10e:[ ]+d5[ ]+push de +[ ]+10f:[ ]+e5[ ]+push hl +[ ]+110:[ ]+dd e5[ ]+push ix +[ ]+112:[ ]+fd e5[ ]+push iy +#pass
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/ld-group.s b/gas/testsuite/gas/z80/ld-group.s new file mode 100644 index 0000000..88ddf33 --- /dev/null +++ b/gas/testsuite/gas/z80/ld-group.s @@ -0,0 +1,169 @@ + .section .text + .org 0 + ;; 8-bit load group + ld a,i + ld a,r + ld a,a + ld a,b + ld a,c + ld a,d + ld a,e + ld a,h + ld a,l + ld a,(hl) + ld a,(bc) + ld a,(de) + ld a,(ix+5) + ld a,(iy+5) + ld a,(0x8405) + ld a,0x11 + + ld b,a + ld b,b + ld b,c + ld b,d + ld b,e + ld b,h + ld b,l + ld b,(hl) + ld b,(ix+5) + ld b,(iy+5) + ld b,0x11 + + ld c,a + ld c,b + ld c,c + ld c,d + ld c,e + ld c,h + ld c,l + ld c,(hl) + ld c,(ix+5) + ld c,(iy+5) + ld c,0x11 + + ld d,a + ld d,b + ld d,c + ld d,d + ld d,e + ld d,h + ld d,l + ld d,(hl) + ld d,(ix+5) + ld d,(iy+5) + ld d,0x11 + + ld e,a + ld e,b + ld e,c + ld e,d + ld e,e + ld e,h + ld e,l + ld e,(hl) + ld e,(ix+5) + ld e,(iy+5) + ld e,0x11 + + ld h,a + ld h,b + ld h,c + ld h,d + ld h,e + ld h,h + ld h,l + ld h,(hl) + ld h,(ix+5) + ld h,(iy+5) + ld h,0x11 + + ld l,a + ld l,b + ld l,c + ld l,d + ld l,e + ld l,h + ld l,l + ld l,(hl) + ld l,(ix+5) + ld l,(iy+5) + ld l,0x11 + + ld (hl),a + ld (hl),b + ld (hl),c + ld (hl),d + ld (hl),e + ld (hl),h + ld (hl),l + ld (hl),0x11 + + ld (bc),a + ld (de),a + + ld (ix+5),a + ld (ix+5),b + ld (ix+5),c + ld (ix+5),d + ld (ix+5),e + ld (ix+5),h + ld (ix+5),l + ld (ix+5),0x11 + + ld (iy+5),a + ld (iy+5),b + ld (iy+5),c + ld (iy+5),d + ld (iy+5),e + ld (iy+5),h + ld (iy+5),l + ld (iy+5),0x11 + + ld (0x8407),a + ld i,a + ld r,a + + ;; 16-bit load group --- ld, pop and push + pop af + + ld bc,0x8405 + ld bc,(0x8405) + pop bc + + ld de,0x8405 + ld de,(0x8405) + pop de + + ld hl,0x8405 + ld hl,(0x8405) + pop hl + + ld sp,hl + ld sp,ix + ld sp,iy + ld sp,0x8402 + ld sp,(0x8302) + + ld ix,0x8405 + ld ix,(0x8405) + pop ix + + ld iy,0x8405 + ld iy,(0x8405) + pop iy + + ld (0x8432),bc + ld (0x8432),de + ld (0x8432),hl + ld (0x8432),sp + ld (0x8432),ix + ld (0x8432),iy + + push af + push bc + push de + push hl + push ix + push iy + diff --git a/gas/testsuite/gas/z80/misc.d b/gas/testsuite/gas/z80/misc.d new file mode 100644 index 0000000..a22012d --- /dev/null +++ b/gas/testsuite/gas/z80/misc.d @@ -0,0 +1,26 @@ +#objdump: -d +#name: miscellaneous instructions + +.*: .* + +Disassembly of section .text: + +0+ <.text>: +[ ]+[0-9a-f]+:[ ]+08[ ]+ex af,af' +[ ]+[0-9a-f]+:[ ]+d9[ ]+exx +[ ]+[0-9a-f]+:[ ]+eb[ ]+ex de,hl +[ ]+[0-9a-f]+:[ ]+e3[ ]+ex \(sp\),hl +[ ]+[0-9a-f]+:[ ]+dd e3[ ]+ex \(sp\),ix +[ ]+[0-9a-f]+:[ ]+fd e3[ ]+ex \(sp\),iy +[ ]+[0-9a-f]+:[ ]+27[ ]+daa +[ ]+[0-9a-f]+:[ ]+2f[ ]+cpl +[ ]+[0-9a-f]+:[ ]+ed 44[ ]+neg +[ ]+[0-9a-f]+:[ ]+3f[ ]+ccf +[ ]+[0-9a-f]+:[ ]+37[ ]+scf +[ ]+[0-9a-f]+:[ ]+00[ ]+nop +[ ]+[0-9a-f]+:[ ]+76[ ]+halt +[ ]+[0-9a-f]+:[ ]+f3[ ]+di +[ ]+[0-9a-f]+:[ ]+fb[ ]+ei +[ ]+[0-9a-f]+:[ ]+ed 46[ ]+im 0 +[ ]+[0-9a-f]+:[ ]+ed 56[ ]+im 1 +[ ]+[0-9a-f]+:[ ]+ed 5e[ ]+im 2 diff --git a/gas/testsuite/gas/z80/misc.s b/gas/testsuite/gas/z80/misc.s new file mode 100644 index 0000000..0776474 --- /dev/null +++ b/gas/testsuite/gas/z80/misc.s @@ -0,0 +1,26 @@ + .text + .org 0 +;;; exchange instructions + ex af,af' + exx + ex de,hl + ex (sp),hl + ex (sp),ix + ex (sp),iy + +;;; AF operations + daa + cpl + neg + ccf + scf + +;;; CPU control + nop + halt + di + ei + im 0 + im 1 + im 2 +
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/rotate.d b/gas/testsuite/gas/z80/rotate.d new file mode 100644 index 0000000..f374322 --- /dev/null +++ b/gas/testsuite/gas/z80/rotate.d @@ -0,0 +1,86 @@ +#objdump: -d +#name: rotate and shift + +.*: .* + +Disassembly of section .text: + +0+ <.text>: + +[ ]+[0-9a-f]+:[ ]+cb 07[ ]+rlc a +[ ]+[0-9a-f]+:[ ]+cb 00[ ]+rlc b +[ ]+[0-9a-f]+:[ ]+cb 01[ ]+rlc c +[ ]+[0-9a-f]+:[ ]+cb 02[ ]+rlc d +[ ]+[0-9a-f]+:[ ]+cb 03[ ]+rlc e +[ ]+[0-9a-f]+:[ ]+cb 04[ ]+rlc h +[ ]+[0-9a-f]+:[ ]+cb 05[ ]+rlc l +[ ]+[0-9a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c +[ ]+[0-9a-f]+:[ ]+cb 3a[ ]+srl d +[ ]+[0-9a-f]+:[ ]+cb 3b[ ]+srl e +[ ]+[0-9a-f]+:[ ]+cb 3c[ ]+srl h +[ ]+[0-9a-f]+:[ ]+cb 3d[ ]+srl l +[ ]+[0-9a-f]+:[ ]+cb 3e[ ]+srl \(hl\) +[ ]+[0-9a-f]+:[ ]+dd cb 05 3e[ ]+srl \(ix\+5\) +[ ]+[0-9a-f]+:[ ]+fd cb 05 3e[ ]+srl \(iy\+5\) +[ ]+[0-9a-f]+:[ ]+07[ ]+rlca +[ ]+[0-9a-f]+:[ ]+0f[ ]+rrca +[ ]+[0-9a-f]+:[ ]+17[ ]+rla +[ ]+[0-9a-f]+:[ ]+1f[ ]+rra +[ ]+[0-9a-f]+:[ ]+ed 6f[ ]+rld +[ ]+[0-9a-f]+:[ ]+ed 67[ ]+rrd +#pass
\ No newline at end of file diff --git a/gas/testsuite/gas/z80/rotate.s b/gas/testsuite/gas/z80/rotate.s new file mode 100644 index 0000000..9e963bb --- /dev/null +++ b/gas/testsuite/gas/z80/rotate.s @@ -0,0 +1,81 @@ + .text + .org 0 +;;; Rotates and shifts + + rlc a + rlc b + rlc c + rlc d + rlc e + rlc h + rlc l + rlc (hl) + rlc (ix+5) + rlc (iy+5) + rrc a + rrc b + rrc c + rrc d + rrc e + rrc h + rrc l + rrc (hl) + rrc (ix+5) + rrc (iy+5) + rl a + rl b + rl c + rl d + rl e + rl h + rl l + rl (hl) + rl (ix+5) + rl (iy+5) + rr a + rr b + rr c + rr d + rr e + rr h + rr l + rr (hl) + rr (ix+5) + rr (iy+5) + sla a + sla b + sla c + sla d + sla e + sla h + sla l + sla (hl) + sla (ix+5) + sla (iy+5) + sra a + sra b + sra c + sra d + sra e + sra h + sra l + sra (hl) + sra (ix+5) + sra (iy+5) + srl a + srl b + srl c + srl d + srl e + srl h + srl l + srl (hl) + srl (ix+5) + srl (iy+5) + + rlca + rrca + rla + rra + rld + rrd diff --git a/gas/testsuite/gas/z80/z80.exp b/gas/testsuite/gas/z80/z80.exp index cae83f1..d595f6a 100644 --- a/gas/testsuite/gas/z80/z80.exp +++ b/gas/testsuite/gas/z80/z80.exp @@ -9,4 +9,20 @@ if [istarget z80-*-*] then { run_dump_test "suffix" # test assembling and disassembling instructions involving offsets run_dump_test "offset" +# test for data transfer instructions + run_dump_test "ld-group" +# test for block instructions + run_dump_test "block" +# test for arithmetic and logic + run_dump_test "arith" +# test for rotate and shift + run_dump_test "rotate" +# test for bit manipulations + run_dump_test "bit" +# test for branch instructions + run_dump_test "branch" +# test for input and output instructions + run_dump_test "inout" +#test for other instructions + run_dump_test "misc" } |