diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-11-22 17:45:57 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-11-22 17:45:57 +0000 |
commit | e821645dee843d03841ed5bcf046ffae265b535e (patch) | |
tree | 406e47eb2c9d358cde23d19e91f965ed748a8a16 /gas | |
parent | a13e2c95aa6a29e5e302edf7fdb51bc17a5a74cb (diff) | |
download | gdb-e821645dee843d03841ed5bcf046ffae265b535e.zip gdb-e821645dee843d03841ed5bcf046ffae265b535e.tar.gz gdb-e821645dee843d03841ed5bcf046ffae265b535e.tar.bz2 |
opcodes/
* arm-dis.c (last_is_thumb): Delete.
(enum map_type, last_type): New.
(print_insn_data): New.
(get_sym_code_type): Take MAP_TYPE argument. Check the type of
the right symbol. Handle $d.
(print_insn): Check for mapping symbols even without a normal
symbol. Adjust searching. If $d is found see how much data
to print. Handle data.
gas/
* config/tc-arm.h (md_cons_align): Define.
(mapping_state): New prototype.
* config/tc-arm.c (mapping_state): Make global.
gas/testsuite/
* gas/arm/arm7t.d, gas/arm/neon-ldst-rm.d, gas/arm/thumb2_pool.d,
gas/arm/tls.d: Update for $d support.
* gas/arm/mapshort.d, gas/arm/mapshort.s: New test.
* gas/elf/section2.e-armeabi: Update.
* gas/elf/section2.e-armelf: New file.
* gas/elf/elf.exp: Use it.
ld/testsuite/
* ld-arm/mixed-app.d, ld-arm/tls-app.d, ld-arm/tls-lib.d: Update
for $d support.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 2 | ||||
-rw-r--r-- | gas/config/tc-arm.h | 8 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/arm7t.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapshort.d | 41 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/mapshort.s | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/neon-ldst-rm.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/thumb2_pool.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/tls.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/elf.exp | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/section2.e-armeabi | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/elf/section2.e-armelf | 9 |
13 files changed, 112 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 543a316..503b59d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2006-11-22 Daniel Jacobowitz <dan@codesourcery.com> + + * config/tc-arm.h (md_cons_align): Define. + (mapping_state): New prototype. + * config/tc-arm.c (mapping_state): Make global. + 2006-11-22 Alan Modra <amodra@bigpond.net.au> * config/obj-elf.c (obj_elf_version): Use memcpy rather than strcpy. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index dcc8e80..f7a3e74 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -2282,7 +2282,7 @@ s_unreq (int a ATTRIBUTE_UNUSED) static enum mstate mapstate = MAP_UNDEFINED; -static void +void mapping_state (enum mstate state) { symbolS * symbolP; diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 64ebb51..56ceec4 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -192,6 +192,12 @@ extern void arm_md_end (void); # define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" # define TC_SEGMENT_INFO_TYPE struct arm_segment_info_type +/* This is not really an alignment operation, but it's something we + need to do at the same time: whenever we are figuring out the + alignment for data, we should check whether a $d symbol is + necessary. */ +# define md_cons_align(nbytes) mapping_state (MAP_DATA) + enum mstate { MAP_UNDEFINED = 0, /* Must be zero, for seginfo in new sections. */ @@ -200,6 +206,8 @@ enum mstate MAP_THUMB }; +void mapping_state (enum mstate); + struct arm_segment_info_type { enum mstate mapstate; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 95e184a..ca48446 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2006-11-22 Daniel Jacobowitz <dan@codesourcery.com> + + * gas/arm/arm7t.d, gas/arm/neon-ldst-rm.d, gas/arm/thumb2_pool.d, + gas/arm/tls.d: Update for $d support. + * gas/arm/mapshort.d, gas/arm/mapshort.s: New test. + * gas/elf/section2.e-armeabi: Update. + * gas/elf/section2.e-armelf: New file. + * gas/elf/elf.exp: Use it. + 2006-11-16 Nathan Sidwell <nathan@codesourcery.com> * gas/m68k/all.exp: Add mcf-trap. diff --git a/gas/testsuite/gas/arm/arm7t.d b/gas/testsuite/gas/arm/arm7t.d index 17e4e9d..6551388 100644 --- a/gas/testsuite/gas/arm/arm7t.d +++ b/gas/testsuite/gas/arm/arm7t.d @@ -62,7 +62,7 @@ Disassembly of section .text: 0+d0 <[^>]*> b19100d2 ? ldrltsb r0, \[r1, r2\] 0+d4 <[^>]*> e1df00f4 ? ldrsh r0, \[pc, #4\] ; 0+e0 <[^>]*> 0+d8 <[^>]*> e1df00f4 ? ldrsh r0, \[pc, #4\] ; 0+e4 <[^>]*> -0+dc <[^>]*> 00000000 ? andeq r0, r0, r0 +0+dc <[^>]*> 00000000 ? .word 0x00000000 [ ]*dc:.*fred 0+e0 <[^>]*> 0000c0de ? .* 0+e4 <[^>]*> 0000dead ? .* diff --git a/gas/testsuite/gas/arm/mapshort.d b/gas/testsuite/gas/arm/mapshort.d new file mode 100644 index 0000000..d5b5793 --- /dev/null +++ b/gas/testsuite/gas/arm/mapshort.d @@ -0,0 +1,41 @@ +#objdump: --syms --special-syms -d +#name: ARM Mapping Symbols for .short +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +# Test the generation and use of ARM ELF Mapping Symbols + +.*: +file format .*arm.* + +SYMBOL TABLE: +0+00 l d .text 00000000 .text +0+00 l d .data 00000000 .data +0+00 l d .bss 00000000 .bss +0+00 l F .text 00000000 foo +0+00 l .text 00000000 \$a +0+04 l .text 00000000 \$t +0+08 l .text 00000000 \$d +0+12 l .text 00000000 \$t +0+16 l .text 00000000 \$d +0+18 l .text 00000000 \$a +0+1c l .text 00000000 \$d +0+1f l .text 00000000 bar + + +Disassembly of section .text: + +0+00 <foo>: + 0: e1a00000 nop \(mov r0,r0\) + 4: 46c0 nop \(mov r8, r8\) + 6: 46c0 nop \(mov r8, r8\) + 8: 00000002 .word 0x00000002 + c: 00010001 .word 0x00010001 + 10: 0003 .short 0x0003 + 12: 46c0 nop \(mov r8, r8\) + 14: 46c0 nop \(mov r8, r8\) + 16: 0001 .short 0x0001 + 18: ebfffff8 bl 0 <foo> + 1c: 0008 .short 0x0008 + 1e: 09 .byte 0x09 +0+1f <bar>: + 1f: 0a .byte 0x0a diff --git a/gas/testsuite/gas/arm/mapshort.s b/gas/testsuite/gas/arm/mapshort.s new file mode 100644 index 0000000..a119447 --- /dev/null +++ b/gas/testsuite/gas/arm/mapshort.s @@ -0,0 +1,21 @@ + .text + .type foo, %function +foo: + .code 32 + nop + .code 16 + nop + nop + .long 2 + .short 1 + .short 1 + .short 3 + nop + nop + .short 1 + .code 32 + bl foo + .short 8 + .byte 9 +bar: + .byte 10 diff --git a/gas/testsuite/gas/arm/neon-ldst-rm.d b/gas/testsuite/gas/arm/neon-ldst-rm.d index c538fc9..292d17a 100644 --- a/gas/testsuite/gas/arm/neon-ldst-rm.d +++ b/gas/testsuite/gas/arm/neon-ldst-rm.d @@ -45,7 +45,7 @@ Disassembly of section \.text: 0[0-9a-f]+ <[^>]+> ed224b08 vstmdb r2!, {d4-d7} 0[0-9a-f]+ <[^>]+> ed628b10 vstmdb r2!, {d24-d31} 0[0-9a-f]+ <[^>]+> ed223b20 vstmdb r2!, {d3-d18} -0[0-9a-f]+ <backward> 000001f4 streqd r0, \[r0\], -r4 +0[0-9a-f]+ <backward> 000001f4 .word 0x000001f4 0[0-9a-f]+ <[^>]+> eddf6b0b vldr d22, \[pc, #44\] ; 0[0-9a-f]+ <forward> 0[0-9a-f]+ <[^>]+> ed935b00 vldr d5, \[r3\] 0[0-9a-f]+ <[^>]+> ed135b01 vldr d5, \[r3, #-4\] @@ -59,5 +59,5 @@ Disassembly of section \.text: 0[0-9a-f]+ <[^>]+> ed835b00 vstr d5, \[r3\] 0[0-9a-f]+ <[^>]+> ed035b40 vstr d5, \[r3, #-256\] 0[0-9a-f]+ <[^>]+> ed835b40 vstr d5, \[r3, #256\] -0[0-9a-f]+ <forward> 000002bc streqh r0, \[r0\], -ip +0[0-9a-f]+ <forward> 000002bc .word 0x000002bc 0[0-9a-f]+ <[^>]+> ed1f7b11 vldr d7, \[pc, #-68\] ; 0[0-9a-f]+ <backward> diff --git a/gas/testsuite/gas/arm/thumb2_pool.d b/gas/testsuite/gas/arm/thumb2_pool.d index 7bf0c60..3e3ca59 100644 --- a/gas/testsuite/gas/arm/thumb2_pool.d +++ b/gas/testsuite/gas/arm/thumb2_pool.d @@ -11,5 +11,4 @@ Disassembly of section .text: 0+00c <[^>]+> bf00 nop 0+00e <[^>]+> f8df 5004 ldr\.w r5, \[pc, #4\] ; 00+14 <[^>]+> 0+012 <[^>]+> 4900 ldr r1, \[pc, #0\] \(00+14 <[^>]+>\) -0+014 <[^>]+> (5678|1234) .* -0+016 <[^>]+> (1234|5678) .* +0+014 <[^>]+> 12345678 ? .word 0x12345678 diff --git a/gas/testsuite/gas/arm/tls.d b/gas/testsuite/gas/arm/tls.d index 5b41109..5189dff 100644 --- a/gas/testsuite/gas/arm/tls.d +++ b/gas/testsuite/gas/arm/tls.d @@ -15,11 +15,11 @@ Disassembly of section .text: 0: e1a00000 nop \(mov r0,r0\) 4: e1a00000 nop \(mov r0,r0\) 8: e1a0f00e mov pc, lr - c: 00000000 andeq r0, r0, r0 + c: 00000000 .word 0x00000000 c: R_ARM_TLS_GD32 a - 10: 00000004 andeq r0, r0, r4 + 10: 00000004 .word 0x00000004 10: R_ARM_TLS_LDM32 b - 14: 00000008 andeq r0, r0, r8 + 14: 00000008 .word 0x00000008 14: R_ARM_TLS_IE32 c - 18: 00000000 andeq r0, r0, r0 + 18: 00000000 .word 0x00000000 18: R_ARM_TLS_LE32 d diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 67ccc5b..0d51aa0 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -54,10 +54,14 @@ if { ([istarget "*-*-*elf*"] set target_machine -score } if { ([istarget "*arm*-*-*"] - || [istarget "xscale*-*-*"]) - && ([istarget "*-*-*eabi"] - || [istarget "*-*-symbianelf"])} then { - set target_machine -armeabi + || [istarget "xscale*-*-*"]) } { + + if { ([istarget "*-*-*eabi"] + || [istarget "*-*-symbianelf"])} then { + set target_machine -armeabi + } else { + set target_machine -armelf + } } run_dump_test "ehopt0" run_dump_test "group0a" diff --git a/gas/testsuite/gas/elf/section2.e-armeabi b/gas/testsuite/gas/elf/section2.e-armeabi index 84463b1..13a1525 100644 --- a/gas/testsuite/gas/elf/section2.e-armeabi +++ b/gas/testsuite/gas/elf/section2.e-armeabi @@ -7,3 +7,4 @@ Symbol table '.symtab' contains 6 entries: 3: 0+0 0 SECTION LOCAL DEFAULT 3 4: 0+0 0 SECTION LOCAL DEFAULT 4 5: 0+0 0 SECTION LOCAL DEFAULT 5 + 6: 0+0 0 NOTYPE LOCAL DEFAULT 4 \$d diff --git a/gas/testsuite/gas/elf/section2.e-armelf b/gas/testsuite/gas/elf/section2.e-armelf new file mode 100644 index 0000000..8d2e4ff --- /dev/null +++ b/gas/testsuite/gas/elf/section2.e-armelf @@ -0,0 +1,9 @@ + +Symbol table '.symtab' contains 6 entries: + Num: Value[ ]* Size Type Bind Vis Ndx Name + 0: 0+0 0 NOTYPE LOCAL DEFAULT UND + 1: 0+0 0 SECTION LOCAL DEFAULT 1 + 2: 0+0 0 SECTION LOCAL DEFAULT 2 + 3: 0+0 0 SECTION LOCAL DEFAULT 3 + 4: 0+0 0 SECTION LOCAL DEFAULT 4 + 5: 0+0 0 NOTYPE LOCAL DEFAULT 4 \$d |