VirtualBox

Ignore:
Timestamp:
Oct 16, 2008 11:59:21 AM (16 years ago)
Author:
vboxsync
Message:

more recompiler work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler_new/dyngen-exec.h

    r11982 r13337  
    9090#define UINT64_MAX              ((uint64_t)(18446744073709551615))
    9191
     92#ifdef _BSD
     93typedef struct __sFILE FILE;
     94#else
    9295typedef struct FILE FILE;
     96#endif
    9397extern int fprintf(FILE *, const char *, ...);
     98extern int fputs(const char *, FILE *);
    9499extern int printf(const char *, ...);
    95100#undef NULL
     
    234239#define tostring(s)     #s
    235240
    236 #ifdef __alpha__
     241#if defined(__alpha__) || defined(__s390__)
    237242/* the symbols are considered non exported so a br immediate is generated */
    238243#define __hidden __attribute__((visibility("hidden")))
     
    308313#endif
    309314
     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
    310327#endif /* !defined(__DYNGEN_EXEC_H__) */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette