diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-11-08 11:15:13 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2005-11-08 11:15:13 +0000 |
commit | 6f84a2a6497dab3564cb0fb0031632700158393b (patch) | |
tree | e2f6f244e27b5cc4d4c0e1ed433776221a7d12c5 /gas/testsuite | |
parent | 16ac4ab5a8d7c4998e8a2648a452df6e96e5e4ef (diff) | |
download | gdb-6f84a2a6497dab3564cb0fb0031632700158393b.zip gdb-6f84a2a6497dab3564cb0fb0031632700158393b.tar.gz gdb-6f84a2a6497dab3564cb0fb0031632700158393b.tar.bz2 |
bfd:
Add ms2.
* archures.c (bfd_mach_ms2): Define.
* cpu-ms1.c (arch_info_struct): Add ms2 stanza.
* elf32-ms1.c (elf32_ms1_machine): Add ms2 case.
(ms1_elf_merge_private_bfd_data): Remove unused variables. Add
correct merging logic, with workaround.
(ms1_elf_print_private_bfd_data): Add ms2 case.
* reloc.c (BFD_RELOC_MS1_PCINSN8): Add ms2 specific reloc.
* libbfd.h: Regenerated.
* bfd-in2.h: Regenerated.
cpu:
Add ms2
* ms1.cpu (ms2, ms2bf): New architecture variant, cpu, machine and
model.
(f-uu8, f-uu1, f-imm16l, f-loopo, f-cb1sel, f-cb2sel, f-cb1incr,
f-cb2incr, f-rc3): New fields.
(LOOP): New instruction.
(JAL-HAZARD): New hazard.
(imm16o, loopsize, imm16l, rc3, cb1sel, cb2sel, cb1incr, cb2incr):
New operands.
(mul, muli, dbnz, iflush): Enable for ms2
(jal, reti): Has JAL-HAZARD.
(ldctxt, ldfb, stfb): Only ms1.
(fbcb): Only ms1,ms1-003.
(wfbinc, mefbinc, wfbincr, mwfbincr, fbcbincs, mfbcbincs,
fbcbincrs, mfbcbincrs): Enable for ms2.
(loop, loopu, dfbc, dwfb, fbwfb, dfbr): New ms2 insns.
* ms1.opc (parse_loopsize): New.
(parse_imm16): hi16/lo16 relocs are applicable to IMM16L.
(print_pcrel): New.
gas:
Add ms2.
* config/tc-ms1.c (ms1_mach_bitmask): Initialize to MS1.
(ms1_architectures): Add ms2.
(md_parse_option): Add ms2.
(md_show_usage): Add ms2.
(md_assemble): Add JAL_HAZARD detection logic.
(md_cgen_lookup_reloc): Add MS1_OPERAND_LOOPSIZE case.
* doc/c-ms1.texi: New.
* doc/all.texi: Add MS1.
* doc/Makefile.am (CPU_DOCS): Add c-ms1.texi.
* doc/Makefile.in: Rebuilt.
* doc/Makefile: Rebuilt.
gas/testsuite:
Add ms2.
* gas/ms1/allinsn.d: Adjust pcrel disassembly.
* gas/ms1/errors.exp: Fix target triplet.
* gas/ms1/ms1-16-003.d: Adjust pcrel disassembly.
* gas/ms1/ms1-16-003.s: Tweak label.
* gas/ms1/ms1.exp: Adjust target triplet. Add ms2 test.
* gas/ms1/ms2.d, gas/ms1/ms2.s: New.
* gas/ms1/relocs.d: Adjust expected machine name and pcrel
disassembly.
* gas/ms1/relocs.exp: Adjust target triplet.
include:
Add ms2.
* elf/ms1.h (EF_MS1_CPU_MS2): New.
opcodes:
Add ms2.
* ms1-asm.c, ms1-desc.c, ms1-desc.h, ms1-dis.c, ms1-ibld.c,
ms1-opc.c, ms1-opc.h: Regenerated.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/allinsn.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/errors.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/ms1-16-003.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/ms1-16-003.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/ms1.exp | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/ms2.d | 18 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/ms2.s | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/relocs.d | 13 | ||||
-rw-r--r-- | gas/testsuite/gas/ms1/relocs.exp | 2 |
10 files changed, 61 insertions, 17 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index d9a47c5..8bd4ffc 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2005-11-08 Nathan Sidwell <nathan@codesourcery.com> + + Add ms2. + * gas/ms1/allinsn.d: Adjust pcrel disassembly. + * gas/ms1/errors.exp: Fix target triplet. + * gas/ms1/ms1-16-003.d: Adjust pcrel disassembly. + * gas/ms1/ms1-16-003.s: Tweak label. + * gas/ms1/ms1.exp: Adjust target triplet. Add ms2 test. + * gas/ms1/ms2.d, gas/ms1/ms2.s: New. + * gas/ms1/relocs.d: Adjust expected machine name and pcrel + disassembly. + * gas/ms1/relocs.exp: Adjust target triplet. + 2005-11-07 Jan Beulich <jbeulich@novell.com> * gas/all/redef2.[sd]: New. diff --git a/gas/testsuite/gas/ms1/allinsn.d b/gas/testsuite/gas/ms1/allinsn.d index d992c58..03db93d 100644 --- a/gas/testsuite/gas/ms1/allinsn.d +++ b/gas/testsuite/gas/ms1/allinsn.d @@ -88,16 +88,16 @@ Disassembly of section .text: 68: 25 00 00 00 asri R0,R0,#\$0 0000006c <brlt>: - 6c: 31 00 00 00 brlt R0,R0,\$0 + 6c: 31 00 00 00 brlt R0,R0,6c <brlt> 00000070 <brle>: - 70: 33 00 00 00 brle R0,R0,\$0 + 70: 33 00 00 00 brle R0,R0,70 <brle> 00000074 <breq>: - 74: 35 00 00 00 breq R0,R0,\$0 + 74: 35 00 00 00 breq R0,R0,74 <breq> 00000078 <jmp>: - 78: 37 00 00 00 jmp \$0 + 78: 37 00 00 00 jmp 78 <jmp> 0000007c <jal>: 7c: 38 00 00 00 jal R0,R0 @@ -121,7 +121,7 @@ Disassembly of section .text: 94: 64 00 00 00 si R0 00000098 <brne>: - 98: 3b 00 00 00 brne R0,R0,\$0 + 98: 3b 00 00 00 brne R0,R0,98 <brne> 0000009c <break>: 9c: 68 00 00 00 break diff --git a/gas/testsuite/gas/ms1/errors.exp b/gas/testsuite/gas/ms1/errors.exp index 90a8976..dd47d43 100644 --- a/gas/testsuite/gas/ms1/errors.exp +++ b/gas/testsuite/gas/ms1/errors.exp @@ -27,7 +27,7 @@ proc mrisc1_error_test { file testname {warnpattern ""} } { } } -if [istarget mrisc1*-*-*] { +if [istarget ms1-*-*] { foreach file [glob -nocomplain -- $srcdir/$subdir/bad*.s] { set file [file tail $file] switch -- $file { diff --git a/gas/testsuite/gas/ms1/ms1-16-003.d b/gas/testsuite/gas/ms1/ms1-16-003.d index 0233d85..f855696 100644 --- a/gas/testsuite/gas/ms1/ms1-16-003.d +++ b/gas/testsuite/gas/ms1/ms1-16-003.d @@ -12,8 +12,8 @@ Disassembly of section .text: 4: 08 00 00 00 mul R0,R0,R0 00000008 <muli>: 8: 09 00 00 00 muli R0,R0,#\$0 -0000000c <dbnz>: - c: 3d 00 00 00 dbnz R0,\$0 +0000000c <dbnz_>: + c: 3d 00 00 00 dbnz R0,c <dbnz_> [ ]*c: R_MS1_PC16 dbnz 00000010 <fbcbincs>: 10: f0 00 00 00 fbcbincs #\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0 diff --git a/gas/testsuite/gas/ms1/ms1-16-003.s b/gas/testsuite/gas/ms1/ms1-16-003.s index ec1dd7b..516fff5 100644 --- a/gas/testsuite/gas/ms1/ms1-16-003.s +++ b/gas/testsuite/gas/ms1/ms1-16-003.s @@ -12,7 +12,7 @@ muli: muli R0, R0, #0 .global dbnz -dbnz: +dbnz_: dbnz r0, dbnz .global fbcbincs diff --git a/gas/testsuite/gas/ms1/ms1.exp b/gas/testsuite/gas/ms1/ms1.exp index 49aea81..1960f0d 100644 --- a/gas/testsuite/gas/ms1/ms1.exp +++ b/gas/testsuite/gas/ms1/ms1.exp @@ -1,10 +1,11 @@ # MRISC1 assembler testsuite. -if { [istarget mrisc1*-*-*] || [istarget ms1-*-*]} then { +if [istarget ms1*-*-*] { # run_dump_test "allinsn" run_dump_test "misc" run_dump_test "msys" run_dump_test "ms1-16-003" + run_dump_test "ms2" # } diff --git a/gas/testsuite/gas/ms1/ms2.d b/gas/testsuite/gas/ms1/ms2.d new file mode 100644 index 0000000..8771052 --- /dev/null +++ b/gas/testsuite/gas/ms1/ms2.d @@ -0,0 +1,18 @@ +#as: -march=ms2 +#objdump: -dr +#name: ms2 + +.*: +file format .* + +Disassembly of section .text: + +00000000 <code>: + 0: 3e 10 00 05 loop R1,1c <label> + 4: 3f 00 10 04 loopi #\$10,1c <label> + 8: 83 ff ff ff dfbc #\$7,#\$7,#\$ffffffff,#\$ffffffff,#\$1,#\$1,#\$3f + c: 87 ff ff 7f dwfb #\$7,#\$7,#\$ffffffff,#\$ffffffff,#\$1,#\$3f + 10: 8b ff ff ff fbwfb #\$7,#\$7,#\$ffffffff,#\$ffffffff,#\$1,#\$1,#\$3f + 14: 8f f0 ff ff dfbr #\$7,#\$7,R0,#\$7,#\$7,#\$7,#\$1,#\$3f + 18: 12 00 00 00 nop +0000001c <label>: + 1c: f0 00 00 00 fbcbincs #\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0,#\$0 diff --git a/gas/testsuite/gas/ms1/ms2.s b/gas/testsuite/gas/ms1/ms2.s new file mode 100644 index 0000000..37efbf0 --- /dev/null +++ b/gas/testsuite/gas/ms1/ms2.s @@ -0,0 +1,11 @@ + +code: + loop R1, label + loopi #16,label + dfbc #7,#7,#-1,#-1,#1,#1,#63 + dwfb #7,#7,#-1,#-1,#1,#63 + fbwfb #7,#7,#-1,#-1,#1,#1,#63 + dfbr #7,#7,R0,#7,#7,#7,#1,#63 + nop +label: + fbcbincs #0,#0,#0,#0,#0,#0,#0,#0,#0,#0 diff --git a/gas/testsuite/gas/ms1/relocs.d b/gas/testsuite/gas/ms1/relocs.d index a9a66e9..2a752ba 100644 --- a/gas/testsuite/gas/ms1/relocs.d +++ b/gas/testsuite/gas/ms1/relocs.d @@ -1,8 +1,8 @@ -relocs.x: file format elf32-mrisc1 +relocs.x: file format elf32-(mrisc1|ms1) Contents of section .text: - 2000 00131000 37000004 12000000 3700fff8 ....7.......7... + 2000 00131000 3700dffc 12000000 3700fff8 ....7.......7... 2010 03210000 03212215 03210001 03210000 .!...!"..!...!.. 2020 0321ffff 0321eeee 03210005 03210006 .!...!...!...!.. 2030 00675000 .gP. @@ -38,18 +38,19 @@ Contents of section .data: 22f4 00000000 00000000 00000000 00000000 ................ 2304 00000000 00000000 00000000 00000000 ................ 2314 000003 ... -Contents of section .sbss: +Contents of section .stack: + 7ffff0 deaddead .... Disassembly of section .text: 00002000 <_start>: 2000: 00 13 10 00 add R1,R1,R3 00002004 <local>: - 2004: 37 00 00 04 jmp \$4 + 2004: 37 00 df fc jmp 0 <_start-0x2000> 00002008 <none>: - 2008: 12 00 00 00 or R0,R0,R0 - 200c: 37 00 ff f8 jmp \$fffffff8 + 2008: 12 00 00 00 nop + 200c: 37 00 ff f8 jmp 2004 <local> 2010: 03 21 00 00 addui R1,R2,#\$0 2014: 03 21 22 15 addui R1,R2,#\$2215 2018: 03 21 00 01 addui R1,R2,#\$1 diff --git a/gas/testsuite/gas/ms1/relocs.exp b/gas/testsuite/gas/ms1/relocs.exp index b02e208..41c84e2 100644 --- a/gas/testsuite/gas/ms1/relocs.exp +++ b/gas/testsuite/gas/ms1/relocs.exp @@ -20,7 +20,7 @@ proc regexp_test { file1 file2 test } { global srcdir subdir -if [istarget mrisc1*-*-* || istarget ms1-*] { +if [istarget ms1-*] { gas_test "relocs1.s" {-o relocs1.o} {} {assembling relocs1} # gas_test "relocs2.s" {-o relocs2.o} {} {assembling relocs2} |