]> git.proxmox.com Git - qemu.git/blobdiff - dyngen-exec.h
monitor fixes
[qemu.git] / dyngen-exec.h
index 2d5209bc8907922871289d73791868f9994f63af..86087ca623b443cafaaa9249ef0e6d7516952f26 100644 (file)
@@ -20,6 +20,9 @@
 #if !defined(__DYNGEN_EXEC_H__)
 #define __DYNGEN_EXEC_H__
 
+/* NOTE: standard headers should be used with special care at this
+   point because host CPU registers are used as global variables. Some
+   host headers do not allow that. */
 #include <stddef.h>
 
 typedef unsigned char uint8_t;
@@ -59,8 +62,14 @@ extern int fprintf(FILE *, const char *, ...);
 extern int printf(const char *, ...);
 #undef NULL
 #define NULL 0
-#ifdef _BSD
+#if defined(_BSD) && !defined(__APPLE__)
 #include <ieeefp.h>
+
+#define FE_TONEAREST   FP_RN
+#define FE_DOWNWARD    FP_RM
+#define FE_UPWARD      FP_RP
+#define FE_TOWARDZERO  FP_RZ
+#define fesetround(x)  fpsetround(x)
 #else
 #include <fenv.h>
 #endif
@@ -175,7 +184,7 @@ extern int printf(const char *, ...);
 #define __hidden 
 #endif
 
-#ifdef __alpha__
+#if defined(__alpha__)
 /* Suggested by Richard Henderson. This will result in code like
         ldah $0,__op_param1($29)        !gprelhigh
         lda $0,__op_param1($0)          !gprellow
@@ -188,11 +197,15 @@ extern int __op_param3 __hidden;
 #define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param2)); _r; })
 #define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param3)); _r; })
 #else
+#if defined(__APPLE__)
+static int __op_param1, __op_param2, __op_param3;
+#else
 extern int __op_param1, __op_param2, __op_param3;
+#endif
 #define PARAM1 ((long)(&__op_param1))
 #define PARAM2 ((long)(&__op_param2))
 #define PARAM3 ((long)(&__op_param3))
-#endif
+#endif /* !defined(__alpha__) */
 
 extern int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3;