mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Adds missing alignment to sret.
This commit is contained in:
@@ -20,7 +20,7 @@ func double log10(double x)
|
||||
const double LG6 = 1.531383769920937332e-01; /* 3FC39A09 D078C69F */
|
||||
const double LG7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
|
||||
DoubleLong u = { .f = x };
|
||||
uint hx = (uint)(u.i >> 32);
|
||||
ulong hx = (uint)(u.i >> 32);
|
||||
int k = 0;
|
||||
if (hx < 0x00100000 || hx >> 31)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ enum AllocationKind
|
||||
REALLOC,
|
||||
FREE,
|
||||
}
|
||||
|
||||
enum AllocationFailureKind
|
||||
{
|
||||
OUT_OF_MEMORY
|
||||
|
||||
@@ -502,6 +502,8 @@ static void llvm_emit_param_attributes(GenContext *context, LLVMValueRef functio
|
||||
}
|
||||
if (is_return)
|
||||
{
|
||||
llvm_attribute_add_int(context, function, attribute_align, type_abi_alignment(type_voidptr), 1);
|
||||
// TODO then type attributes are added to LLVM-C, use that for sret.
|
||||
llvm_attribute_add(context, function, attribute_sret, 1);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user