This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Test case for recent h8300 gas patch
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 09 Jun 2003 16:50:03 +0100
- Subject: Test case for recent h8300 gas patch
This patch adds a test case for:
2003-06-05 Richard Sandiford <rsandifo@redhat.com>
* config/tc-h8sx.c (DMODE): Remove.
(colonmod24): Don't choose a default if the operand is a 16-bit
constant integer.
(fix_operand_size): New function.
(md_assemble): Use it to choose between @(d:2, ERn) and @(d:16,ERn).
Adjust @(d:2,ERn) operands before choosing the specific opcodes.
Tested on h8300-elf. OK to install?
Richard
* gas/h8300/h8sx_disp2.[sd]: New test.
* gas/h8300/h8300.exp: Run it.
Index: testsuite/gas/h8300/h8300.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/h8300/h8300.exp,v
retrieving revision 1.3
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.3 h8300.exp
*** testsuite/gas/h8300/h8300.exp 30 Aug 2001 21:08:43 -0000 1.3
--- testsuite/gas/h8300/h8300.exp 9 Jun 2003 15:50:32 -0000
*************** if [istarget h8300*-*-*] then {
*** 2167,2172 ****
--- 2167,2174 ----
do_h8300h_mov32bug
+ run_dump_test h8sx_disp2
+
# Now some random tests
set svr4pic [expr [istarget *-*-elf*] || [istarget *-*-irix5*] ]
set empic [expr [istarget *-*-ecoff*] || [istarget *-*-ultrix*] || [istarget *-*-irix\[1-4\]*] ]
*** /dev/null Thu Apr 11 15:25:15 2002
--- testsuite/gas/h8300/h8sx_disp2.d Mon Jun 9 16:38:37 2003
***************
*** 0 ****
--- 1,37 ----
+ # objdump: -d
+
+ .*: *file format elf32-h8300
+
+ 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 *
*** /dev/null Thu Apr 11 15:25:15 2002
--- testsuite/gas/h8300/h8sx_disp2.s Mon Jun 9 16:38:37 2003
***************
*** 0 ****
--- 1,18 ----
+ .h8300sx
+ add.b #2,@(1,er0) ; L_2
+ add.b #2,@(2,er0) ; L_2
+ add.b #2,@(3,er0) ; L_2
+ add.b #2,@(4,er0) ; L_16
+
+ 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.l #2,@(1,er0) ; L_16
+ add.l #2,@(2,er0) ; L_16
+ add.l #2,@(4,er0) ; L_2
+ add.l #2,@(8,er0) ; L_2
+ add.l #2,@(12,er0) ; L_2
+ add.l #2,@(16,er0) ; L_16