mirror of
https://github.com/danog/ir.git
synced 2025-01-22 05:31:32 +01:00
Use better conditions
This commit is contained in:
parent
169033c291
commit
a5c0514b13
@ -3216,7 +3216,7 @@ static void ir_emit_alloca(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
size = IR_ALIGNED_SIZE(size, 8);
|
||||
}
|
||||
| sub sp, sp, #size
|
||||
if (!(ctx->flags & IR_FUNCTION)) {
|
||||
if (!(ctx->flags & IR_USE_FRAME_POINTER)) {
|
||||
data->call_stack_size += size;
|
||||
}
|
||||
} else {
|
||||
@ -3263,7 +3263,7 @@ static void ir_emit_afree(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
size = IR_ALIGNED_SIZE(size, 8);
|
||||
}
|
||||
| add sp, sp, #size
|
||||
if (!(ctx->flags & IR_FUNCTION)) {
|
||||
if (!(ctx->flags & IR_USE_FRAME_POINTER)) {
|
||||
data->call_stack_size -= size;
|
||||
}
|
||||
} else {
|
||||
|
@ -5339,7 +5339,7 @@ static void ir_emit_alloca(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
size = IR_ALIGNED_SIZE(size, 8);
|
||||
}
|
||||
| ASM_REG_IMM_OP sub, IR_ADDR, IR_REG_RSP, size
|
||||
if (!(ctx->flags & IR_FUNCTION)) {
|
||||
if (!(ctx->flags & IR_USE_FRAME_POINTER)) {
|
||||
data->call_stack_size += size;
|
||||
}
|
||||
} else {
|
||||
@ -5395,7 +5395,7 @@ static void ir_emit_afree(ir_ctx *ctx, ir_ref def, ir_insn *insn)
|
||||
size = IR_ALIGNED_SIZE(size, 8);
|
||||
}
|
||||
| ASM_REG_IMM_OP add, IR_ADDR, IR_REG_RSP, size
|
||||
if (!(ctx->flags & IR_FUNCTION)) {
|
||||
if (!(ctx->flags & IR_USE_FRAME_POINTER)) {
|
||||
data->call_stack_size -= size;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user