mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
Bettter code scheduling
This commit is contained in:
parent
d049bdfdb5
commit
18bdfb4203
@ -6793,17 +6793,19 @@ static bool ir_emit_guard(ir_ctx *ctx, uint32_t b, ir_ref def, ir_insn *insn)
|
|||||||
} else {
|
} else {
|
||||||
|.if X64
|
|.if X64
|
||||||
if (insn->op == IR_GUARD) {
|
if (insn->op == IR_GUARD) {
|
||||||
| jne >1
|
|
||||||
} else {
|
|
||||||
| je >1
|
| je >1
|
||||||
|
} else {
|
||||||
|
| jne >1
|
||||||
}
|
}
|
||||||
|
|.cold_code
|
||||||
|
|1:
|
||||||
if (IR_IS_SIGNED_32BIT(addr)) {
|
if (IR_IS_SIGNED_32BIT(addr)) {
|
||||||
| mov rax, ((ptrdiff_t)addr) // 0x48 0xc7 0xc0 <imm-32-bit>
|
| mov rax, ((ptrdiff_t)addr) // 0x48 0xc7 0xc0 <imm-32-bit>
|
||||||
} else {
|
} else {
|
||||||
| mov64 rax, ((ptrdiff_t)addr) // 0x48 0xb8 <imm-64-bit>
|
| mov64 rax, ((ptrdiff_t)addr) // 0x48 0xb8 <imm-64-bit>
|
||||||
}
|
}
|
||||||
| jmp aword [rax]
|
| jmp aword [rax]
|
||||||
|1:
|
|.code
|
||||||
|.endif
|
|.endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user