From: Arnold Metselaar Date: Sun, 6 May 2012 10:56:25 +0000 (+0000) Subject: 2012-05-06 Arnold Metselaar X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=35c011e3167c5aa85d722bd8fcaa7daa9fed3ae4;p=binutils-gdb.git 2012-05-06 Arnold Metselaar * gas/z80/jr-forwf.s: New file, adapted from z8k version. * gas/z80/jr-backf.s: Likewise. * gas/z80/djnz-backf.s: Likewise. * gas/z80/ill_op: New file, with illegal operand. * gas/z80/z80.exp: Run new tests. --- diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 9d394a3da1f..0fd88fe1028 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-05-06 Arnold Metselaar + + * gas/z80/jr-forwf.s: New file, adapted from z8k version. + * gas/z80/jr-backf.s: Likewise. + * gas/z80/djnz-backf.s: Likewise. + * gas/z80/ill_op: New file, with illegal operand. + * gas/z80/z80.exp: Run new tests. + 2012-05-03 Sean Keys * gas/all/gas.exp: Added xgate tex entry. diff --git a/gas/testsuite/gas/z80/djnz-backf.s b/gas/testsuite/gas/z80/djnz-backf.s new file mode 100644 index 00000000000..5264d785b54 --- /dev/null +++ b/gas/testsuite/gas/z80/djnz-backf.s @@ -0,0 +1,8 @@ +.text +.globl label1 +label1: nop + .space 126 + + djnz label1 + nop + diff --git a/gas/testsuite/gas/z80/ill_op.s b/gas/testsuite/gas/z80/ill_op.s new file mode 100644 index 00000000000..e4b699d5093 --- /dev/null +++ b/gas/testsuite/gas/z80/ill_op.s @@ -0,0 +1,2 @@ +.text + LD HL,(SP+0) diff --git a/gas/testsuite/gas/z80/jr-backf.s b/gas/testsuite/gas/z80/jr-backf.s new file mode 100644 index 00000000000..a2fa65e6adc --- /dev/null +++ b/gas/testsuite/gas/z80/jr-backf.s @@ -0,0 +1,7 @@ +.text +.globl start +start: nop + .space 126 +.globl dest +dest: jr z,start + nop diff --git a/gas/testsuite/gas/z80/jr-forwf.s b/gas/testsuite/gas/z80/jr-forwf.s new file mode 100644 index 00000000000..009959e2c85 --- /dev/null +++ b/gas/testsuite/gas/z80/jr-forwf.s @@ -0,0 +1,5 @@ +.text +start: jr c,dest + .space 128 +.globl dest +dest: nop diff --git a/gas/testsuite/gas/z80/z80.exp b/gas/testsuite/gas/z80/z80.exp index 43a3360ea60..373b07f2a21 100644 --- a/gas/testsuite/gas/z80/z80.exp +++ b/gas/testsuite/gas/z80/z80.exp @@ -11,6 +11,10 @@ if [istarget z80-*-*] then { run_dump_test "suffix" # test assembling and disassembling instructions involving offsets run_dump_test "offset" + 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)" + # test assembling instruction with offset that is a label defined later run_dump_test "atend" # test for data transfer instructions @@ -29,4 +33,5 @@ if [istarget z80-*-*] then { run_dump_test "inout" #test for other instructions run_dump_test "misc" + gas_test_error "ill_op.s" "" "Illegal operand: ld hl,(sp+0)" }