mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
x86_64: Implement GET_CALLER_FP
TCC always uses %rbp frames, so we can use that one.
This commit is contained in:
parent
4c0d70ab07
commit
b068e29df7
@ -216,6 +216,14 @@ BOUND_PTR_INDIR(16)
|
||||
__asm__ __volatile__ ("movl %%ebp,%0" :"=g" (fp1));\
|
||||
fp = fp1[0];\
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
/* TCC always creates %rbp frames also on x86_64, so use them. */
|
||||
#define GET_CALLER_FP(fp)\
|
||||
{\
|
||||
unsigned long *fp1;\
|
||||
__asm__ __volatile__ ("movq %%rbp,%0" :"=g" (fp1));\
|
||||
fp = fp1[0];\
|
||||
}
|
||||
#else
|
||||
#error put code to extract the calling frame pointer
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user