From 5da0c2771a78b6256713ff0f756c6653c2b38ff7 Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sun, 8 Dec 2002 21:08:07 +0000 Subject: [PATCH] * gas/m68hc11/bug-1825.s: Add some tests. * gas/m68hc11/bug-1825.d: Update. * gas/m68hc11/opers12.d: Update. * gas/m68hc11/opers12-dwarf2.d: Update. --- gas/testsuite/ChangeLog | 7 ++ gas/testsuite/gas/m68hc11/bug-1825.d | 75 ++++++++++++---------- gas/testsuite/gas/m68hc11/bug-1825.s | 6 +- gas/testsuite/gas/m68hc11/opers12-dwarf2.d | 32 ++++----- gas/testsuite/gas/m68hc11/opers12.d | 22 +++---- 5 files changed, 78 insertions(+), 64 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 61ad4c20577..57d3c6ee8cc 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2002-12-08 Stephane Carrez + + * gas/m68hc11/bug-1825.s: Add some tests. + * gas/m68hc11/bug-1825.d: Update. + * gas/m68hc11/opers12.d: Update. + * gas/m68hc11/opers12-dwarf2.d: Update. + 2002-12-05 Richard Henderson * gas/ia64/ltoff22x-1.[ds]: New. diff --git a/gas/testsuite/gas/m68hc11/bug-1825.d b/gas/testsuite/gas/m68hc11/bug-1825.d index e9c5c7529cf..62c65b9b09a 100644 --- a/gas/testsuite/gas/m68hc11/bug-1825.d +++ b/gas/testsuite/gas/m68hc11/bug-1825.d @@ -13,7 +13,7 @@ Disassembly of section \.text: _main: nop 0: a7 nop - ldx L1,pc ; Assemble to 5-bit > 0 offset + ldx L1,pc ; Assemble to 5\-bit > 0 offset 1: ee c2 ldx 2,PC \{5 \} bra L2 3: 20 02 bra 7 @@ -26,7 +26,7 @@ _main: L1: .dc.w 0xaabb L2: - subd L1,pc ; Assemble to 5-bit < 0 offset + subd L1,pc ; Assemble to 5\-bit < 0 offset 7: a3 dc subd \-4,PC \{5 \} 0+9 : @@ -46,67 +46,72 @@ L2: 16: a7 nop L3: .ds.b 14, 0xA7 - ldab L3,pc ; 5-bit < 0 offset + ldab L3,pc ; 5\-bit < 0 offset 17: e6 d0 ldab \-16,PC \{9 \} - ldab L4,pc ; 5-bit > 0 offset - 19: e6 f8 20 ldab 32,PC \{3b \} # SCz: FIXME this is wrong + ldab L4,pc ; 5\-bit > 0 offset + 19: e6 cf ldab 15,PC \{2a \} ... -0+3b : +0+2a : ... - .skip 31 + .skip 15 L4: .skip 128 - subd L4,pc ; 9-bit < 0 offset - bb: a3 f9 7e subd \-130,PC \{3b \} - addd L5,pc ; 9-bit > 0 offset - be: e3 f8 81 addd 129,PC \{141 \} # SCz: FIXME + subd L4,pc ; 9\-bit < 0 offset + aa: a3 f9 7d subd \-131,PC \{2a \} + addd L5,pc ; 9\-bit > 0 offset + ad: e3 f8 80 addd 128,PC \{130 \} ... -0+141 : +0+130 : ... - 23d: 00 bgnd - 23e: 00 bgnd + 22c: 00 bgnd .skip 128 L5: - .skip 256-2 - orab L5,pc ; 9 bit < 0 offset (min value) - 23f: ea f9 00 orab -256,PC \{141 \} - oraa L6,pc ; 9 bit > 0 offset (max value) - 242: aa fa 00 ff oraa 255,PC \{343 \} # SCz: FIXME + .skip 256\-3 + orab L5,pc ; 9 bit < 0 offset \(min value\) + 22d: ea f9 00 orab \-256,PC \{130 \} + oraa L6,pc ; 9 bit > 0 offset \(max value\) + 230: aa f8 ff oraa 255,PC \{332 \} ... -0+345 : +0+332 : + ... + 42e: 00 bgnd + 42f: 00 bgnd .skip 255 L6: + .skip 256\-2 + orab L6,pc ; 16 bit < 0 offset + 430: ea fa fe fe orab \-258,PC \{332 \} anda _main,pc ; 16 bit < 0 offset - 345: a4 fa fc b7 anda -841,PC \{fffffffe <\.L0\+0xfffffb8c>\} # SCz: FIXME + 434: a4 fa fb c8 anda \-1080,PC \{0 <_main>\} andb L7,pc - 349: e4 fa 01 00 andb 256,PC \{44b \} # SCz: FIXME + 438: e4 fa 01 00 andb 256,PC \{53c \} ... -0+44d : +0+53c : .skip 256 L7: stab external,pc ; External 16\-bit PCREL - 44d: 6b fa 00 00 stab 0,PC \{44f \} - 44f: R_M68HC12_16 external # SCz: FIXME + 53c: 6b fa fa c0 stab \-1344,PC \{0 <_main>\} + 53e: R_M68HC12_PCREL_16 external ldd _table,pc - 451: ec cf ldd 15,PC \{462 <_table>\} + 540: ec cf ldd 15,PC \{551 <_table>\} addd _table\+2,pc - 453: e3 cf addd 15,PC \{464 <_table\+0x2>\} + 542: e3 cf addd 15,PC \{553 <_table\+0x2>\} subd _table\+4,pc - 455: a3 cf subd 15,PC \{466 <_table\+0x4>\} + 544: a3 cf subd 15,PC \{555 <_table\+0x4>\} addd _table\+8,pc - 457: e3 f8 11 addd 17,PC \{46a <_table\+0x8>\} + 546: e3 f8 10 addd 16,PC \{559 <_table\+0x8>\} addd _table\+12,pc - 45a: e3 f8 12 addd 18,PC \{46e <_table\+0xc>\} + 549: e3 f8 11 addd 17,PC \{55d <_table\+0xc>\} addd _table\+16,pc - 45d: e3 f8 13 addd 19,PC \{472 <.L0>\} + 54c: e3 f8 12 addd 18,PC \{561 <.L0>\} rts - 460: 3d rts + 54f: 3d rts nop - 461: a7 nop + 550: a7 nop -0+462 <_table>: - \.\.\. +0+551 <_table>: + ... diff --git a/gas/testsuite/gas/m68hc11/bug-1825.s b/gas/testsuite/gas/m68hc11/bug-1825.s index 4854eaca0c7..69fbe149e9a 100644 --- a/gas/testsuite/gas/m68hc11/bug-1825.s +++ b/gas/testsuite/gas/m68hc11/bug-1825.s @@ -15,18 +15,20 @@ L3: .ds.b 14, 0xA7 ldab L3,pc ; 5-bit < 0 offset ldab L4,pc ; 5-bit > 0 offset - .skip 31 + .skip 15 L4: .skip 128 subd L4,pc ; 9-bit < 0 offset addd L5,pc ; 9-bit > 0 offset .skip 128 L5: - .skip 256-2 + .skip 256-3 orab L5,pc ; 9 bit < 0 offset (min value) oraa L6,pc ; 9 bit > 0 offset (max value) .skip 255 L6: + .skip 256-2 + orab L6,pc ; 16 bit < 0 offset anda _main,pc ; 16 bit < 0 offset andb L7,pc .skip 256 diff --git a/gas/testsuite/gas/m68hc11/opers12-dwarf2.d b/gas/testsuite/gas/m68hc11/opers12-dwarf2.d index 60684dea199..469daa243c8 100644 --- a/gas/testsuite/gas/m68hc11/opers12-dwarf2.d +++ b/gas/testsuite/gas/m68hc11/opers12-dwarf2.d @@ -55,7 +55,7 @@ L1: ldy ,x ldd \[32768,pc\] 39: ec fb 80 00 ldd \[32768,PC\] ldd L1,pc - 3d: ec f9 ca ldd -54,PC \{9 \} + 3d: ec f9 c9 ldd -55,PC \{9 \} std a,x ; Two\-reg index 40: 6c e4 std A,X ldx b,x @@ -211,31 +211,31 @@ t2: leas max5b,pc 105: 1b cf leas 15,PC \{116 \} leas min9b,pc - 107: 1b f9 00 leas -256,PC \{9 \} + 107: 1b fa ff 00 leas -256,PC \{b \} leas max9b,pc - 10a: 1b f8 ff leas 255,PC \{20b <.L0\+0xd8>\} + 10b: 1b f8 ff leas 255,PC \{20d <.L0\+0xd9>\} ;; ;; Disassembler bug with movb ;; movb #23,0x2345 - 10d: 18 0b 17 23 movb #23, 2345 <.L0\+0x2212> - 111: 45 + 10e: 18 0b 17 23 movb #23, 2345 <.L0\+0x2211> + 112: 45 movb #40,12,sp - 112: 18 08 8c 28 movb #40, 12,SP + 113: 18 08 8c 28 movb #40, 12,SP movb #39,3,\+sp - 116: 18 08 a2 27 movb #39, 3,\+SP + 117: 18 08 a2 27 movb #39, 3,\+SP movb #20,14,sp - 11a: 18 08 8e 14 movb #20, 14,SP + 11b: 18 08 8e 14 movb #20, 14,SP movw #0x3210,0x3456 - 11e: 18 03 32 10 movw #3210 , 3456 - 122: 34 56 + 11f: 18 03 32 10 movw #3210 , 3456 + 123: 34 56 movw #0x4040,12,sp - 124: 18 00 8c 40 movw #4040 , 12,SP - 128: 40 + 125: 18 00 8c 40 movw #4040 , 12,SP + 129: 40 movw #0x3900,3,\+sp - 129: 18 00 a2 39 movw #3900 , 3,\+SP - 12d: 00 + 12a: 18 00 a2 39 movw #3900 , 3,\+SP + 12e: 00 movw #0x2000,14,sp - 12e: 18 00 8e 20 movw #2000 <.L0\+0x1ecd>, 14,SP - 132: 00 + 12f: 18 00 8e 20 movw #2000 <.L0\+0x1ecc>, 14,SP + 133: 00 diff --git a/gas/testsuite/gas/m68hc11/opers12.d b/gas/testsuite/gas/m68hc11/opers12.d index f2c4e12fea4..8f6de246333 100644 --- a/gas/testsuite/gas/m68hc11/opers12.d +++ b/gas/testsuite/gas/m68hc11/opers12.d @@ -26,7 +26,7 @@ Disassembly of section .text: 0+0031 ldaa \[257,Y\] 0+0035 ldab \[32767,SP\] 0+0039 ldd \[32768,PC\] -0+003d ldd \-54,PC \{0+9 \} +0+003d ldd \-55,PC \{0+9 \} 0+0040 std A,X 0+0042 ldx B,X 0+0044 stx D,Y @@ -101,13 +101,13 @@ Disassembly of section .text: 0+00ff leas 10240,Y 0+0103 leas -16,PC \{0+f5 \} 0+0105 leas 15,PC \{0+116 \} -0+0107 leas -256,PC \{0+9 \} -0+010a leas 255,PC \{0+20b \} -0+010d movb #23, 0+2345 -0+0112 movb #40, 12,SP -0+0116 movb #39, 3,\+SP -0+011a movb #20, 14,SP -0+011e movw #0+3210 , 0+3456 -0+0124 movw #0+4040 , 12,SP -0+0129 movw #0+3900 , 3,\+SP -0+012e movw #0+2000 , 14,SP +0+0107 leas -256,PC \{0+b \} +0+010b leas 255,PC \{0+20d \} +0+010e movb #23, 0+2345 +0+0113 movb #40, 12,SP +0+0117 movb #39, 3,\+SP +0+011b movb #20, 14,SP +0+011f movw #0+3210 , 0+3456 +0+0125 movw #0+4040 , 12,SP +0+012a movw #0+3900 , 3,\+SP +0+012f movw #0+2000 , 14,SP -- 2.30.2