[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/25041] New: [avr-objdump] Invalid disassembly of avrtiny L
From: |
michael.pucher.main at gmail dot com |
Subject: |
[Bug binutils/25041] New: [avr-objdump] Invalid disassembly of avrtiny LDS/STS instructions |
Date: |
Fri, 27 Sep 2019 14:32:54 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25041
Bug ID: 25041
Summary: [avr-objdump] Invalid disassembly of avrtiny LDS/STS
instructions
Product: binutils
Version: 2.32
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: michael.pucher.main at gmail dot com
Target Milestone: ---
Overview
------------------
This concerns the AVR version of objdump. When trying to disassemble the
LDS/STS instructions for the, e.g. ATtiny10, the address is not decoded
correctly.
Steps to reproduce
------------------
1) tiny.S:
_start:
lds r16, 0x80
sts 0x80, r16
2) Assemble with:
avr-as -m "attiny10" -o tiny.elf tiny.S
3) Disassemble with:
avr-objdump -Dm"avr:100" tiny.elf
Actual Results
------------------
Disassembly of section .text:
00000000 <_start>:
0: 00 a0 lds r16, 0x00
2: 00 a8 sts 0x00, r16
Expected Results
------------------
Disassembly of section .text:
00000000 <_start>:
0: 00 a0 lds r16, 0x80
2: 00 a8 sts 0x80, r16
Additional Information
------------------
This bug was probably introduced due to some ambiguity in the official ISA doc.
The online doc clearly says that the parameter for LDS/STS instruction ranges
from 0x40 to 0xBF. [1]
However the ISA PDF [2] says the parameter ranges from 0 - 128, but provides
details on how the address parameter is actually calculated. Given that the
parameter makes more sense ranging from 0x40-0xBF, because of the way it is
actually decoded and that avr-as (!) itself warns that 0x0 as parameter for
LDS/STS is out of range, this should be adapted in objdump as well.
[1]
https://www.microchip.com/webdoc/avrassembler/avrassembler.wb_LDS_-_Load_direct_from_SRAM.html
[2]
http://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/25041] New: [avr-objdump] Invalid disassembly of avrtiny LDS/STS instructions,
michael.pucher.main at gmail dot com <=