You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C file below is automaticlly generated by our test-suite, and then we call it from lisp to test the calling convention.
On x86 32bit freebsd, compiling with clang 18.1.8, the function fastcall_k_6 expects the pointer to the return value to be in ECX,
Compiling with clang 20.0.0git it expects the pointer to the return value to be on the stack.
Is this difference intentional?
Is it documented anywhere?
[BTW: why cannot attach a C file?]
------- start of fastcall_k_6 with 18.1.8 ------------------
0x20 <fastcall_k_6>: push %ebp
0x21 <fastcall_k_6+1>: mov %esp,%ebp
0x23 <fastcall_k_6+3>: push %esi
0x24 <fastcall_k_6+4>: push %eax
0x25 <fastcall_k_6+5>: call 0x2a <fastcall_k_6+10>
0x2a <fastcall_k_6+10>: pop %edx
0x2b <fastcall_k_6+11>: add $0x3,%edx
0x31 <fastcall_k_6+17>: mov %ecx,%eax << expects ecx to contain the pointer to the result
0x33 <fastcall_k_6+19>: mov %ecx,-0x8(%ebp)
0x36 <fastcall_k_6+22>: mov 0x0(%edx),%esi
0x3c <fastcall_k_6+28>: mov %esi,(%ecx)
----- start of fastcall_k_6 with 20.0.0git ------------------------------------
0x1470 <fastcall_k_6>: push %ebp
0x1471 <fastcall_k_6+1>: mov %esp,%ebp
0x1473 <fastcall_k_6+3>: push %esi
0x1474 <fastcall_k_6+4>: call 0x1479 <fastcall_k_6+9>
0x1479 <fastcall_k_6+9>: pop %edx
0x147a <fastcall_k_6+10>: add $0x2193,%edx
0x1480 <fastcall_k_6+16>: mov 0x8(%ebp),%ecx << expects ebp+8 to contain a pointer to the result
0x1483 <fastcall_k_6+19>: mov %ecx,%eax
0x1485 <fastcall_k_6+21>: mov -0x32dc(%edx),%esi
0x148b <fastcall_k_6+27>: mov %esi,(%ecx)
The C file below is automaticlly generated by our test-suite, and then we call it from lisp to test the calling convention.
On x86 32bit freebsd, compiling with clang 18.1.8, the function fastcall_k_6 expects the pointer to the return value to be in ECX,
Compiling with clang 20.0.0git it expects the pointer to the return value to be on the stack.
Is this difference intentional?
Is it documented anywhere?
[BTW: why cannot attach a C file?]
------- start of fastcall_k_6 with 18.1.8 ------------------
----- start of fastcall_k_6 with 20.0.0git ------------------------------------
-------------------------- fastcall_c_struct.c ----------------------------------------------
The text was updated successfully, but these errors were encountered: