Closed pd0wm closed 2 years ago
Think there is a typo in the opcode for bcond (b.<cond>/br). Since bit 15 is not specified there is ambiguity between ld.hu[reg1], r16 and the branch instructions.
b.<cond>
br
ld.hu[reg1], r16
Before this change: e5 87 1d fb br LAB_0007a76a
e5 87 1d fb br LAB_0007a76a
after: e5 87 1d fb ld.hu -0x4e4[tp],r16
e5 87 1d fb ld.hu -0x4e4[tp],r16
objdump output:
v850-elf-objdump -b binary -D out.bin -m v850e3v5 e5 87 1d fb ld.hu -1252[r5], r16
Yes, you are right. Also according to this opcodes list 15th bit should be a fixed part of BR opcode.
Thanks, Willem. Btw, congrats on success with next steering ECU hacking. Cool work!
Think there is a typo in the opcode for bcond (
b.<cond>
/br
). Since bit 15 is not specified there is ambiguity betweenld.hu[reg1], r16
and the branch instructions.Before this change:
e5 87 1d fb br LAB_0007a76a
after:
e5 87 1d fb ld.hu -0x4e4[tp],r16
objdump output: