propgcc & binutils question
montekki
Posts: 4
I've been looking into propeller instruction set and playing around with propgcc and binutils a bit and i've noticed some strange behaviour of propeller-elf-objdump. Take a look at the way code is generated for a simple example and the way this code is disassembled by objdump: . add r7, r0 turns into add r7, r7 and so on. Could this bug be fixed?
Comments
0100bc00 rdbyte 0 <r7>, 4 <r7+0x4>
As i've understood from the reference that in fact should be rdbyte r0,r1 since '1' is the least significant bit of src.
I'll leave this for Eric or someone else to answer.
This is only an issue for disassembly of .o files. Linked .elf files should disassemble correctly.
2ef4fca0 mov 1e8 <__TMP0>, #46
this is 101000001 1 1111 001111010 000101110
So, the source immediate value #46 is ok, but the dest it's moved to (1e8) is the "dest" field shifted two bits left. Is this some kind of addr alignment or something?
0: f021bca0 mov 40 <sp>, 7c0 <PAR>
where obviously PAR is not 7c0 but but 1F0. See the value for par is shifted two bits left, as is the value for the dst register which is also 0x10 and not 0x40 .
The value reported by GAS is a byte address. However, the actual value is a long address.