diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2007-12-10 10:36:00 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2007-12-10 10:36:00 +0000 |
commit | 742a56fee56f186cb3a033d456cd0e3cd74c0751 (patch) | |
tree | e515ffe26daf67b2de383cfde5365ff403fc70d0 /gas/testsuite | |
parent | 62cf9b51b44109447fa48522801f9e88ede8410f (diff) | |
download | gdb-742a56fee56f186cb3a033d456cd0e3cd74c0751.zip gdb-742a56fee56f186cb3a033d456cd0e3cd74c0751.tar.gz gdb-742a56fee56f186cb3a033d456cd0e3cd74c0751.tar.bz2 |
gas/
* config/tc-mips.h (mips_nop_opcode): Declare.
(NOP_OPCODE): Define.
(mips_segment_info): New structure.
(TC_SEGMENT_INFO_TYPE): Use it instead of insn_label_list.
* config/tc-mips.c (label_list): Adjust for new TC_SEGMENT_INFO_TYPE.
(mips_record_mips16_mode): New function.
(install_insn): Call it.
(mips_align): Likewise. Turn the fill argument into an "int *".
Use frag_align_code for code segments if no fill data is given.
(s_align): Adjust call accordingly.
(mips_nop_opcode): New function.
(mips_handle_align): Use the first variable byte to decide which
nop sequence is needed. Use md_number_to_chars and mips16_nop_insn.
gas/testsuite/
* gas/mips/align2.s, gas/mips/align2.d, gas/mips/align2-el.d: New
tests.
* gas/mips/mips.exp: Run them.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/align2-el.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/align2.d | 41 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/align2.s | 35 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 2 |
5 files changed, 126 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index aa5e20c..61450eb 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-12-10 Richard Sandiford <rsandifo@nildram.co.uk> + + * gas/mips/align2.s, gas/mips/align2.d, gas/mips/align2-el.d: New + tests. + * gas/mips/mips.exp: Run them. + 2007-12-07 Bob Wilson <bob.wilson@acm.org> * gas/xtensa/all.exp: Run new pcrel test. diff --git a/gas/testsuite/gas/mips/align2-el.d b/gas/testsuite/gas/mips/align2-el.d new file mode 100644 index 0000000..1f50774 --- /dev/null +++ b/gas/testsuite/gas/mips/align2-el.d @@ -0,0 +1,42 @@ +# source: align2.s +# as: -EL +# objdump: -dr + +.* file format .* + +Disassembly of section \.text: + +00000000 <f1>: + 0: 4a01 addiu v0,1 + 2: 6500 nop + 4: 6500 nop + 6: 6500 nop + 8: 4b01 addiu v1,1 + a: 6500 nop + +0000000c <f2>: + c: 24420001 addiu v0,v0,1 + 10: 24630001 addiu v1,v1,1 + \.\.\. + 20: 24840001 addiu a0,a0,1 + 24: 00000000 nop + +00000028 <f3>: + 28: 4001 addiu s0,s0,1 + 2a: 6500 nop + 2c: 6500 nop + 2e: 6500 nop + 30: 6500 nop + 32: 6500 nop + 34: 6500 nop + 36: 6500 nop + 38: 6500 nop + 3a: 6500 nop + 3c: 6500 nop + 3e: 6500 nop + +Disassembly of section \.text\.a: + +00000000 <f4>: + 0: 24a50001 addiu a1,a1,1 + \.\.\. diff --git a/gas/testsuite/gas/mips/align2.d b/gas/testsuite/gas/mips/align2.d new file mode 100644 index 0000000..7090cee --- /dev/null +++ b/gas/testsuite/gas/mips/align2.d @@ -0,0 +1,41 @@ +# as: -EB +# objdump: -dr + +.* file format .* + +Disassembly of section \.text: + +00000000 <f1>: + 0: 4a01 addiu v0,1 + 2: 6500 nop + 4: 6500 nop + 6: 6500 nop + 8: 4b01 addiu v1,1 + a: 6500 nop + +0000000c <f2>: + c: 24420001 addiu v0,v0,1 + 10: 24630001 addiu v1,v1,1 + \.\.\. + 20: 24840001 addiu a0,a0,1 + 24: 00000000 nop + +00000028 <f3>: + 28: 4001 addiu s0,s0,1 + 2a: 6500 nop + 2c: 6500 nop + 2e: 6500 nop + 30: 6500 nop + 32: 6500 nop + 34: 6500 nop + 36: 6500 nop + 38: 6500 nop + 3a: 6500 nop + 3c: 6500 nop + 3e: 6500 nop + +Disassembly of section \.text\.a: + +00000000 <f4>: + 0: 24a50001 addiu a1,a1,1 + \.\.\. diff --git a/gas/testsuite/gas/mips/align2.s b/gas/testsuite/gas/mips/align2.s new file mode 100644 index 0000000..ab73732 --- /dev/null +++ b/gas/testsuite/gas/mips/align2.s @@ -0,0 +1,35 @@ + .text + .align 5 + .type f1,@function +f1: + .set mips16 + addiu $2,1 + .align 3 + addiu $3,1 + .size f1,.-f1 + + .align 2 + .set nomips16 + .type f2,@function +f2: + addiu $2,$2,1 + addiu $3,$3,1 + .align 4 + addiu $4,$4,1 + .align 3 + .size f2,.-f2 + + .set mips16 + .type f3,@function +f3: + addiu $16,$16,1 + .align 3 + .size f3,.-f3 + + .section .text.a,"ax",@progbits + .align 4 + .set nomips16 + .type f4,@function +f4: + addiu $5,$5,1 + .size f4,.-f4 diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 5d04f41..dd2eaef 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -786,5 +786,7 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "noreorder" run_dump_test "align" + run_dump_test "align2" + run_dump_test "align2-el" run_dump_test "odd-float" } |