From: Christian Groessler Date: Sat, 4 Oct 2003 21:11:47 +0000 (+0000) Subject: 2003-10-04 Christian Groessler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=249ad7a71ffadce13e4377ee6c912e28fa8ad759;p=binutils-gdb.git 2003-10-04 Christian Groessler * 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. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 82caa448c9d..d3cf9e94b37 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,23 @@ +2003-10-04 Christian Groessler + + * 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 * gas/mips/ldstla-32-shared.d: New file. diff --git a/gas/testsuite/gas/z8k/calr-backf.s b/gas/testsuite/gas/z8k/calr-backf.s new file mode 100644 index 00000000000..817134d5482 --- /dev/null +++ b/gas/testsuite/gas/z8k/calr-backf.s @@ -0,0 +1,6 @@ +.text +dest: nop + .space 4092 + + calr dest + nop diff --git a/gas/testsuite/gas/z8k/calr-forwf.s b/gas/testsuite/gas/z8k/calr-forwf.s new file mode 100644 index 00000000000..9c52754553a --- /dev/null +++ b/gas/testsuite/gas/z8k/calr-forwf.s @@ -0,0 +1,5 @@ +.text + calr dest + .space 4098 + +dest: nop diff --git a/gas/testsuite/gas/z8k/calr.d b/gas/testsuite/gas/z8k/calr.d new file mode 100644 index 00000000000..fd6f7d8293d --- /dev/null +++ b/gas/testsuite/gas/z8k/calr.d @@ -0,0 +1,21 @@ +#as: +#objdump: -dr +#name: calr + +.*: +file format coff-z8k + +Disassembly of section \.text: + +00000000 : + 0: d803 calr 0xffc + 2: d800 calr 0x1004 + \.\.\. + +00000ffc : + ffc: d7ff calr 0x0 + ffe: 8d07 nop + 1000: 8d07 nop + 1002: 8d07 nop + +00001004 : + 1004: 8d07 nop diff --git a/gas/testsuite/gas/z8k/calr.s b/gas/testsuite/gas/z8k/calr.s new file mode 100644 index 00000000000..615b226e5ce --- /dev/null +++ b/gas/testsuite/gas/z8k/calr.s @@ -0,0 +1,12 @@ +.text +label1: calr label2 + calr label3 + .space 4088 + +label2: calr label1 + + nop + nop + nop + +label3: nop diff --git a/gas/testsuite/gas/z8k/djnz-backf.s b/gas/testsuite/gas/z8k/djnz-backf.s new file mode 100644 index 00000000000..c04f6f370b1 --- /dev/null +++ b/gas/testsuite/gas/z8k/djnz-backf.s @@ -0,0 +1,8 @@ +.text +.globl label1 +label1: nop + .space 252 + + dbjnz rl0,label1 + nop + diff --git a/gas/testsuite/gas/z8k/djnz-backf2.s b/gas/testsuite/gas/z8k/djnz-backf2.s new file mode 100644 index 00000000000..90b7fd5c06e --- /dev/null +++ b/gas/testsuite/gas/z8k/djnz-backf2.s @@ -0,0 +1,8 @@ +.text +.globl label1 +label1: nop + .space 252 + + djnz r0,label1 + nop + diff --git a/gas/testsuite/gas/z8k/djnz.d b/gas/testsuite/gas/z8k/djnz.d new file mode 100644 index 00000000000..5b6eca73caf --- /dev/null +++ b/gas/testsuite/gas/z8k/djnz.d @@ -0,0 +1,21 @@ +#as: +#objdump: -dr +#name: djnz/dbjnz + +.*: +file format coff-z8k + +Disassembly of section \.text: + +00000000 : + 0: 8d07 nop + \.\.\. + fa: f0fe djnz r0,0x0 + fc: f87f dbjnz rl0,0x0 + fe: 8d07 nop + +00000100 : + 100: 8d07 nop + \.\.\. + 1fa: f87e dbjnz rl0,0x100 + 1fc: f0ff djnz r0,0x100 + 1fe: 8d07 nop diff --git a/gas/testsuite/gas/z8k/djnz.s b/gas/testsuite/gas/z8k/djnz.s new file mode 100644 index 00000000000..1119c64e103 --- /dev/null +++ b/gas/testsuite/gas/z8k/djnz.s @@ -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 diff --git a/gas/testsuite/gas/z8k/jr-back.d b/gas/testsuite/gas/z8k/jr-back.d new file mode 100644 index 00000000000..0b80140380f --- /dev/null +++ b/gas/testsuite/gas/z8k/jr-back.d @@ -0,0 +1,15 @@ +#as: +#objdump: -dr +#name: jr backward + +.*: +file format coff-z8k + +Disassembly of section \.text: + +00000000 : + 0: 8d07 nop + \.\.\. + fa: e882 jr t,0x0 + fc: e881 jr t,0x0 + fe: e880 jr t,0x0 + 100: 8d07 nop diff --git a/gas/testsuite/gas/z8k/jr-back.s b/gas/testsuite/gas/z8k/jr-back.s index 6cab6c7152a..631e629add8 100644 --- a/gas/testsuite/gas/z8k/jr-back.s +++ b/gas/testsuite/gas/z8k/jr-back.s @@ -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 diff --git a/gas/testsuite/gas/z8k/jr-backf.s b/gas/testsuite/gas/z8k/jr-backf.s index 73e20a99be8..6cab6c7152a 100644 --- a/gas/testsuite/gas/z8k/jr-backf.s +++ b/gas/testsuite/gas/z8k/jr-backf.s @@ -1,7 +1,7 @@ .text .globl start start: nop - .space 256 + .space 254 .globl dest dest: jr t,start nop diff --git a/gas/testsuite/gas/z8k/jr-forw.d b/gas/testsuite/gas/z8k/jr-forw.d new file mode 100644 index 00000000000..6d2f4680f00 --- /dev/null +++ b/gas/testsuite/gas/z8k/jr-forw.d @@ -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 : + 100: 8d07 nop diff --git a/gas/testsuite/gas/z8k/jr-forw.s b/gas/testsuite/gas/z8k/jr-forw.s index 50c725702a8..65f333bf9e0 100644 --- a/gas/testsuite/gas/z8k/jr-forw.s +++ b/gas/testsuite/gas/z8k/jr-forw.s @@ -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 diff --git a/gas/testsuite/gas/z8k/jr-forwf.s b/gas/testsuite/gas/z8k/jr-forwf.s index d5cbc8775b0..1e4bcd46484 100644 --- a/gas/testsuite/gas/z8k/jr-forwf.s +++ b/gas/testsuite/gas/z8k/jr-forwf.s @@ -1,5 +1,5 @@ .text start: jr t,dest - .space 254 + .space 256 .globl dest dest: nop diff --git a/gas/testsuite/gas/z8k/z8k.exp b/gas/testsuite/gas/z8k/z8k.exp index af284b2befe..b50f294d959 100644 --- a/gas/testsuite/gas/z8k/z8k.exp +++ b/gas/testsuite/gas/z8k/z8k.exp @@ -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" +}