mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
1857fe72af
This patch adds default data address space origin (0x800000) to the symbol addresses. when disassemble lds/sts instructions. So that symbol names shall be printed in comments for lds/sts instructions disassemble. ld/ * testsuite/ld-avr/lds-mega.d: New test. * testsuite/ld-avr/lds-mega.s: New test source. * testsuite/ld-avr/lds-tiny.d: New test. * testsuite/ld-avr/lds-tiny.s: New test source. opcodes/ * avr-dis.c (avr_operand): Add default data address space origin (0x800000) to the address and set as symbol address for LDS/ STS immediate operands.
24 lines
580 B
Makefile
24 lines
580 B
Makefile
#name: AVR (avr51) check disassembly if symbolic name present
|
|
#as: -mavr51
|
|
#ld: -mavr51
|
|
#source: lds-mega.s
|
|
#objdump: -d
|
|
#target: avr-*-*
|
|
|
|
.*: file format elf32-avr
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
00000000 <main>:
|
|
0: 80 91 00 01 lds r24, 0x0100 ; 0x800100 <_edata>
|
|
4: 08 2e mov r0, r24
|
|
6: 00 0c add r0, r0
|
|
8: 99 0b sbc r25, r25
|
|
a: 90 93 03 01 sts 0x0103, r25 ; 0x800103 <myvar2\+0x1>
|
|
e: 80 93 02 01 sts 0x0102, r24 ; 0x800102 <myvar2>
|
|
12: 80 e0 ldi r24, 0x00 ; 0
|
|
14: 90 e0 ldi r25, 0x00 ; 0
|
|
16: 08 95 ret
|
|
|