Hello,
Functions with floating point arguments(in x86-64) don't use the proper
calling convention.
Float values should be passed in XMM0 - XMM3
double sum(double a, double b) {
return (a+b);
}
Generates this:
mov qword ptr [rbp+10h],rcx
mov qword ptr [rbp+18h],rdx
movq xmm0,mmword ptr [rbp+10h]
addsd xmm0,mmword ptr [rbp+18h]
This same function does however leave the result in XMM0 as it should.
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel