Follow-up Comment #2, patch #7640 (project simulavr):
(I'm sorry for the delay.)
Ok, I see the bug and your patch would definitely fix it.
Trace() of some instructions use byte-based addresses, some use word-based.
AvrDevice::Load() fills the symbol array using byte-based addresses for
symbols in RAM and word-based for symbols in Flash (see calls to AddSymbol).
Most places in simulavr use "address" to mean a byte-based value; "index" or
"offset" for word-based values - similar to terminology used by GDB. I fix
places when the naming is swapped.
It would be nice if the code used only one way to specify a memory location,
probably byte-based way. But I do not know if it is worth converting.
These functions use the word-based addressing: avr_op_JMP::Trace(),
avr_op_LPM_Z::Trace(), avr_op_LPM::Trace(), avr_op_LPM_Z_incr::Trace()
We should either:
(A) use accept your patch (which turns avr_op_BRBC and avr_op_BRBS to
word-based symbol lookup) and rename the variables to `index' or
(B) turn the above mentioned functions to byte-based lookup and not rename
Fellows, should we do A or B?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7640>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
Simulavr-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/simulavr-devel