diff options
author | Sean Keys <skeys@ipdatasys.com> | 2012-11-07 20:35:02 +0000 |
---|---|---|
committer | Sean Keys <skeys@ipdatasys.com> | 2012-11-07 20:35:02 +0000 |
commit | 178df8af8d1b26a645797241f827228517b6c411 (patch) | |
tree | 9f585820d7589987bb3bd24f4ad4ff9dac80a702 | |
parent | 0baeab039d381898c210a40117e36320177de83f (diff) | |
download | gdb-178df8af8d1b26a645797241f827228517b6c411.zip gdb-178df8af8d1b26a645797241f827228517b6c411.tar.gz gdb-178df8af8d1b26a645797241f827228517b6c411.tar.bz2 |
2012-11-07 James Murray <jsm@jsm-net.demon.co.uk>
* ld-m68hc11/movw.d: New test for 16bit relocate.
* ld-m68hc11/movw.s: Source for test.
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-m68hc11/movw.d | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-m68hc11/movw.s | 13 |
3 files changed, 36 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 3357d94..0e79548 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-11-07 James Murray <jsm@jsm-net.demon.co.uk> + + * ld-m68hc11/movw.d: New test for 16bit relocate. + * ld-m68hc11/movw.s: Source for test. + 2012-10-30 Steve McIntyre <steve.mcintyre@linaro.org> * ld-arm/eabi-hard-float.s: New test source. diff --git a/ld/testsuite/ld-m68hc11/movw.d b/ld/testsuite/ld-m68hc11/movw.d new file mode 100644 index 0000000..8c8463e --- /dev/null +++ b/ld/testsuite/ld-m68hc11/movw.d @@ -0,0 +1,18 @@ +#source: movw.s +#as: -m m9s12x +#ld: -mm68hc12elf --relax -defsym gp_max_on=0x1234 -defsym gp_clk=0x5432 -defsym small_off=0x5 +#objdump: -m m9s12x -d --prefix-addresses -r + +tmpdir/dump: file format elf32-m68hc12 + + +Disassembly of section .text: +00008000 <_start> movw 0x1234,X, 0x5432,X +00008008 <_start\+0x8> movw 0x22,SP, 0x5432,Y +0000800f <_start\+0xf> movw 0x5432,X, 0x12,SP +00008016 <_start\+0x16> movw 0x1001,X, 0x2002,Y +0000801e <_start\+0x1e> movw 0x5,SP, 0x1234,Y +00008026 <_start\+0x26> tfr X,Y +00008028 <_start\+0x28> rts +00008029 <_etext> nop + diff --git a/ld/testsuite/ld-m68hc11/movw.s b/ld/testsuite/ld-m68hc11/movw.s new file mode 100644 index 0000000..bbe61de --- /dev/null +++ b/ld/testsuite/ld-m68hc11/movw.s @@ -0,0 +1,13 @@ +;;; Bug. movw used R_M68HC12_16B which was 1 byte misaligned. + .sect .text + .globl _start +_start: +start: + movw gp_max_on,x, gp_clk,x + movw 0x22,sp, gp_clk,y + movw gp_clk,x, 0x12,sp + movw 0x1001,x, 0x2002,y + movw small_off,sp, gp_max_on,y + tfr x,y + rts + |