Commit 0b548cc5 authored by Andreas Fried's avatar Andreas Fried
Browse files

amd64_cconv: Always reserve a multiple of 8 bytes on the stack.

This is relevant for long doubles, which are 80 bits long, but take up
128 bits on the stack and in memory according to the AMD64 ABI.
parent 831653ff
......@@ -128,7 +128,7 @@ x86_cconv_t *amd64_decide_calling_convention(ir_type *function_type,
param->offset = stack_offset;
/* increase offset by at least AMD64_REGISTER_SIZE bytes so
* everything is aligned */
stack_offset += MAX(bits / 8, AMD64_REGISTER_SIZE);
stack_offset += round_up2(bits / 8, AMD64_REGISTER_SIZE);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment