mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
x86-64 asm: Remove useless jmp opcode
Also remove the hacky mod/rm byte emission during disp/imm writing.
This commit is contained in:
parent
bd93dc6923
commit
613962e353
@ -1041,13 +1041,6 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode)
|
||||
/* jmp $r */
|
||||
g(0xE0 + ops[i].reg);
|
||||
}
|
||||
#endif
|
||||
#ifdef TCC_TARGET_X86_64
|
||||
} else if (v & (OP_REG32 | OP_REG64)) {
|
||||
if (pa->instr_type & (OPC_JMP | OPC_SHORTJMP)) {
|
||||
/* jmp $r */
|
||||
g(0xE0 + ops[i].reg);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -236,6 +236,7 @@ lcall *(%rax)
|
||||
#endif
|
||||
|
||||
jmp 0x1000
|
||||
jmp *(%edi)
|
||||
#ifdef __i386__
|
||||
jmp *%eax
|
||||
#else
|
||||
|
@ -200,7 +200,6 @@ ALT(DEF_ASM_OP2(shrdw, 0x0fad, 0, OPC_MODRM | OPC_WLQ, OPT_REGW, OPT_EA | OPT_RE
|
||||
ALT(DEF_ASM_OP1(call, 0xff, 2, OPC_MODRM, OPT_INDIR))
|
||||
ALT(DEF_ASM_OP1(call, 0xe8, 0, OPC_JMP, OPT_ADDR))
|
||||
ALT(DEF_ASM_OP1(jmp, 0xff, 4, OPC_MODRM, OPT_INDIR))
|
||||
ALT(DEF_ASM_OP1(jmp, 0xff, 0, OPC_JMP | OPC_WL, OPT_REGW))
|
||||
ALT(DEF_ASM_OP1(jmp, 0xeb, 0, OPC_SHORTJMP | OPC_JMP, OPT_ADDR))
|
||||
|
||||
ALT(DEF_ASM_OP1(lcall, 0xff, 3, OPC_MODRM, OPT_EA))
|
||||
|
Loading…
Reference in New Issue
Block a user