The code:
int square(int num) { return num * num; }
generates:
push RBP
mov RBP,RSP
mov EAX,EDI
imul EAX,EAX
pop RBP
ret
while gdc and ldc do not generate the prolog/epilog.
https://godbolt.org/z/A7EUu7
Comment #1 by robert.schadek — 2024-12-13T19:09:53Z