Is this the right place for this?
--- Begin Message ---
I'm confused about a problem I'm running into.
I have been working on tools to disassemble ARM instructions and am running
into a discrepancy between the ARM documentation and the GNU assembler,
particularly over the ldr..sh and ldr..sb instructions. The GNU assembler
takes the following instruction (for example):
ldreqsh r9, [sl], #0x3f
and assembles it to:
0x00da94d0
when the documentation plainly requires the penultimate nibble to be 0xf and
the third nibble (also a 0xd here) would indicate that the immediate offset
should be subtracted (U bit is set).
With the penultimate nibble being 0xd, this instruction (according to the ARM
documentation) should be ldreqsb.
I subsequently was testing the ldreqsb instruction (this is an automated tool
so the operands are slightly different), and found that the following
instruction:
ldreqsb r9, [sl], #0x40
assembled as:
0x00da93ff
which, accordingly should correspond to the ldreqsh instruction.
I don't have an environment set up currently to play with to prove empirically
which is correct, so I wanted to bring it to you both, the experts. Ordinarily
I would only approach Mr. Raeburn, however other disassembler tools break down
the bytes in the same way as arm-elf-as assembles them, and I have found flaws
in other documentation for other <ahem> bigger microcontrollers whose Intel
igence shall go unnamed.
Through my automated testing, I have found this bug to generate over half of my
error messages (and it's the error messages that count in this tool).
Please help? Which is accurate? Should I trust the assembler, which is
responsible for the actual driving of the processor? or the documentation
which is the Bible of ARM?
Thank you,
Matt
--
Matthew Carpenter
m...@inguardians.com
http://www.inguardians.com
PGP Fingerprint:
87EB 54A8 FB42 0A0E B8AE CDA7 FF99 2A64 E70F 4466
hkp://wwwkeys.pgp.net
--- End Message ---
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils