|Subject:||Re: [Tinycc-devel] lcall invalid hex code|
|Date:||Mon, 2 May 2016 04:51:50 +0200 (CEST)|
|User-agent:||Alpine 2.20 (LSU 67 2015-01-07)|
Hi, On Mon, 2 May 2016, Michael Matz wrote:
ALT(DEF_ASM_OP2(lcall, 0x9a, 0, 0, OPT_IM16, OPT_IM32)) -ALT(DEF_ASM_OP1(lcall, 0xff, 3, 0, OPT_EA)) +ALT(DEF_ASM_OP1(lcall, 0xff1f, 3, 0, OPT_EA)) ALT(DEF_ASM_OP2(ljmp, 0xea, 0, 0, OPT_IM16, OPT_IM32)) ALT(DEF_ASM_OP1(ljmp, 0xff, 5, 0, OPT_EA))You don't say what exactly you want to fix, but whatever it is, the patch is incorrect. 'lcall' is no two-byte opcode (those start with 0x0f), but rather the opcode is 0xff and the sub-opcode is in the mod/rm byte (aka. group #5 ). It's sub-opcode 3, hence correct above.If anything the decoding of the above table in i386-asm.c is wrong, but I can't say without knowing what the problem is.
With your followup I now know your problem. The mod/rm byte was simply missing from the encoding. I've corrected this in mob.
|[Prev in Thread]||Current Thread||[Next in Thread]|