diff options
author | Nick Clifton <nickc@redhat.com> | 2004-07-13 16:56:09 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-07-13 16:56:09 +0000 |
commit | ceb78239b960115d51d00518a384236fe5abdb02 (patch) | |
tree | dab502babf0621914579506c4f764edef709d955 /ld | |
parent | 61513dc1cba5822b78735459477e09ce819a948e (diff) | |
download | gdb-ceb78239b960115d51d00518a384236fe5abdb02.zip gdb-ceb78239b960115d51d00518a384236fe5abdb02.tar.gz gdb-ceb78239b960115d51d00518a384236fe5abdb02.tar.bz2 |
* ld-h8300/h8300.exp: Addition of gcsection test case.
* ld-h8300/gcsection.s: New test source file.
* ld-h8300/gcsection.d: New test expected disassembly file.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-h8300/gcsection.d | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-h8300/gcsection.s | 43 | ||||
-rw-r--r-- | ld/testsuite/ld-h8300/h8300.exp | 1 |
4 files changed, 77 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4069b4b..ec18521 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-07-13 Nitin Yewale <nitiny@kpitcummins.com> + + * ld-h8300/h8300.exp: Addition of gcsection test case. + * ld-h8300/gcsection.s: New test source file. + * ld-h8300/gcsection.d: New test expected disassembly file. + 2004-07-08 Maciej W. Rozycki <macro@linux-mips.org> * ld-mips-elf/reloc-merge-lo16.{s,d,ld}: New test. diff --git a/ld/testsuite/ld-h8300/gcsection.d b/ld/testsuite/ld-h8300/gcsection.d new file mode 100644 index 0000000..f0e2564 --- /dev/null +++ b/ld/testsuite/ld-h8300/gcsection.d @@ -0,0 +1,27 @@ +# name: H8300 GCC section test case +# ld: --gc-sections -m h8300helf +# objdump: -d --no-show-raw-insn +.*: file format .*-h8300 + +Disassembly of section .text: + +00000100 <_functionWeUse>: + 100: 01 00 6d f6 mov.l er6,@-er7 + 104: 0f f6 mov.l er7,er6 + 106: 1b 97 subs #4,er7 + 108: 6f e0 ff fe mov.w r0,@\(0xfffe:16,er6\) + 10c: 6f 62 ff fe mov.w @\(0xfffe:16,er6\),r2 + 110: 0d 20 mov.w r2,r0 + 112: 0b 97 adds #4,er7 + 114: 01 00 6d 76 mov.l @er7\+,er6 + 118: 54 70 rts + +0000011a <_start>: + 11a: 01 00 6d f6 mov.l er6,@-er7 + 11e: 0f f6 mov.l er7,er6 + 120: 79 00 00 4b mov.w #0x4b,r0 + 124: 5e 00 01 00 jsr @0x100:24 + 128: 0d 02 mov.w r0,r2 + 12a: 0d 20 mov.w r2,r0 + 12c: 01 00 6d 76 mov.l @er7\+,er6 + 130: 54 70 rts diff --git a/ld/testsuite/ld-h8300/gcsection.s b/ld/testsuite/ld-h8300/gcsection.s new file mode 100644 index 0000000..2149ee9 --- /dev/null +++ b/ld/testsuite/ld-h8300/gcsection.s @@ -0,0 +1,43 @@ + .h8300h + .section .text.functionWeUse,"ax",@progbits + .align 1 + .global _functionWeUse +_functionWeUse: + mov.l er6,@-er7 + mov.l er7,er6 + subs #4,er7 + mov.w r0,@(-2,er6) + mov.w @(-2,er6),r2 + mov.w r2,r0 + adds #4,er7 + mov.l @er7+,er6 + rts + .size _functionWeUse, .-_functionWeUse + .section .text.functionWeDontUse,"ax",@progbits + .align 1 + .global _functionWeDontUse +_functionWeDontUse: + mov.l er6,@-er7 + mov.l er7,er6 + subs #4,er7 + mov.w r0,@(-2,er6) + mov.w @(-2,er6),r2 + mov.w r2,r0 + adds #4,er7 + mov.l @er7+,er6 + rts + .size _functionWeDontUse, .-_functionWeDontUse + .section .text.start,"ax",@progbits + .align 1 + .global _start +_start: + mov.l er6,@-er7 + mov.l er7,er6 + mov.w #75,r0 + jsr @_functionWeUse + mov.w r0,r2 + mov.w r2,r0 + mov.l @er7+,er6 + rts + .size _start, .-_start + .end diff --git a/ld/testsuite/ld-h8300/h8300.exp b/ld/testsuite/ld-h8300/h8300.exp index a063f4e..0c109ce 100644 --- a/ld/testsuite/ld-h8300/h8300.exp +++ b/ld/testsuite/ld-h8300/h8300.exp @@ -31,6 +31,7 @@ if {[istarget *-elf]} { run_dump_test relax-3 run_dump_test relax-4 run_dump_test relax-5 + run_dump_test gcsection } else { run_dump_test relax-3-coff run_dump_test relax-4-coff |