Changeset 13337 in vbox for trunk/src/recompiler_new/dyngen-exec.h
- Timestamp:
- Oct 16, 2008 11:59:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler_new/dyngen-exec.h
r11982 r13337 90 90 #define UINT64_MAX ((uint64_t)(18446744073709551615)) 91 91 92 #ifdef _BSD 93 typedef struct __sFILE FILE; 94 #else 92 95 typedef struct FILE FILE; 96 #endif 93 97 extern int fprintf(FILE *, const char *, ...); 98 extern int fputs(const char *, FILE *); 94 99 extern int printf(const char *, ...); 95 100 #undef NULL … … 234 239 #define tostring(s) #s 235 240 236 #if def __alpha__241 #if defined(__alpha__) || defined(__s390__) 237 242 /* the symbols are considered non exported so a br immediate is generated */ 238 243 #define __hidden __attribute__((visibility("hidden"))) … … 308 313 #endif 309 314 315 316 /* The return address may point to the start of the next instruction. 317 Subtracting one gets us the call instruction itself. */ 318 #if defined(__s390__) 319 # define GETPC() ((void*)(((unsigned long)__builtin_return_address(0) & 0x7fffffffUL) - 1)) 320 #elif defined(__arm__) 321 /* Thumb return addresses have the low bit set, so we need to subtract two. 322 This is still safe in ARM mode because instructions are 4 bytes. */ 323 # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 2)) 324 #else 325 # define GETPC() ((void *)((unsigned long)__builtin_return_address(0) - 1)) 326 #endif 310 327 #endif /* !defined(__DYNGEN_EXEC_H__) */
Note:
See TracChangeset
for help on using the changeset viewer.