aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/qemu-devel/files/patch-bh
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu-devel/files/patch-bh')
-rw-r--r--emulators/qemu-devel/files/patch-bh115
1 files changed, 115 insertions, 0 deletions
diff --git a/emulators/qemu-devel/files/patch-bh b/emulators/qemu-devel/files/patch-bh
new file mode 100644
index 00000000000..ebb476a2ce9
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-bh
@@ -0,0 +1,115 @@
+Index: qemu/configure
+===================================================================
+RCS file: /cvsroot/qemu/qemu/configure,v
+retrieving revision 1.39
+diff -w -u -d -r1.39 configure
+--- configure 20 May 2004 13:23:39 -0000 1.39
++++ configure 21 May 2004 15:00:41 -0000
+@@ -93,7 +93,7 @@
+
+ if [ "$bsd" = "yes" ] ; then
+ make="gmake"
+- target_list="i386-softmmu"
++ target_list="i386-softmmu ppc-softmmu"
+ fi
+
+ # find source path
+Index: qemu/dyngen-exec.h
+===================================================================
+RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v
+retrieving revision 1.12
+diff -w -u -d -r1.12 dyngen-exec.h
+--- dyngen-exec.h 12 May 2004 19:32:15 -0000 1.12
++++ dyngen-exec.h 21 May 2004 15:00:41 -0000
+@@ -21,6 +21,8 @@
+ #define __DYNGEN_EXEC_H__
+
+ #include <stddef.h>
++#include <stdio.h>
++#include "config.h"
+
+ typedef unsigned char uint8_t;
+ typedef unsigned short uint16_t;
+@@ -54,9 +56,6 @@
+ #define UINT32_MAX (4294967295U)
+ #define UINT64_MAX ((uint64_t)(18446744073709551615))
+
+-typedef struct FILE FILE;
+-extern int fprintf(FILE *, const char *, ...);
+-extern int printf(const char *, ...);
+ #undef NULL
+ #define NULL 0
+ #ifdef _BSD
+Index: qemu/target-ppc/op_helper.c
+===================================================================
+RCS file: /cvsroot/qemu/qemu/target-ppc/op_helper.c,v
+retrieving revision 1.6
+diff -w -u -d -r1.6 op_helper.c
+--- target-ppc/op_helper.c 21 May 2004 12:59:31 -0000 1.6
++++ target-ppc/op_helper.c 21 May 2004 15:00:49 -0000
+@@ -210,6 +210,22 @@
+ }
+ /* TODO: update FEX & VX */
+ /* Set rounding mode */
++#ifdef _BSD
++ switch(env->fpscr[0] & 0x3) {
++ case 0:
++ fpsetround(FP_RN);
++ break;
++ case 1:
++ fpsetround(FP_RZ);
++ break;
++ case 2:
++ fpsetround(FP_RP);
++ break;
++ case 3:
++ fpsetround(FP_RM);
++ break;
++ }
++#else
+ switch (env->fpscr[0] & 0x3) {
+ case 0:
+ /* Best approximation (round to nearest) */
+@@ -228,6 +244,7 @@
+ fesetround(FE_DOWNWARD);
+ break;
+ }
++#endif
+ }
+
+ void do_fctiw (void)
+@@ -253,9 +270,13 @@
+ double d;
+ uint64_t i;
+ } *p = (void *)&FT1;
++#ifdef _BSD
++ int cround = fpgetround();
++ fpsetround(FP_RZ);
++#else
+ int cround = fegetround();
+-
+ fesetround(FE_TOWARDZERO);
++#endif
+ if (FT0 > (double)0x7FFFFFFF)
+ p->i = 0x7FFFFFFFULL << 32;
+ else if (FT0 < -(double)0x80000000)
+@@ -264,7 +285,11 @@
+ p->i = 0;
+ p->i |= (uint32_t)FT0;
+ FT0 = p->d;
++#ifdef _BSD
++ fpsetround(cround);
++#else
+ fesetround(cround);
++#endif
+ }
+
+ void do_fnmadds (void)
+@@ -379,7 +404,6 @@
+
+ /*****************************************************************************/
+ /* Special helpers for debug */
+-extern FILE *stdout;
+
+ void dump_state (void)
+ {