2003-10-04 Christian Groessler <chris@groessler.org>

* gas/z8k/calr-backf.s: New file.
	* gas/z8k/calr-forwf.s: New file.
	* gas/z8k/calr.d: New file.
	* gas/z8k/calr.s: New file.
	* gas/z8k/djnz-backf.s: New file.
	* gas/z8k/djnz-backf2.s: New file.
	* gas/z8k/djnz.d: New file.
	* gas/z8k/djnz.s: New file.
	* gas/z8k/jr-back.d: New file.
	* gas/z8k/jr-forw.d: New file.
	* gas/z8k/jr-back.s: Fix displacement length. Add some more jumps
	for jr-back.d.
	* gas/z8k/jr-backf.s: Fix displacement length.
	* gas/z8k/jr-forw.s: Fix displacement length. Add some more jumps
	for jr-forw.d.
	* gas/z8k/jr-forwf.s: Fix displacement length.
	* gas/z8k/z8k.exp: Run new tests.
This commit is contained in:
Christian Groessler 2003-10-04 21:11:47 +00:00
parent a72d6b4e2a
commit 249ad7a71f
16 changed files with 171 additions and 13 deletions

View File

@ -1,3 +1,23 @@
2003-10-04 Christian Groessler <chris@groessler.org>
* gas/z8k/calr-backf.s: New file.
* gas/z8k/calr-forwf.s: New file.
* gas/z8k/calr.d: New file.
* gas/z8k/calr.s: New file.
* gas/z8k/djnz-backf.s: New file.
* gas/z8k/djnz-backf2.s: New file.
* gas/z8k/djnz.d: New file.
* gas/z8k/djnz.s: New file.
* gas/z8k/jr-back.d: New file.
* gas/z8k/jr-forw.d: New file.
* gas/z8k/jr-back.s: Fix displacement length. Add some more jumps
for jr-back.d.
* gas/z8k/jr-backf.s: Fix displacement length.
* gas/z8k/jr-forw.s: Fix displacement length. Add some more jumps
for jr-forw.d.
* gas/z8k/jr-forwf.s: Fix displacement length.
* gas/z8k/z8k.exp: Run new tests.
2003-10-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* gas/mips/ldstla-32-shared.d: New file.

View File

@ -0,0 +1,6 @@
.text
dest: nop
.space 4092
calr dest
nop

View File

@ -0,0 +1,5 @@
.text
calr dest
.space 4098
dest: nop

View File

@ -0,0 +1,21 @@
#as:
#objdump: -dr
#name: calr
.*: +file format coff-z8k
Disassembly of section \.text:
00000000 <label1>:
0: d803 calr 0xffc
2: d800 calr 0x1004
\.\.\.
00000ffc <label2>:
ffc: d7ff calr 0x0
ffe: 8d07 nop
1000: 8d07 nop
1002: 8d07 nop
00001004 <label3>:
1004: 8d07 nop

View File

@ -0,0 +1,12 @@
.text
label1: calr label2
calr label3
.space 4088
label2: calr label1
nop
nop
nop
label3: nop

View File

@ -0,0 +1,8 @@
.text
.globl label1
label1: nop
.space 252
dbjnz rl0,label1
nop

View File

@ -0,0 +1,8 @@
.text
.globl label1
label1: nop
.space 252
djnz r0,label1
nop

View File

@ -0,0 +1,21 @@
#as:
#objdump: -dr
#name: djnz/dbjnz
.*: +file format coff-z8k
Disassembly of section \.text:
00000000 <label1>:
0: 8d07 nop
\.\.\.
fa: f0fe djnz r0,0x0
fc: f87f dbjnz rl0,0x0
fe: 8d07 nop
00000100 <label2>:
100: 8d07 nop
\.\.\.
1fa: f87e dbjnz rl0,0x100
1fc: f0ff djnz r0,0x100
1fe: 8d07 nop

View File

@ -0,0 +1,15 @@
.text
.globl label1
label1: nop
.space 248
djnz r0,label1
dbjnz rl0,label1
nop
label2: nop
.space 248
dbjnz rl0,label2
djnz r0,label2
nop

View File

@ -0,0 +1,15 @@
#as:
#objdump: -dr
#name: jr backward
.*: +file format coff-z8k
Disassembly of section \.text:
00000000 <start>:
0: 8d07 nop
\.\.\.
fa: e882 jr t,0x0
fc: e881 jr t,0x0
fe: e880 jr t,0x0
100: 8d07 nop

View File

@ -1,7 +1,9 @@
.text
.globl start
start: nop
.space 254
.globl dest
dest: jr t,start
.space 248
jr t,start
jr t,start
jr t,start
nop

View File

@ -1,7 +1,7 @@
.text
.globl start
start: nop
.space 256
.space 254
.globl dest
dest: jr t,start
nop

View File

@ -0,0 +1,16 @@
#as:
#objdump: -dr
#name: jr forward
.*: +file format coff-z8k
Disassembly of section \.text:
00000000 <.text>:
0: e87f jr t,0x100
2: e87e jr t,0x100
4: e87d jr t,0x100
\.\.\.
00000100 <dest>:
100: 8d07 nop

View File

@ -1,5 +1,7 @@
.text
start: jr t,dest
.space 252
jr t,dest ! max. displacement
jr t,dest
jr t,dest
.space 250
.globl dest
dest: nop

View File

@ -1,5 +1,5 @@
.text
start: jr t,dest
.space 254
.space 256
.globl dest
dest: nop

View File

@ -6,12 +6,14 @@ if [istarget z8k-*-*] then {
gas_test "eidi.s" "" "" "EI/DI operands"
gas_test_error "eidif.s" "" "EI/DI operands"
# JR range test
# pcrel range test
gas_test_error "jr-forwf.s" "" "relative jump out of range"
gas_test_error "jr-backf.s" "" "relative jump out of range"
gas_test "jr-forw.s" "" "" "relative jump in range"
gas_test "jr-back.s" "" "" "relative jump in range"
gas_test_error "jr-forwf.s" "" "relative jump out of range (jr)"
gas_test_error "jr-backf.s" "" "relative jump out of range (jr)"
gas_test_error "djnz-backf.s" "" "relative jump out of range (djnz)"
gas_test_error "djnz-backf2.s" "" "relative jump out of range (djnz)"
gas_test_error "calr-forwf.s" "" "relative jump out of range (calr)"
gas_test_error "calr-backf.s" "" "relative jump out of range (calr)"
# 4 bit argument tests
@ -28,5 +30,10 @@ if [istarget z8k-*-*] then {
run_dump_test "inout"
}
# pcrel tests
run_dump_test "jr-forw"
run_dump_test "jr-back"
run_dump_test "djnz"
run_dump_test "calr"
}