the offset of JMPI is in unit of 64bits on GEN5.

This fix is only applied for JMPI label. It is up to you
to use a right offset for JMPI imm32|reg in your program.
This commit is contained in:
Xiang, Haihao 2009-07-23 10:33:55 +08:00 committed by Damien Lespiau
parent 5261b8475e
commit 60cf6e09dd

View File

@ -129,7 +129,12 @@ int main(int argc, char **argv)
entry->instruction.reloc_target) == 0) { entry->instruction.reloc_target) == 0) {
int offset = int offset =
entry1->inst_offset - entry->inst_offset; entry1->inst_offset - entry->inst_offset;
entry->instruction.bits3.ud = offset - 1;
if (gen_level == 5)
entry->instruction.bits3.ud = 2 * (offset - 1);
else
entry->instruction.bits3.ud = offset - 1;
break; break;
} }
} }