From 7239c2977568dee2a20f8952efc5a2d935d9ab7f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 8 Aug 1995 02:43:30 +0000 Subject: [PATCH] * gas/m68k/operands.s, gas/m68k/operands.d: New test. * gas/m68k/op68000.d: New test. * gas/m68k/cas.s, gas/m68k/cas.d: New test. * gas/m68k/bitfield.s, gas/m68k/bitfield.d: New test. * gas/m68k/schwab.d: Run objdump with -j .text. Adjust for changes to disassembler. * gas/m68k/all.exp: Run new tests. Run schwab test for m68k-*-coff*. --- gas/testsuite/ChangeLog | 11 ++ gas/testsuite/gas/m68k/.Sanitize | 7 + gas/testsuite/gas/m68k/all.exp | 41 +++++ gas/testsuite/gas/m68k/bitfield.d | 28 +++ gas/testsuite/gas/m68k/bitfield.s | 24 +++ gas/testsuite/gas/m68k/cas.d | 20 +++ gas/testsuite/gas/m68k/cas.s | 16 ++ gas/testsuite/gas/m68k/op68000.d | 188 ++++++++++++++++++++ gas/testsuite/gas/m68k/operands.d | 242 ++++++++++++++++++++++++++ gas/testsuite/gas/m68k/operands.s | 273 ++++++++++++++++++++++++++++++ gas/testsuite/gas/m68k/schwab.d | 79 +++++---- 11 files changed, 889 insertions(+), 40 deletions(-) create mode 100644 gas/testsuite/gas/m68k/all.exp create mode 100644 gas/testsuite/gas/m68k/bitfield.d create mode 100644 gas/testsuite/gas/m68k/bitfield.s create mode 100644 gas/testsuite/gas/m68k/cas.d create mode 100644 gas/testsuite/gas/m68k/cas.s create mode 100644 gas/testsuite/gas/m68k/op68000.d create mode 100644 gas/testsuite/gas/m68k/operands.d create mode 100644 gas/testsuite/gas/m68k/operands.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 0e2428331c8..dc43889123a 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,14 @@ +Mon Aug 7 22:39:28 1995 Ian Lance Taylor + + * gas/m68k/operands.s, gas/m68k/operands.d: New test. + * gas/m68k/op68000.d: New test. + * gas/m68k/cas.s, gas/m68k/cas.d: New test. + * gas/m68k/bitfield.s, gas/m68k/bitfield.d: New test. + * gas/m68k/schwab.d: Run objdump with -j .text. Adjust for + changes to disassembler. + * gas/m68k/all.exp: Run new tests. Run schwab test for + m68k-*-coff*. + start-sanitize-sh3e Mon Aug 7 03:01:32 1995 Jeff Law (law@snake.cs.utah.edu) diff --git a/gas/testsuite/gas/m68k/.Sanitize b/gas/testsuite/gas/m68k/.Sanitize index 611d3dbf0ac..154caa176f1 100644 --- a/gas/testsuite/gas/m68k/.Sanitize +++ b/gas/testsuite/gas/m68k/.Sanitize @@ -26,7 +26,14 @@ Do-first: Things-to-keep: all.exp +bitfield.d +bitfield.s +cas.d +cas.s disperr.s +op68000.d +operands.d +operands.s p2410.s p2663.s pic1.s diff --git a/gas/testsuite/gas/m68k/all.exp b/gas/testsuite/gas/m68k/all.exp new file mode 100644 index 00000000000..9b38aff71c6 --- /dev/null +++ b/gas/testsuite/gas/m68k/all.exp @@ -0,0 +1,41 @@ +# +# Some generic m68k tests +# +if [istarget m68*-*-*] then { + gas_test "t2.s" "" "" "cross-section branch" + + gas_test "pic1.s" "" "" "PIC generation" + + gas_test "disperr.s" "" "" "Incorrect Displacement too long error" + + gas_test_error "p2410.s" "" "out-of-range 'bras'" + + if [expr [istarget m68*-*-hpux] || [istarget m68*-*-sun*] \ + || [istarget m68*-*-*aout*] \ + || [istarget m68*-*-coff*] \ + || [istarget m68*-*-vxworks5.1] \ + ] then { + run_dump_test "schwab" + } + + run_dump_test operands + run_dump_test cas + run_dump_test bitfield + + set testname "68000 operands" + gas_run "operands.s" "-m68000" "2>err.out" + if ![string match "child process exited abnormally" $comp_output] then { + send_log "$comp_output\n" + verbose "$comp_output" 3 + fail $testname + } else { + if [regexp_diff "err.out" "$srcdir$subdir/op68000.d"] then { + fail $testname + } else { + pass $testname + } + } +} +if [info exists errorInfo] then { + unset errorInfo + } diff --git a/gas/testsuite/gas/m68k/bitfield.d b/gas/testsuite/gas/m68k/bitfield.d new file mode 100644 index 00000000000..52990e4c332 --- /dev/null +++ b/gas/testsuite/gas/m68k/bitfield.d @@ -0,0 +1,28 @@ +#objdump: -d +#name: bitfield + +# Test handling of bitfield instruction operands. + +.*: +file format .* + +Disassembly of section .text: +0+000 bfexts %a0@,1,2,%d0 +0+004 bfexts %a0@,1,6,%d0 +0+008 bfexts %a0@,3,2,%d0 +0+00c bfexts %a0@,3,6,%d0 +0+010 bfexts %a0@,1,2,%d0 +0+014 bfexts %a0@,1,6,%d0 +0+018 bfexts %a0@,3,2,%d0 +0+01c bfexts %a0@,3,6,%d0 +0+020 bfset %a0@,1,2 +0+024 bfset %a0@,1,6 +0+028 bfset %a0@,3,2 +0+02c bfset %a0@,3,6 +0+030 bfset %a0@,1,2 +0+034 bfset %a0@,1,6 +0+038 bfset %a0@,3,2 +0+03c bfset %a0@,3,6 +0+040 bfexts %a0@,%d1,%d2,%d0 +0+044 bfexts %a0@,%d1,%d2,%d0 +0+048 bfset %a0@,%d1,%d2 +0+04c bfset %a0@,%d1,%d2 diff --git a/gas/testsuite/gas/m68k/bitfield.s b/gas/testsuite/gas/m68k/bitfield.s new file mode 100644 index 00000000000..1f6a01bf3e7 --- /dev/null +++ b/gas/testsuite/gas/m68k/bitfield.s @@ -0,0 +1,24 @@ +# Test handling of bitfield instruction operands. + .text + .globl foo +foo: + bfexts (%a0){#1:#2},%d0 + bfexts (%a0){#1:#(2+4)},%d0 + bfexts (%a0){#(1+2):#2},%d0 + bfexts (%a0){#(1+2):#(2+4)},%d0 + bfexts %a0@,#1,#2,%d0 + bfexts %a0@,#1,#(2+4),%d0 + bfexts %a0@,#1+2,#2,%d0 + bfexts %a0@,#(1+2),#(2+4),%d0 + bfset (%a0){#1:#2} + bfset (%a0){#1:#(2+4)} + bfset (%a0){#(1+2):#2} + bfset (%a0){#(1+2):#(2+4)} + bfset %a0@,#1,#2 + bfset %a0@,#1,#(2+4) + bfset %a0@,#1+2,#2 + bfset %a0@,#(1+2),#(2+4) + bfexts (%a0){%d1:%d2},%d0 + bfexts %a0@,%d1,%d2,%d0 + bfset (%a0){%d1:%d2} + bfset %a0@,%d1,%d2 diff --git a/gas/testsuite/gas/m68k/cas.d b/gas/testsuite/gas/m68k/cas.d new file mode 100644 index 00000000000..f7ef17638d6 --- /dev/null +++ b/gas/testsuite/gas/m68k/cas.d @@ -0,0 +1,20 @@ +#objdump: -d +#name: cas + +# Test parsing of the operands of the cas instruction + +.*: +file format .* + +Disassembly of section .text: +0+000 casw %d0,%d1,%a0@ +0+004 casw %d0,%d1,%a0@ +0+008 cas2w %d0,%d2,%d3,%d4,%a0@,%a1@ +0+00e cas2w %d0,%d2,%d3,%d4,@\(%d0\),@\(%d1\) +0+014 cas2w %d0,%d2,%d3,%d4,%a0@,%a1@ +0+01a cas2w %d0,%d2,%d3,%d4,%a0@,%a1@ +0+020 cas2w %d0,%d2,%d3,%d4,@\(%d0\),@\(%d1\) +0+026 cas2w %d0,%d2,%d3,%d4,%a0@,%a1@ +0+02c cas2w %d0,%d2,%d3,%d4,@\(%d0\),@\(%d1\) +0+032 cas2w %d0,%d2,%d3,%d4,%a0@,%a1@ +0+038 cas2w %d0,%d2,%d3,%d4,%a0@,%a1@ +0+03e cas2w %d0,%d2,%d3,%d4,@\(%d0\),@\(%d1\) diff --git a/gas/testsuite/gas/m68k/cas.s b/gas/testsuite/gas/m68k/cas.s new file mode 100644 index 00000000000..f64e7f54c3c --- /dev/null +++ b/gas/testsuite/gas/m68k/cas.s @@ -0,0 +1,16 @@ +# Test parsing of the operands of the cas instruction + .text + .globl foo +foo: + cas %d0,%d1,(%a0) + cas %d0,%d1,%a0@ + cas2 %d0:%d2,%d3:%d4,(%a0):(%a1) + cas2 %d0:%d2,%d3:%d4,(%d0):(%d1) + cas2 %d0:%d2,%d3:%d4,%a0@:%a1@ + cas2 %d0:%d2,%d3:%d4,@(%a0):@(%a1) + cas2 %d0:%d2,%d3:%d4,@(%d0):@(%d1) + cas2 %d0,%d2,%d3,%d4,(%a0),(%a1) + cas2 %d0,%d2,%d3,%d4,(%d0),(%d1) + cas2 %d0,%d2,%d3,%d4,%a0@,%a1@ + cas2 %d0,%d2,%d3,%d4,@(%a0),@(%a1) + cas2 %d0,%d2,%d3,%d4,@(%d0),@(%d1) diff --git a/gas/testsuite/gas/m68k/op68000.d b/gas/testsuite/gas/m68k/op68000.d new file mode 100644 index 00000000000..0845d2bdae7 --- /dev/null +++ b/gas/testsuite/gas/m68k/op68000.d @@ -0,0 +1,188 @@ +# This should match the stderr output of gas -m68000 on operands.s. +# We don't bother to match the exact error message, but instead just +# look for the statements which should fail. + +.*operands.s: Assembler messages: +.*statement `tstl %a0@\(8,%d0:w:2\)' ignored +.*statement `tstl %a0@\(8,%d0:w:4\)' ignored +.*statement `tstl %a0@\(8,%d0:w:8\)' ignored +.*statement `tstl %a0@\(8,%d0:l:2\)' ignored +.*statement `tstl %a0@\(8,%d0:l:4\)' ignored +.*statement `tstl %a0@\(8,%d0:l:8\)' ignored +.*statement `tstl %a0@\(%d0:w:2\)' ignored +.*statement `tstl \(8,%a0,%d0\*2\)' ignored +.*statement `tstl \(8,%a0,%d0\*4\)' ignored +.*statement `tstl \(8,%a0,%d0\*8\)' ignored +.*statement `tstl \(8,%a0,%d0.w\*2\)' ignored +.*statement `tstl \(8,%a0,%d0.w\*4\)' ignored +.*statement `tstl \(8,%a0,%d0.w\*8\)' ignored +.*statement `tstl \(8,%a0,%d0.l\*2\)' ignored +.*statement `tstl \(8,%a0,%d0.l\*4\)' ignored +.*statement `tstl \(8,%a0,%d0.l\*8\)' ignored +.*statement `tstl \(8,%a1.w\*2,%a0\)' ignored +.*statement `tstl 8\(%a0,%d0.w\*2\)' ignored +.*statement `tstl 8\(%d0.w\*2,%a0\)' ignored +.*statement `tstl 8\(%a1.w\*2,%a0\)' ignored +.*statement `tstl \(%a0,%d0.w\*2\)' ignored +.*statement `tstl \(%d0.w\*2,%a0\)' ignored +.*statement `tstl %a0@\(1000,%d0:w:2\)' ignored +.*statement `tstl @\(1000,%d0:w:2\)' ignored +.*statement `tstl @\(%d0:w:2\)' ignored +.*statement `tstl @\(1000\)' ignored +.*statement `tstl \(1000,%a0,%d0.w\*2\)' ignored +.*statement `tstl \(1000,%d0,%a0\)' ignored +.*statement `tstl \(1000,%a1.w\*2,%a0\)' ignored +.*statement `tstl 1000\(%a0,%d0.w\*2\)' ignored +.*statement `tstl 1000\(%d0,%a0\)' ignored +.*statement `tstl \(1000,%d0.w\*2\)' ignored +.*statement `tstl 1000\(%d0.w\*2\)' ignored +.*statement `tstl \(%d0.w\*2\)' ignored +.*statement `tstl %za1@\(1000,%d0:w:2\)' ignored +.*statement `tstl %za1@\(100000\)' ignored +.*statement `tstl \(1000,%za1,%d0.w\*2\)' ignored +.*statement `tstl \(1000,%d0,%za1\)' ignored +.*statement `tstl \(1000,%a1.w\*2,%za1\)' ignored +.*statement `tstl 1000\(%za1,%d0.w\*2\)' ignored +.*statement `tstl 1000\(%d0,%za1\)' ignored +.*statement `tstl \(100000,%za1\)' ignored +.*statement `tstl 100000\(%za1\)' ignored +.*statement `tstl %a0@\(1000,%zd1:w:2\)' ignored +.*statement `tstl @\(1000,%zd1:w:2\)' ignored +.*statement `tstl @\(%zd1:w:2\)' ignored +.*statement `tstl \(1000,%a0,%zd1.w\*2\)' ignored +.*statement `tstl \(1000,%zd1,%a0\)' ignored +.*statement `tstl \(1000,%za1.w\*2,%a0\)' ignored +.*statement `tstl 1000\(%a0,%zd1.w\*2\)' ignored +.*statement `tstl 1000\(%zd1,%a0\)' ignored +.*statement `tstl \(1000,%zd1.w\*2\)' ignored +.*statement `tstl 1000\(%zd1.w\*2\)' ignored +.*statement `tstl \(%zd1.w\*2\)' ignored +.*statement `tstl %a0@\(1000\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl %a0@\(1000\)@\(%d0:w:2\)' ignored +.*statement `tstl %a0@\(1000\)@\(2000\)' ignored +.*statement `tstl @\(1000\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl @\(1000\)@\(%d0:w:2\)' ignored +.*statement `tstl @\(1000\)@\(2000\)' ignored +.*statement `tstl %a0@\(0\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl %a0@\(0\)@\(%d0:w:2\)' ignored +.*statement `tstl %a0@\(0\)@\(2000\)' ignored +.*statement `tstl @\(0\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl @\(0\)@\(%d0:w:2\)' ignored +.*statement `tstl @\(0\)@\(2000\)' ignored +.*statement `tstl \(\[1000,%a0\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[1000,%a0\],%d0:w:2\)' ignored +.*statement `tstl \(\[1000,%a0\],2000\)' ignored +.*statement `tstl \(\[1000\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[1000\],%d0:w:2\)' ignored +.*statement `tstl \(\[1000\],2000\)' ignored +.*statement `tstl \(\[%a0\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[%a0\],%d0:w:2\)' ignored +.*statement `tstl \(\[%a0\],2000\)' ignored +.*statement `tstl \(\[0\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[0\],%d0:w:2\)' ignored +.*statement `tstl \(\[0\],2000\)' ignored +.*statement `tstl %a0@\(1000,%d0:w:2\)@\(2000\)' ignored +.*statement `tstl %a0@\(1000,%d0:w:2\)@\(0\)' ignored +.*statement `tstl @\(1000,%d0:w:2\)@\(2000\)' ignored +.*statement `tstl @\(1000,%d0:w:2\)@\(0\)' ignored +.*statement `tstl %a0@\(%d0:w:2\)@\(2000\)' ignored +.*statement `tstl %a0@\(%d0:w:2\)@\(0\)' ignored +.*statement `tstl @\(%d0:w:2\)@\(2000\)' ignored +.*statement `tstl @\(%d0:w:2\)@\(0\)' ignored +.*statement `tstl \(\[1000,%a0,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[1000,%d0:w:2,%a0\],2000\)' ignored +.*statement `tstl \(\[1000,%d0,%a0\],2000\)' ignored +.*statement `tstl \(\[1000,%a1,%a0\],2000\)' ignored +.*statement `tstl \(\[1000,%a1:w:2,%a0\],2000\)' ignored +.*statement `tstl \(\[1000,%a0,%d0:w:2\]\)' ignored +.*statement `tstl \(\[1000,%d0,%a0\]\)' ignored +.*statement `tstl \(\[1000,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[1000,%d0:w:2\]\)' ignored +.*statement `tstl \(\[%a0,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[%d0,%a0\],2000\)' ignored +.*statement `tstl \(\[%a0,%d0:w:2\]\)' ignored +.*statement `tstl \(\[%d0,%a0\]\)' ignored +.*statement `tstl \(\[%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[%d0:w:2\]\)' ignored +.*statement `tstl %pc@\(8,%d0:w:2\)' ignored +.*statement `tstl %pc@\(%d0:w:2\)' ignored +.*statement `tstl \(8,%pc,%d0.w\*2\)' ignored +.*statement `tstl 8\(%pc,%d0.w\*2\)' ignored +.*statement `tstl \(%pc,%d0.w\*2\)' ignored +.*statement `tstl %pc@\(1000,%d0:w:2\)' ignored +.*statement `tstl \(1000,%pc,%d0.w\*2\)' ignored +.*statement `tstl \(1000,%d0,%pc\)' ignored +.*statement `tstl \(1000,%a1.w\*2,%pc\)' ignored +.*statement `tstl \(1000,%a1,%pc\)' ignored +.*statement `tstl 1000\(%pc,%d0.w\*2\)' ignored +.*statement `tstl 1000\(%d0,%pc\)' ignored +.*statement `tstl 1000\(%a1,%pc\)' ignored +.*statement `tstl %zpc@\(1000,%d0:w:2\)' ignored +.*statement `tstl %zpc@\(100000\)' ignored +.*statement `tstl \(1000,%zpc,%d0.w\*2\)' ignored +.*statement `tstl \(1000,%d0,%zpc\)' ignored +.*statement `tstl \(1000,%a1.w\*2,%zpc\)' ignored +.*statement `tstl \(1000,%a1,%zpc\)' ignored +.*statement `tstl 1000\(%zpc,%d0.w\*2\)' ignored +.*statement `tstl 1000\(%d0,%zpc\)' ignored +.*statement `tstl 1000\(%a1,%zpc\)' ignored +.*statement `tstl \(100000,%zpc\)' ignored +.*statement `tstl 100000\(%zpc\)' ignored +.*statement `tstl %pc@\(1000\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl %pc@\(1000\)@\(%d0:w:2\)' ignored +.*statement `tstl %pc@\(1000\)@\(2000\)' ignored +.*statement `tstl %pc@\(0\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl %pc@\(0\)@\(%d0:w:2\)' ignored +.*statement `tstl %pc@\(0\)@\(2000\)' ignored +.*statement `tstl \(\[1000,%pc\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[1000,%pc\],%d0:w:2\)' ignored +.*statement `tstl \(\[1000,%pc\],2000\)' ignored +.*statement `tstl \(\[%pc\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[%pc\],%d0:w:2\)' ignored +.*statement `tstl \(\[%pc\],2000\)' ignored +.*statement `tstl %zpc@\(1000\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl %zpc@\(1000\)@\(%d0:w:2\)' ignored +.*statement `tstl %zpc@\(1000\)@\(2000\)' ignored +.*statement `tstl %zpc@\(0\)@\(2000,%d0:w:2\)' ignored +.*statement `tstl %zpc@\(0\)@\(%d0:w:2\)' ignored +.*statement `tstl %zpc@\(0\)@\(2000\)' ignored +.*statement `tstl \(\[1000,%zpc\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[1000,%zpc\],%d0:w:2\)' ignored +.*statement `tstl \(\[1000,%zpc\],2000\)' ignored +.*statement `tstl \(\[%zpc\],%d0:w:2,2000\)' ignored +.*statement `tstl \(\[%zpc\],%d0:w:2\)' ignored +.*statement `tstl \(\[%zpc\],2000\)' ignored +.*statement `tstl %pc@\(1000,%d0:w:2\)@\(2000\)' ignored +.*statement `tstl %pc@\(1000,%d0:w:2\)@\(0\)' ignored +.*statement `tstl %pc@\(%d0:w:2\)@\(2000\)' ignored +.*statement `tstl %pc@\(%d0:w:2\)@\(0\)' ignored +.*statement `tstl \(\[1000,%pc,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[1000,%d0:w:2,%pc\],2000\)' ignored +.*statement `tstl \(\[1000,%d0,%pc\],2000\)' ignored +.*statement `tstl \(\[1000,%a1,%pc\],2000\)' ignored +.*statement `tstl \(\[1000,%pc,%a1\],2000\)' ignored +.*statement `tstl \(\[1000,%a1:w:2,%pc\],2000\)' ignored +.*statement `tstl \(\[1000,%pc,%d0:w:2\]\)' ignored +.*statement `tstl \(\[1000,%d0,%pc\]\)' ignored +.*statement `tstl \(\[1000,%a1,%pc\]\)' ignored +.*statement `tstl \(\[%pc,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[%pc,%a0\],2000\)' ignored +.*statement `tstl \(\[%pc,%d0:w:2\]\)' ignored +.*statement `tstl \(\[%d0,%pc\]\)' ignored +.*statement `tstl %zpc@\(1000,%d0:w:2\)@\(2000\)' ignored +.*statement `tstl %zpc@\(1000,%d0:w:2\)@\(0\)' ignored +.*statement `tstl %zpc@\(%d0:w:2\)@\(2000\)' ignored +.*statement `tstl %zpc@\(%d0:w:2\)@\(0\)' ignored +.*statement `tstl \(\[1000,%zpc,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[1000,%d0:w:2,%zpc\],2000\)' ignored +.*statement `tstl \(\[1000,%d0,%zpc\],2000\)' ignored +.*statement `tstl \(\[1000,%a1,%zpc\],2000\)' ignored +.*statement `tstl \(\[1000,%zpc,%a1\],2000\)' ignored +.*statement `tstl \(\[1000,%a1:w:2,%zpc\],2000\)' ignored +.*statement `tstl \(\[1000,%zpc,%d0:w:2\]\)' ignored +.*statement `tstl \(\[1000,%d0,%zpc\]\)' ignored +.*statement `tstl \(\[1000,%a1,%zpc\]\)' ignored +.*statement `tstl \(\[%zpc,%d0:w:2\],2000\)' ignored +.*statement `tstl \(\[%zpc,%a0\],2000\)' ignored +.*statement `tstl \(\[%zpc,%d0:w:2\]\)' ignored +.*statement `tstl \(\[%d0,%zpc\]\)' ignored diff --git a/gas/testsuite/gas/m68k/operands.d b/gas/testsuite/gas/m68k/operands.d new file mode 100644 index 00000000000..31a6aec0c7b --- /dev/null +++ b/gas/testsuite/gas/m68k/operands.d @@ -0,0 +1,242 @@ +#objdump: -d +#name: operands + +# Test handling of MIT and Motorola syntax operands +# If you change this file, see also op68000.d. + +.*: +file format .* + +Disassembly of section .text: +0+000 tstl %d0 +0+002 tstl %a0 +0+004 tstl %a0@ +0+006 tstl %a0@ +0+008 tstl %a0@\+ +0+00a tstl %a0@\+ +0+00c tstl %a0@- +0+00e tstl %a0@- +0+010 tstl %a0@\(8\) +0+014 tstl %a0@\(8\) +0+018 tstl %a0@\(8\) +0+01c tstl %a0@\(0+008,%d0:l\) +0+020 tstl %a0@\(0+008,%d0:w\) +0+024 tstl %a0@\(0+008,%d0:w\) +0+028 tstl %a0@\(0+008,%d0:w:2\) +0+02c tstl %a0@\(0+008,%d0:w:4\) +0+030 tstl %a0@\(0+008,%d0:w:8\) +0+034 tstl %a0@\(0+008,%d0:l\) +0+038 tstl %a0@\(0+008,%d0:l\) +0+03c tstl %a0@\(0+008,%d0:l:2\) +0+040 tstl %a0@\(0+008,%d0:l:4\) +0+044 tstl %a0@\(0+008,%d0:l:8\) +0+048 tstl %a0@\(0+000,%d0:w:2\) +0+04c tstl %a0@\(0+008,%d0:l\) +0+050 tstl %a0@\(0+008,%d0:l\) +0+054 tstl %a0@\(0+008,%d0:l:2\) +0+058 tstl %a0@\(0+008,%d0:l:4\) +0+05c tstl %a0@\(0+008,%d0:l:8\) +0+060 tstl %a0@\(0+008,%d0:w\) +0+064 tstl %a0@\(0+008,%d0:w\) +0+068 tstl %a0@\(0+008,%d0:w:2\) +0+06c tstl %a0@\(0+008,%d0:w:4\) +0+070 tstl %a0@\(0+008,%d0:w:8\) +0+074 tstl %a0@\(0+008,%d0:l\) +0+078 tstl %a0@\(0+008,%d0:l\) +0+07c tstl %a0@\(0+008,%d0:l:2\) +0+080 tstl %a0@\(0+008,%d0:l:4\) +0+084 tstl %a0@\(0+008,%d0:l:8\) +0+088 tstl %a0@\(0+008,%d0:l\) +0+08c tstl %a0@\(0+008,%a1:w:2\) +0+090 tstl %a1@\(0+008,%a0:l\) +0+094 tstl %a0@\(0+008,%d0:w:2\) +0+098 tstl %a0@\(0+008,%d0:w:2\) +0+09c tstl %a0@\(0+008,%a1:w:2\) +0+0a0 tstl %a0@\(0+000,%d0:w:2\) +0+0a4 tstl %a0@\(0+000,%d0:w:2\) +0+0a8 tstl %a0@\(0+3e8,%d0:w:2\) +0+0ae tstl @\(0+3e8,%d0:w:2\) +0+0b4 tstl @\(0+000,%d0:w:2\) +0+0b8 tstl @\(0+3e8\) +0+0be tstl %a0@\(0+186a0\) +0+0c6 tstl %a0@\(0+3e8,%d0:w:2\) +0+0cc tstl %a0@\(0+3e8,%d0:l\) +0+0d2 tstl %a0@\(0+3e8,%a1:w:2\) +0+0d8 tstl %a0@\(0+3e8,%d0:w:2\) +0+0de tstl %a0@\(0+3e8,%d0:l\) +0+0e4 tstl @\(0+3e8,%d0:w:2\) +0+0ea tstl @\(0+3e8,%d0:w:2\) +0+0f0 tstl @\(0+000,%d0:w:2\) +0+0f4 tstl %a0@\(0+186a0\) +0+0fc tstl %a0@\(0+186a0\) +0+104 tstl @\(0+3e8,%d0:w:2\) +0+10a tstl @\(0+186a0\) +0+112 tstl @\(0+3e8,%d0:w:2\) +0+118 tstl @\(0+3e8,%d0:l\) +0+11e tstl @\(0+3e8,%a1:w:2\) +0+124 tstl @\(0+3e8,%d0:w:2\) +0+12a tstl @\(0+3e8,%d0:l\) +0+130 tstl @\(0+186a0\) +0+138 tstl @\(0+186a0\) +0+140 tstl %a0@\(0+3e8\) +0+146 tstl @\(0+3e8\) +0+14c tstl @\(0+000\) +0+150 tstl %a0@\(0+3e8\) +0+156 tstl %a0@\(0+3e8\) +0+15c tstl %a0@\(0+3e8\) +0+162 tstl %a0@\(0+3e8\) +0+168 tstl %a0@\(0+3e8\) +0+16e tstl @\(0+3e8\) +0+174 tstl @\(0+3e8\) +0+17a tstl @\(0+000\) +0+17e tstl %a0@\(0+3e8\)@\(0+7d0,%d0:w:2\) +0+186 tstl %a0@\(0+3e8\)@\(0+000,%d0:w:2\) +0+18c tstl %a0@\(0+3e8\)@\(0+7d0\) +0+194 tstl @\(0+3e8\)@\(0+7d0,%d0:w:2\) +0+19c tstl @\(0+3e8\)@\(0+000,%d0:w:2\) +0+1a2 tstl @\(0+3e8\)@\(0+7d0\) +0+1aa tstl %a0@\(0+000\)@\(0+7d0,%d0:w:2\) +0+1b0 tstl %a0@\(0+000\)@\(0+000,%d0:w:2\) +0+1b4 tstl %a0@\(0+000\)@\(0+7d0\) +0+1ba tstl @\(0+000\)@\(0+7d0,%d0:w:2\) +0+1c0 tstl @\(0+000\)@\(0+000,%d0:w:2\) +0+1c4 tstl @\(0+000\)@\(0+7d0\) +0+1ca tstl %a0@\(0+3e8\)@\(0+7d0,%d0:w:2\) +0+1d2 tstl %a0@\(0+3e8\)@\(0+000,%d0:w:2\) +0+1d8 tstl %a0@\(0+3e8\)@\(0+7d0\) +0+1e0 tstl @\(0+3e8\)@\(0+7d0,%d0:w:2\) +0+1e8 tstl @\(0+3e8\)@\(0+000,%d0:w:2\) +0+1ee tstl @\(0+3e8\)@\(0+7d0\) +0+1f6 tstl %a0@\(0+000\)@\(0+7d0,%d0:w:2\) +0+1fc tstl %a0@\(0+000\)@\(0+000,%d0:w:2\) +0+200 tstl %a0@\(0+000\)@\(0+7d0\) +0+206 tstl @\(0+000\)@\(0+7d0,%d0:w:2\) +0+20c tstl @\(0+000\)@\(0+000,%d0:w:2\) +0+210 tstl @\(0+000\)@\(0+7d0\) +0+216 tstl %a0@\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+21e tstl %a0@\(0+3e8,%d0:w:2\)@\(0+000\) +0+224 tstl @\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+22c tstl @\(0+3e8,%d0:w:2\)@\(0+000\) +0+232 tstl %a0@\(0+000,%d0:w:2\)@\(0+7d0\) +0+238 tstl %a0@\(0+000,%d0:w:2\)@\(0+000\) +0+23c tstl @\(0+000,%d0:w:2\)@\(0+7d0\) +0+242 tstl @\(0+000,%d0:w:2\)@\(0+000\) +0+246 tstl %a0@\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+24e tstl %a0@\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+256 tstl %a0@\(0+3e8,%d0:l\)@\(0+7d0\) +0+25e tstl %a1@\(0+3e8,%a0:l\)@\(0+7d0\) +0+266 tstl %a0@\(0+3e8,%a1:w:2\)@\(0+7d0\) +0+26e tstl %a0@\(0+3e8,%d0:w:2\)@\(0+000\) +0+274 tstl %a0@\(0+3e8,%d0:l\)@\(0+000\) +0+27a tstl @\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+282 tstl @\(0+3e8,%d0:w:2\)@\(0+000\) +0+288 tstl %a0@\(0+000,%d0:w:2\)@\(0+7d0\) +0+28e tstl %a0@\(0+000,%d0:l\)@\(0+7d0\) +0+294 tstl %a0@\(0+000,%d0:w:2\)@\(0+000\) +0+298 tstl %a0@\(0+000,%d0:l\)@\(0+000\) +0+29c tstl @\(0+000,%d0:w:2\)@\(0+7d0\) +0+2a2 tstl @\(0+000,%d0:w:2\)@\(0+000\) +0+2a6 tstl 0+2b0 +0+2aa tstl 0+2b4 +0+2ae tstl 0+2b8 +0+2b2 tstl 0+000 +0+2b6 tstl %pc@\(0+2c0 ,%d0:w:2\) +0+2ba tstl %pc@\(0+2bc ,%d0:w:2\) +0+2be tstl %pc@\(0+2c8 ,%d0:w:2\) +0+2c2 tstl %pc@\(0+2cc ,%d0:l\) +0+2c6 tstl %pc@\(0+2d0 ,%a0:l\) +0+2ca tstl %pc@\(0+2d4 ,%d0:w:2\) +0+2ce tstl %pc@\(0+2d8 ,%d0:l\) +0+2d2 tstl %pc@\(0+2dc ,%a0:l\) +0+2d6 tstl %pc@\(0+2d8 ,%d0:w:2\) +0+2da tstl %pc@\(0+2dc ,%d0:l\) +0+2de tstl %pc@\(0+2e0 ,%a0:l\) +0+2e2 tstl %pc@\(0+6cc <.*>,%d0:w:2\) +0+2e8 tstl %pc@\(0001898a <.*>\) +0+2f0 tstl %pc@\(0+6da <.*>,%d0:w:2\) +0+2f6 tstl %pc@\(0+6e0 <.*>,%d0:l\) +0+2fc tstl %pc@\(0+6e6 <.*>,%a1:w:2\) +0+302 tstl %pc@\(0+6ec <.*>,%a1:l\) +0+308 tstl %pc@\(0+6f2 <.*>,%d0:w:2\) +0+30e tstl %pc@\(0+6f8 <.*>,%d0:l\) +0+314 tstl %pc@\(0+6fe <.*>,%a1:l\) +0+31a tstl %pc@\(000189bc <.*>\) +0+322 tstl %pc@\(000189c4 <.*>\) +0+32a tstl %zpc@\(0+3e8,%d0:w:2\) +0+330 tstl %zpc@\(0+186a0\) +0+338 tstl %zpc@\(0+3e8,%d0:w:2\) +0+33e tstl %zpc@\(0+3e8,%d0:l\) +0+344 tstl %zpc@\(0+3e8,%a1:w:2\) +0+34a tstl %zpc@\(0+3e8,%a1:l\) +0+350 tstl %zpc@\(0+3e8,%d0:w:2\) +0+356 tstl %zpc@\(0+3e8,%d0:l\) +0+35c tstl %zpc@\(0+3e8,%a1:l\) +0+362 tstl %zpc@\(0+186a0\) +0+36a tstl %zpc@\(0+186a0\) +0+372 tstl %pc@\(0+75c <.*>\)@\(0+7d0,%d0:w:2\) +0+37a tstl %pc@\(0+764 <.*>\)@\(0+000,%d0:w:2\) +0+380 tstl %pc@\(0+76a <.*>\)@\(0+7d0\) +0+388 tstl %pc@\(0+38a \)@\(0+7d0,%d0:w:2\) +0+38e tstl %pc@\(0+390 \)@\(0+000,%d0:w:2\) +0+392 tstl %pc@\(0+394 \)@\(0+7d0\) +0+398 tstl %pc@\(0+782 <.*>\)@\(0+7d0,%d0:w:2\) +0+3a0 tstl %pc@\(0+78a <.*>\)@\(0+000,%d0:w:2\) +0+3a6 tstl %pc@\(0+790 <.*>\)@\(0+7d0\) +0+3ae tstl %pc@\(0+3b0 \)@\(0+7d0,%d0:w:2\) +0+3b4 tstl %pc@\(0+3b6 \)@\(0+000,%d0:w:2\) +0+3b8 tstl %pc@\(0+3ba \)@\(0+7d0\) +0+3be tstl %zpc@\(0+3e8\)@\(0+7d0,%d0:w:2\) +0+3c6 tstl %zpc@\(0+3e8\)@\(0+000,%d0:w:2\) +0+3cc tstl %zpc@\(0+3e8\)@\(0+7d0\) +0+3d4 tstl %zpc@\(0+000\)@\(0+7d0,%d0:w:2\) +0+3da tstl %zpc@\(0+000\)@\(0+000,%d0:w:2\) +0+3de tstl %zpc@\(0+000\)@\(0+7d0\) +0+3e4 tstl %zpc@\(0+3e8\)@\(0+7d0,%d0:w:2\) +0+3ec tstl %zpc@\(0+3e8\)@\(0+000,%d0:w:2\) +0+3f2 tstl %zpc@\(0+3e8\)@\(0+7d0\) +0+3fa tstl %zpc@\(0+000\)@\(0+7d0,%d0:w:2\) +0+400 tstl %zpc@\(0+000\)@\(0+000,%d0:w:2\) +0+404 tstl %zpc@\(0+000\)@\(0+7d0\) +0+40a tstl %pc@\(0+7f4 <.*>,%d0:w:2\)@\(0+7d0\) +0+412 tstl %pc@\(0+7fc <.*>,%d0:w:2\)@\(0+000\) +0+418 tstl %pc@\(0+41a ,%d0:w:2\)@\(0+7d0\) +0+41e tstl %pc@\(0+420 ,%d0:w:2\)@\(0+000\) +0+422 tstl %pc@\(0+80c <.*>,%d0:w:2\)@\(0+7d0\) +0+42a tstl %pc@\(0+814 <.*>,%d0:w:2\)@\(0+7d0\) +0+432 tstl %pc@\(0+81c <.*>,%d0:l\)@\(0+7d0\) +0+43a tstl %pc@\(0+824 <.*>,%a1:l\)@\(0+7d0\) +0+442 tstl %pc@\(0+82c <.*>,%a1:l\)@\(0+7d0\) +0+44a tstl %pc@\(0+834 <.*>,%a1:w:2\)@\(0+7d0\) +0+452 tstl %pc@\(0+83c <.*>,%d0:w:2\)@\(0+000\) +0+458 tstl %pc@\(0+842 <.*>,%d0:l\)@\(0+000\) +0+45e tstl %pc@\(0+848 <.*>,%a1:l\)@\(0+000\) +0+464 tstl %pc@\(0+466 ,%d0:w:2\)@\(0+7d0\) +0+46a tstl %pc@\(0+46c ,%a0:l\)@\(0+7d0\) +0+470 tstl %pc@\(0+472 ,%d0:w:2\)@\(0+000\) +0+474 tstl %pc@\(0+476 ,%d0:l\)@\(0+000\) +0+478 tstl %zpc@\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+480 tstl %zpc@\(0+3e8,%d0:w:2\)@\(0+000\) +0+486 tstl %zpc@\(0+000,%d0:w:2\)@\(0+7d0\) +0+48c tstl %zpc@\(0+000,%d0:w:2\)@\(0+000\) +0+490 tstl %zpc@\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+498 tstl %zpc@\(0+3e8,%d0:w:2\)@\(0+7d0\) +0+4a0 tstl %zpc@\(0+3e8,%d0:l\)@\(0+7d0\) +0+4a8 tstl %zpc@\(0+3e8,%a1:l\)@\(0+7d0\) +0+4b0 tstl %zpc@\(0+3e8,%a1:l\)@\(0+7d0\) +0+4b8 tstl %zpc@\(0+3e8,%a1:w:2\)@\(0+7d0\) +0+4c0 tstl %zpc@\(0+3e8,%d0:w:2\)@\(0+000\) +0+4c6 tstl %zpc@\(0+3e8,%d0:l\)@\(0+000\) +0+4cc tstl %zpc@\(0+3e8,%a1:l\)@\(0+000\) +0+4d2 tstl %zpc@\(0+000,%d0:w:2\)@\(0+7d0\) +0+4d8 tstl %zpc@\(0+000,%a0:l\)@\(0+7d0\) +0+4de tstl %zpc@\(0+000,%d0:w:2\)@\(0+000\) +0+4e2 tstl %zpc@\(0+000,%d0:l\)@\(0+000\) +0+4e6 tstl 0+004 +0+4ea tstl 0+004 +0+4ee tstl 0+004 +0+4f2 tstl 0+186a0 <.*> +0+4f8 tstl 0+008 +0+4fe tstl 0+008 +0+504 addib #1,%d0 +0+508 addiw #1,%d0 +0+50c addil #1,%d0 +0+512 addqb #1,%d0 diff --git a/gas/testsuite/gas/m68k/operands.s b/gas/testsuite/gas/m68k/operands.s new file mode 100644 index 00000000000..29ec7429cd2 --- /dev/null +++ b/gas/testsuite/gas/m68k/operands.s @@ -0,0 +1,273 @@ +# Test handling of MIT and Motorola syntax operands +# If you change this file, see also op68000.d. + .text + .globl foo +foo: + | Data register direct + tstl %d0 + + | Address register direct + tstl %a0 + + | Address register indirect + tstl %a0@ + tstl (%a0) + + | Address register indirect with postincrement + tstl %a0@+ + tstl (%a0)+ + + | Address register indirect with predecrement + tstl %a0@- + tstl -(%a0) + + | Address register indirect with displacement + tstl %a0@(8) + tstl (8,%a0) + tstl 8(%a0) + + | Address register indirect with index (8-bit displacement) + tstl %a0@(8,%d0) + tstl %a0@(8,%d0:w) + tstl %a0@(8,%d0:w:1) + tstl %a0@(8,%d0:w:2) + tstl %a0@(8,%d0:w:4) + tstl %a0@(8,%d0:w:8) + tstl %a0@(8,%d0:l) + tstl %a0@(8,%d0:l:1) + tstl %a0@(8,%d0:l:2) + tstl %a0@(8,%d0:l:4) + tstl %a0@(8,%d0:l:8) + tstl %a0@(%d0:w:2) + tstl (8,%a0,%d0) + tstl (8,%a0,%d0*1) + tstl (8,%a0,%d0*2) + tstl (8,%a0,%d0*4) + tstl (8,%a0,%d0*8) + tstl (8,%a0,%d0.w) + tstl (8,%a0,%d0.w*1) + tstl (8,%a0,%d0.w*2) + tstl (8,%a0,%d0.w*4) + tstl (8,%a0,%d0.w*8) + tstl (8,%a0,%d0.l) + tstl (8,%a0,%d0.l*1) + tstl (8,%a0,%d0.l*2) + tstl (8,%a0,%d0.l*4) + tstl (8,%a0,%d0.l*8) + tstl (8,%d0,%a0) + tstl (8,%a1.w*2,%a0) + tstl (8,%a1,%a0) + tstl 8(%a0,%d0.w*2) + tstl 8(%d0.w*2,%a0) + tstl 8(%a1.w*2,%a0) + tstl (%a0,%d0.w*2) + tstl (%d0.w*2,%a0) + + | Address register indirect with index (base displacement) + tstl %a0@(1000,%d0:w:2) + tstl @(1000,%d0:w:2) + tstl @(%d0:w:2) + tstl @(1000) + tstl %a0@(100000) + tstl (1000,%a0,%d0.w*2) + tstl (1000,%d0,%a0) + tstl (1000,%a1.w*2,%a0) + tstl 1000(%a0,%d0.w*2) + tstl 1000(%d0,%a0) + tstl (1000,%d0.w*2) + tstl 1000(%d0.w*2) + tstl (%d0.w*2) + tstl (100000,%a0) + tstl 100000(%a0) + tstl %za1@(1000,%d0:w:2) + tstl %za1@(100000) + tstl (1000,%za1,%d0.w*2) + tstl (1000,%d0,%za1) + tstl (1000,%a1.w*2,%za1) + tstl 1000(%za1,%d0.w*2) + tstl 1000(%d0,%za1) + tstl (100000,%za1) + tstl 100000(%za1) + tstl %a0@(1000,%zd1:w:2) + tstl @(1000,%zd1:w:2) + tstl @(%zd1:w:2) + tstl (1000,%a0,%zd1.w*2) + tstl (1000,%zd1,%a0) + tstl (1000,%za1.w*2,%a0) + tstl 1000(%a0,%zd1.w*2) + tstl 1000(%zd1,%a0) + tstl (1000,%zd1.w*2) + tstl 1000(%zd1.w*2) + tstl (%zd1.w*2) + + | Memory indirect postindexed + tstl %a0@(1000)@(2000,%d0:w:2) + tstl %a0@(1000)@(%d0:w:2) + tstl %a0@(1000)@(2000) + tstl @(1000)@(2000,%d0:w:2) + tstl @(1000)@(%d0:w:2) + tstl @(1000)@(2000) + tstl %a0@(0)@(2000,%d0:w:2) + tstl %a0@(0)@(%d0:w:2) + tstl %a0@(0)@(2000) + tstl @(0)@(2000,%d0:w:2) + tstl @(0)@(%d0:w:2) + tstl @(0)@(2000) + tstl ([1000,%a0],%d0:w:2,2000) + tstl ([1000,%a0],%d0:w:2) + tstl ([1000,%a0],2000) + tstl ([1000],%d0:w:2,2000) + tstl ([1000],%d0:w:2) + tstl ([1000],2000) + tstl ([%a0],%d0:w:2,2000) + tstl ([%a0],%d0:w:2) + tstl ([%a0],2000) + tstl ([0],%d0:w:2,2000) + tstl ([0],%d0:w:2) + tstl ([0],2000) + + | Memory indirect preindexed + tstl %a0@(1000,%d0:w:2)@(2000) + tstl %a0@(1000,%d0:w:2)@(0) + tstl @(1000,%d0:w:2)@(2000) + tstl @(1000,%d0:w:2)@(0) + tstl %a0@(%d0:w:2)@(2000) + tstl %a0@(%d0:w:2)@(0) + tstl @(%d0:w:2)@(2000) + tstl @(%d0:w:2)@(0) + tstl ([1000,%a0,%d0:w:2],2000) + tstl ([1000,%d0:w:2,%a0],2000) + tstl ([1000,%d0,%a0],2000) + tstl ([1000,%a1,%a0],2000) + tstl ([1000,%a1:w:2,%a0],2000) + tstl ([1000,%a0,%d0:w:2]) + tstl ([1000,%d0,%a0]) + tstl ([1000,%d0:w:2],2000) + tstl ([1000,%d0:w:2]) + tstl ([%a0,%d0:w:2],2000) + tstl ([%d0,%a0],2000) + tstl ([%a0,%d0:w:2]) + tstl ([%d0,%a0]) + tstl ([%d0:w:2],2000) + tstl ([%d0:w:2]) + + | Program counter indirect with displacement + tstl %pc@(8) + tstl (8,%pc) + tstl 8(%pc) + tstl foo + + | Program counter indirect with index (8-bit displacement) + tstl %pc@(8,%d0:w:2) + tstl %pc@(%d0:w:2) + tstl (8,%pc,%d0.w*2) + tstl (8,%d0,%pc) + tstl (8,%a0,%pc) + tstl 8(%pc,%d0.w*2) + tstl 8(%d0,%pc) + tstl 8(%a0,%pc) + tstl (%pc,%d0.w*2) + tstl (%d0,%pc) + tstl (%a0,%pc) + + | Program counter indirect with index (base displacement) + tstl %pc@(1000,%d0:w:2) + tstl %pc@(100000) + tstl (1000,%pc,%d0.w*2) + tstl (1000,%d0,%pc) + tstl (1000,%a1.w*2,%pc) + tstl (1000,%a1,%pc) + tstl 1000(%pc,%d0.w*2) + tstl 1000(%d0,%pc) + tstl 1000(%a1,%pc) + tstl (100000,%pc) + tstl 100000(%pc) + tstl %zpc@(1000,%d0:w:2) + tstl %zpc@(100000) + tstl (1000,%zpc,%d0.w*2) + tstl (1000,%d0,%zpc) + tstl (1000,%a1.w*2,%zpc) + tstl (1000,%a1,%zpc) + tstl 1000(%zpc,%d0.w*2) + tstl 1000(%d0,%zpc) + tstl 1000(%a1,%zpc) + tstl (100000,%zpc) + tstl 100000(%zpc) + + | Program counter memory indirect postindexed + tstl %pc@(1000)@(2000,%d0:w:2) + tstl %pc@(1000)@(%d0:w:2) + tstl %pc@(1000)@(2000) + tstl %pc@(0)@(2000,%d0:w:2) + tstl %pc@(0)@(%d0:w:2) + tstl %pc@(0)@(2000) + tstl ([1000,%pc],%d0:w:2,2000) + tstl ([1000,%pc],%d0:w:2) + tstl ([1000,%pc],2000) + tstl ([%pc],%d0:w:2,2000) + tstl ([%pc],%d0:w:2) + tstl ([%pc],2000) + tstl %zpc@(1000)@(2000,%d0:w:2) + tstl %zpc@(1000)@(%d0:w:2) + tstl %zpc@(1000)@(2000) + tstl %zpc@(0)@(2000,%d0:w:2) + tstl %zpc@(0)@(%d0:w:2) + tstl %zpc@(0)@(2000) + tstl ([1000,%zpc],%d0:w:2,2000) + tstl ([1000,%zpc],%d0:w:2) + tstl ([1000,%zpc],2000) + tstl ([%zpc],%d0:w:2,2000) + tstl ([%zpc],%d0:w:2) + tstl ([%zpc],2000) + + | Program counter memory indirect preindexed + tstl %pc@(1000,%d0:w:2)@(2000) + tstl %pc@(1000,%d0:w:2)@(0) + tstl %pc@(%d0:w:2)@(2000) + tstl %pc@(%d0:w:2)@(0) + tstl ([1000,%pc,%d0:w:2],2000) + tstl ([1000,%d0:w:2,%pc],2000) + tstl ([1000,%d0,%pc],2000) + tstl ([1000,%a1,%pc],2000) + tstl ([1000,%pc,%a1],2000) + tstl ([1000,%a1:w:2,%pc],2000) + tstl ([1000,%pc,%d0:w:2]) + tstl ([1000,%d0,%pc]) + tstl ([1000,%a1,%pc]) + tstl ([%pc,%d0:w:2],2000) + tstl ([%pc,%a0],2000) + tstl ([%pc,%d0:w:2]) + tstl ([%d0,%pc]) + tstl %zpc@(1000,%d0:w:2)@(2000) + tstl %zpc@(1000,%d0:w:2)@(0) + tstl %zpc@(%d0:w:2)@(2000) + tstl %zpc@(%d0:w:2)@(0) + tstl ([1000,%zpc,%d0:w:2],2000) + tstl ([1000,%d0:w:2,%zpc],2000) + tstl ([1000,%d0,%zpc],2000) + tstl ([1000,%a1,%zpc],2000) + tstl ([1000,%zpc,%a1],2000) + tstl ([1000,%a1:w:2,%zpc],2000) + tstl ([1000,%zpc,%d0:w:2]) + tstl ([1000,%d0,%zpc]) + tstl ([1000,%a1,%zpc]) + tstl ([%zpc,%d0:w:2],2000) + tstl ([%zpc,%a0],2000) + tstl ([%zpc,%d0:w:2]) + tstl ([%d0,%zpc]) + + | Absolute short + tstl 4 + tstl 4.w + tstl (4).w + + | Absolute long + tstl 100000 + tstl 8.l + tstl (8).l + + | Immediate + addib #1,%d0 + addiw #1,%d0 + addil #1,%d0 + addqb #1,%d0 diff --git a/gas/testsuite/gas/m68k/schwab.d b/gas/testsuite/gas/m68k/schwab.d index 393aa5b07a3..a9459d1daaf 100644 --- a/gas/testsuite/gas/m68k/schwab.d +++ b/gas/testsuite/gas/m68k/schwab.d @@ -1,5 +1,5 @@ #name: PC-relative relocations -#objdump: -drs +#objdump: -drs -j .text .*: file format .* @@ -22,68 +22,67 @@ Contents of section .text: 00f0 41fb0170 00008000 4e7141fb 0170ffff A..p....NqA..p.. 0100 ff0441fb 0930ffff fefc4e71 41f90000 ..A..0....NqA... 0110 0000............................... ................ -Contents of section .data: Disassembly of section \.text: -0+0000 nop +0+0000 <.*> nop 0+0002 nop 0+0004 moveml 0+0002 ,%a0-%a1 0+000a moveml 0+0002 ,%a0-%a1 -0+0010 moveml 0x10002\[%d0\.l\],%a0-%a1 +0+0010 moveml %pc@\(0+02 ,%d0:l\),%a0-%a1 0+0016 lea 0+0002 ,%a0 0+001a lea 0+0002 ,%a0 -0+001e lea f+ff82 ,%a0 -0+0022 lea 0x10002\[%d0\.l\],%a0 -0+0026 lea 0x10002\[%d0\.l\],%a0 -0+002a lea 0x10002\[%d0\.l\],%a0 -0+002e lea 0x2\[%d0\.l\],%a0 -0+0034 lea 0x2\[%d0\.l\],%a0 -0+003a lea 0x2\[%d0\.l\],%a0 -0+0042 lea 0x2\[%d0\.l\],%a0 +0+001e lea f+ff82 <.*>,%a0 +0+0022 lea %pc@\(0+02 ,%d0:l\),%a0 +0+0026 lea %pc@\(0+02 ,%d0:l\),%a0 +0+002a lea %pc@\(0+02 ,%d0:l\),%a0 +0+002e lea %pc@\(0+02 ,%d0:l\),%a0 +0+0034 lea %pc@\(0+02 ,%d0:l\),%a0 +0+003a lea %pc@\(0+02 ,%d0:l\),%a0 +0+0042 lea %pc@\(0+02 ,%d0:l\),%a0 0+004a nop 0+004c bsrl 0+00a6 -0+0052 bsr 0+00a6 +0+0052 bsrw 0+00a6 0+0056 bsrs 0+00a6 0+0058 bsrs 0+00a6 0+005a nop -0+005c lea @#0+00a6 ,%a0 +0+005c lea 0+00a6 ,%a0 RELOC: 0+005e (R_68K_)?32 \.text 0+0062 lea 0+00a6 ,%a0 -0+0066 lea 0+0126 ,%a0 -0+006a lea 0xa6\[%d0\.l\],%a0 -0+006e lea 0xa6\[%d0\.l\],%a0 -0+0072 lea 0xa6\[%d0\.l\],%a0 -0+0076 lea 0xa6\[%d0\.l\],%a0 -0+007c lea 0xa6\[%d0\.l\],%a0 -0+0082 lea 0xa6\[%d0\.l\],%a0 -0+008a lea 0xa6\[%d0\.l\],%a0 -0+0092 lea 0xa6\[%d0\.l\],%a0 -0+009a lea 0xa6\[%d0\.l\],%a0 -0+00a0 lea 0xa6\[%d0\.l\],%a0 +0+0066 lea 0+0126 <.*>,%a0 +0+006a lea %pc@\(0+a6 ,%d0:l\),%a0 +0+006e lea %pc@\(0+a6 ,%d0:l\),%a0 +0+0072 lea %pc@\(0+a6 ,%d0:l\),%a0 +0+0076 lea %pc@\(0+a6 ,%d0:l\),%a0 +0+007c lea %pc@\(0+a6 ,%d0:l\),%a0 +0+0082 lea %pc@\(0+a6 ,%d0:l\),%a0 +0+008a lea %pc@\(0+a6 ,%d0:l\),%a0 +0+0092 lea %pc@\(0+a6 ,%d0:l\),%a0 +0+009a lea %pc@\(0+a6 ,%d0:l\),%a0 +0+00a0 lea %pc@\(0+a6 ,%d0:l\),%a0 0+00a4 nop 0+00a6 nop 0+00a8 nop -0+00aa lea 0x1002c\[%d0\.l\],%a0 -0+00ae lea 0x2f\[%d0\.l\],%a0 -0+00b4 lea 0xf+80b6\[%d0\.l\],%a0 -0+00ba lea 0xf+80bb\[%d0\.l\],%a0 +0+00aa lea %pc@\(0+2c ,%d0:l\),%a0 +0+00ae lea %pc@\(0+2f ,%d0:l\),%a0 +0+00b4 lea %pc@\(f+80b6 <.*>,%d0:l\),%a0 +0+00ba lea %pc@\(f+80bb <.*>,%d0:l\),%a0 0+00c2 nop -0+00c4 lea 0x145\[%d0\.l\],%a0 -0+00c8 lea 0x14a\[%d0\.l\],%a0 -0+00ce lea 0x80cf\[%d0\.l\],%a0 -0+00d4 lea 0x80d6\[%d0\.l\],%a0 +0+00c4 lea %pc@\(0+145 <.*>,%d0:l\),%a0 +0+00c8 lea %pc@\(0+14a <.*>,%d0:l\),%a0 +0+00ce lea %pc@\(0+80cf <.*>,%d0:l\),%a0 +0+00d4 lea %pc@\(0+80d6 <.*>,%d0:l\),%a0 0+00dc nop -0+00de lea f+80e0 ,%a0 -0+00e2 lea 0xf+80e3,%a0 +0+00de lea f+80e0 <.*>,%a0 +0+00e2 lea %pc@\(f+80e3 <.*>\),%a0 0+00ea nop -0+00ec lea 0+80ed ,%a0 -0+00f0 lea 0x80f2,%a0 +0+00ec lea 0+80ed <.*>,%a0 +0+00f0 lea %pc@\(0+80f2 <.*>\),%a0 0+00f8 nop -0+00fa lea 0x0,%a0 +0+00fa lea %pc@\(0+0 <.*>\),%a0 RELOC: 0+00fe (R_68K_PC|DISP)32 undef -0+0102 lea 0x0\[%d0\.l\],%a0 +0+0102 lea %pc@\(0+0 <.*>,%d0:l\),%a0 RELOC: 0+0106 (R_68K_PC|DISP)32 undef 0+010a nop -0+010c lea @#0+0+ ,%a0 +0+010c lea 0+0+ <.*>,%a0 RELOC: 0+010e (R_68K_)?32 undef 0+0112 nop \.\.\. -- 2.30.2