History

x86_64: Implement GET_CALLER_FP

TCC always uses %rbp frames, so we can use that one.

Michael Matz committed 14 years ago

Commit b068e291 parent 4c0d70a1 file · +8 −0Browse files

Unified · Split

lib/bcheck.c+8−0
@@ -216,6 +216,14 @@ BOUND_PTR_INDIR(16) · 215 unmodified lines
216216 __asm__ __volatile__ ("movl %%ebp,%0" :"=g" (fp1));\
217217 fp = fp1[0];\
218218 }
219+#elif defined(__x86_64__)
220+/* TCC always creates %rbp frames also on x86_64, so use them. */
221+#define GET_CALLER_FP(fp)\
222+{\
223+ unsigned long *fp1;\
224+ __asm__ __volatile__ ("movq %%rbp,%0" :"=g" (fp1));\
225+ fp = fp1[0];\
226+}
219227 #else
220228 #error put code to extract the calling frame pointer
221229 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t