diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2003-07-07 09:33:02 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2003-07-07 09:33:02 +0000 |
commit | 1b680e4f574f7d2610c96756a9015a1bfcf126c3 (patch) | |
tree | 9fbc2707b649fea956b64c8d98420a78939b49bf /gas/testsuite | |
parent | 8427c424251eeb9dfd53b39b54e77d6e8e7d4ba6 (diff) | |
download | gdb-1b680e4f574f7d2610c96756a9015a1bfcf126c3.zip gdb-1b680e4f574f7d2610c96756a9015a1bfcf126c3.tar.gz gdb-1b680e4f574f7d2610c96756a9015a1bfcf126c3.tar.bz2 |
* config/tc-h8300.c (h8300sxnmode): Add prototype.
(DSYMMODE): Remove.
(parse_exp): Replace expressionS argument with a h8_op. Parse the
operand size as well.
(skip_colonthing): Remove unused expression argument. Tighten checks
for 2-digit sizes.
(colonmod24): Remove.
(get_mova_operands): Combine calls to parse_exp and skip_colonthing.
(get_operand): Likewise. Use the standard code to read the size of
pc-relative operands.
(fix_operand_size): Include the size-guessing logic that used to be
in colonmod24 and get_operand. Don't apply dd:2 optimizations to
offsets with a symbolic component.
testsuite/
* gas/h8300/h8sx_disp2.[sd]: Add tests for symbolic displacements.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/h8300/h8sx_disp2.d | 69 | ||||
-rw-r--r-- | gas/testsuite/gas/h8300/h8sx_disp2.s | 3 |
3 files changed, 46 insertions, 30 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5a878a5..2083d32 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-07-07 Richard Sandiford <rsandifo@redhat.com> + + * gas/h8300/h8sx_disp2.[sd]: Add tests for symbolic displacements. + 2003-07-04 Alan Modra <amodra@bigpond.net.au> * gas/ppc/test2elf64.s: Rename to.. diff --git a/gas/testsuite/gas/h8300/h8sx_disp2.d b/gas/testsuite/gas/h8300/h8sx_disp2.d index b1def76..a3c712c 100644 --- a/gas/testsuite/gas/h8300/h8sx_disp2.d +++ b/gas/testsuite/gas/h8300/h8sx_disp2.d @@ -5,33 +5,42 @@ Disassembly of section \.text: 0+00 <\.text>: - * 0: 01 75 68 08 * 01 75 68 08 80 02 add.b #0x2,@\(0x1:2,r0\) - * 4: 80 02 * - * 6: 01 76 68 08 * 01 76 68 08 80 02 add.b #0x2,@\(0x2:2,r0\) - * a: 80 02 * - * c: 01 77 68 08 * 01 77 68 08 80 02 add.b #0x2,@\(0x3:2,r0\) - *10: 80 02 * - *12: 01 74 6e 08 * 01 74 6e 08 00 04 80 02 add.b #0x2,@\(0x4:16,r0\) - *16: 00 04 80 02 * - *1a: 01 5e c0 10 * 01 5e c0 10 00 01 00 02 add.w #0x2,@\(0x1:16,r0\) - *1e: 00 01 00 02 * - *22: 01 5e 10 10 * 01 5e 10 10 00 02 add.w #0x2,@\(0x2:2,r0\) - *26: 00 02 * - *28: 01 5e 20 10 * 01 5e 20 10 00 02 add.w #0x2,@\(0x4:2,r0\) - *2c: 00 02 * - *2e: 01 5e 30 10 * 01 5e 30 10 00 02 add.w #0x2,@\(0x6:2,r0\) - *32: 00 02 * - *34: 01 5e c0 10 * 01 5e c0 10 00 08 00 02 add.w #0x2,@\(0x8:16,r0\) - *38: 00 08 00 02 * - *3c: 01 0e c0 10 * 01 0e c0 10 00 01 00 02 add.l #0x2,@\(0x1:16,r0\) - *40: 00 01 00 02 * - *44: 01 0e c0 10 * 01 0e c0 10 00 02 00 02 add.l #0x2,@\(0x2:16,r0\) - *48: 00 02 00 02 * - *4c: 01 0e 10 10 * 01 0e 10 10 00 02 add.l #0x2,@\(0x4:2,r0\) - *50: 00 02 * - *52: 01 0e 20 10 * 01 0e 20 10 00 02 add.l #0x2,@\(0x8:2,r0\) - *56: 00 02 * - *58: 01 0e 30 10 * 01 0e 30 10 00 02 add.l #0x2,@\(0xc:2,r0\) - *5c: 00 02 * - *5e: 01 0e c0 10 * 01 0e c0 10 00 10 00 02 add.l #0x2,@\(0x10:16,r0\) - *62: 00 10 00 02 * + .*: 01 75 68 08 * 01 75 68 08 80 02 add.b #0x2,@\(0x1:2,r0\) + .*: 80 02 * + .*: 01 76 68 08 * 01 76 68 08 80 02 add.b #0x2,@\(0x2:2,r0\) + .*: 80 02 * + .*: 01 77 68 08 * 01 77 68 08 80 02 add.b #0x2,@\(0x3:2,r0\) + .*: 80 02 * + .*: 01 74 6e 08 * 01 74 6e 08 00 04 80 02 add.b #0x2,@\(0x4:16,r0\) + .*: 00 04 80 02 * + .*: 78 04 6a 28 * 78 04 6a 28 00 00 00 00 80 02 add.b #0x2,@\(0x0:32,r0\) + .*: 00 00 00 00 * + .*: 80 02 * + .*: 01 5e c0 10 * 01 5e c0 10 00 01 00 02 add.w #0x2,@\(0x1:16,r0\) + .*: 00 01 00 02 * + .*: 01 5e 10 10 * 01 5e 10 10 00 02 add.w #0x2,@\(0x2:2,r0\) + .*: 00 02 * + .*: 01 5e 20 10 * 01 5e 20 10 00 02 add.w #0x2,@\(0x4:2,r0\) + .*: 00 02 * + .*: 01 5e 30 10 * 01 5e 30 10 00 02 add.w #0x2,@\(0x6:2,r0\) + .*: 00 02 * + .*: 01 5e c0 10 * 01 5e c0 10 00 08 00 02 add.w #0x2,@\(0x8:16,r0\) + .*: 00 08 00 02 * + .*: 01 5e c8 10 * 01 5e c8 10 00 00 00 00 00 02 add.w #0x2,@\(0x0:32,r0\) + .*: 00 00 00 00 * + .*: 00 02 * + .*: 01 0e c0 10 * 01 0e c0 10 00 01 00 02 add.l #0x2,@\(0x1:16,r0\) + .*: 00 01 00 02 * + .*: 01 0e c0 10 * 01 0e c0 10 00 02 00 02 add.l #0x2,@\(0x2:16,r0\) + .*: 00 02 00 02 * + .*: 01 0e 10 10 * 01 0e 10 10 00 02 add.l #0x2,@\(0x4:2,r0\) + .*: 00 02 * + .*: 01 0e 20 10 * 01 0e 20 10 00 02 add.l #0x2,@\(0x8:2,r0\) + .*: 00 02 * + .*: 01 0e 30 10 * 01 0e 30 10 00 02 add.l #0x2,@\(0xc:2,r0\) + .*: 00 02 * + .*: 01 0e c0 10 * 01 0e c0 10 00 10 00 02 add.l #0x2,@\(0x10:16,r0\) + .*: 00 10 00 02 * + .*: 01 0e c8 10 * 01 0e c8 10 00 00 00 00 00 02 add.l #0x2,@\(0x0:32,r0\) + .*: 00 00 00 00 * + .*: 00 02 * diff --git a/gas/testsuite/gas/h8300/h8sx_disp2.s b/gas/testsuite/gas/h8300/h8sx_disp2.s index f3d8393..5f6b37d 100644 --- a/gas/testsuite/gas/h8300/h8sx_disp2.s +++ b/gas/testsuite/gas/h8300/h8sx_disp2.s @@ -3,12 +3,14 @@ add.b #2,@(2,er0) ; L_2 add.b #2,@(3,er0) ; L_2 add.b #2,@(4,er0) ; L_16 + add.b #2,@(foo+1,er0) ; L_32 add.w #2,@(1,er0) ; L_16 add.w #2,@(2,er0) ; L_2 add.w #2,@(4,er0) ; L_2 add.w #2,@(6,er0) ; L_2 add.w #2,@(8,er0) ; L_16 + add.w #2,@(foo+2,er0) ; L_32 add.l #2,@(1,er0) ; L_16 add.l #2,@(2,er0) ; L_16 @@ -16,3 +18,4 @@ add.l #2,@(8,er0) ; L_2 add.l #2,@(12,er0) ; L_2 add.l #2,@(16,er0) ; L_16 + add.l #2,@(foo+4,er0) ; L_32 |