summaryrefslogtreecommitdiff
path: root/hw/xfree86/x86emu
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:01 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-25 19:29:01 +0000
commitadc7f9a4ebdfe11d4cd6de9388b63dfe36450b39 (patch)
tree23eb7becc5360b2cbe16aa8d45529880067f3989 /hw/xfree86/x86emu
parent90f1536dd315cd265bfc7ef35058761a65a01734 (diff)
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'hw/xfree86/x86emu')
-rw-r--r--hw/xfree86/x86emu/fpu.c47
-rw-r--r--hw/xfree86/x86emu/ops.c12
-rw-r--r--hw/xfree86/x86emu/ops2.c4
-rw-r--r--hw/xfree86/x86emu/x86emu/fpu_regs.h5
-rw-r--r--hw/xfree86/x86emu/x86emu/regs.h6
-rw-r--r--hw/xfree86/x86emu/x86emu/types.h7
6 files changed, 50 insertions, 31 deletions
diff --git a/hw/xfree86/x86emu/fpu.c b/hw/xfree86/x86emu/fpu.c
index 08aea4229..0f679bde6 100644
--- a/hw/xfree86/x86emu/fpu.c
+++ b/hw/xfree86/x86emu/fpu.c
@@ -36,6 +36,7 @@
* emulation of the FPU instructions.
*
****************************************************************************/
+/* $XFree86: xc/extras/x86emu/src/x86emu/fpu.c,v 1.2 2003/10/22 20:03:06 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -95,8 +96,8 @@ static char *x86emu_fpu_op_d9_tab1[] = {
void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -289,6 +290,9 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
}
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif /* X86EMU_FPU_PRESENT */
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -322,8 +326,8 @@ char *x86emu_fpu_op_da_tab[] = {
void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -379,6 +383,9 @@ void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -403,7 +410,7 @@ char *x86emu_fpu_op_db_tab[] = {
void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
+ uint destoffset = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -499,6 +506,8 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -530,8 +539,8 @@ char *x86emu_fpu_op_dc_tab[] = {
void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -613,6 +622,9 @@ void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -640,8 +652,8 @@ static char *x86emu_fpu_op_dd_tab[] = {
void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -713,6 +725,9 @@ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -747,8 +762,8 @@ static char *x86emu_fpu_op_de_tab[] =
void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -832,6 +847,9 @@ void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
@@ -866,8 +884,8 @@ static char *x86emu_fpu_op_df_tab[] = {
void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
{
int mod, rl, rh;
- uint destoffset;
- u8 stkelem;
+ uint destoffset = 0;
+ u8 stkelem = 0;
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
@@ -939,6 +957,9 @@ void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
break;
}
}
+#else
+ (void)destoffset;
+ (void)stkelem;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR_NO_TRACE();
diff --git a/hw/xfree86/x86emu/ops.c b/hw/xfree86/x86emu/ops.c
index 3714070dd..94041f6c8 100644
--- a/hw/xfree86/x86emu/ops.c
+++ b/hw/xfree86/x86emu/ops.c
@@ -70,7 +70,7 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/ops.c,v 1.7 2002/07/15 16:49:10 dawes Exp $ */
+/* $XFree86: xc/extras/x86emu/src/x86emu/ops.c,v 1.9 2003/10/22 20:03:06 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -4538,7 +4538,11 @@ static void x86emuOp_push_byte_IMM(u8 X86EMU_UNUSED(op1))
imm = (s8)fetch_byte_imm();
DECODE_PRINTF2("PUSH\t%d\n", imm);
TRACE_AND_STEP();
- push_word(imm);
+ if (M.x86.mode & SYSMODE_PREFIX_DATA) {
+ push_long((s32)imm);
+ } else {
+ push_word(imm);
+ }
DECODE_CLEAR_SEGOVR();
END_OF_INSTR();
}
@@ -9417,11 +9421,9 @@ Handles opcode 0xd5
****************************************************************************/
static void x86emuOp_aad(u8 X86EMU_UNUSED(op1))
{
- u8 a;
-
START_OF_INSTR();
DECODE_PRINTF("AAD\n");
- a = fetch_byte_imm();
+ (void) fetch_byte_imm();
TRACE_AND_STEP();
M.x86.R_AX = aad_word(M.x86.R_AX);
DECODE_CLEAR_SEGOVR();
diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c
index ae295f782..55f361677 100644
--- a/hw/xfree86/x86emu/ops2.c
+++ b/hw/xfree86/x86emu/ops2.c
@@ -37,7 +37,7 @@
* instructions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/src/x86emu/ops2.c,v 1.5 2002/07/15 16:49:10 dawes Exp $ */
+/* $XFree86: xc/extras/x86emu/src/x86emu/ops2.c,v 1.6 2003/10/22 20:03:06 tsi Exp $ */
#include "x86emu/x86emui.h"
@@ -145,6 +145,7 @@ static void x86emuOp2_long_jump(u8 op2)
break;
}
DECODE_PRINTF(name);
+ (void)name;
target = (s16) fetch_word_imm();
target += (s16) M.x86.R_IP;
DECODE_PRINTF2("%04x\n", target);
@@ -237,6 +238,7 @@ static void x86emuOp2_set_byte(u8 op2)
break;
}
DECODE_PRINTF(name);
+ (void)name;
FETCH_DECODE_MODRM(mod, rh, rl);
switch (mod) {
case 0:
diff --git a/hw/xfree86/x86emu/x86emu/fpu_regs.h b/hw/xfree86/x86emu/x86emu/fpu_regs.h
index 56e9a04d7..b975b87e0 100644
--- a/hw/xfree86/x86emu/x86emu/fpu_regs.h
+++ b/hw/xfree86/x86emu/x86emu/fpu_regs.h
@@ -35,14 +35,13 @@
* Description: Header file for FPU register definitions.
*
****************************************************************************/
+/* $XFree86: xc/extras/x86emu/include/x86emu/fpu_regs.h,v 1.3 2003/10/28 16:01:40 tsi Exp $ */
#ifndef __X86EMU_FPU_REGS_H
#define __X86EMU_FPU_REGS_H
#ifdef X86_FPU_SUPPORT
-#pragma pack(1)
-
/* Basic 8087 register can hold any of the following values: */
union x86_fpu_reg_u {
@@ -87,8 +86,6 @@ struct x86_fpu_registers {
short x86_fpu_tos, x86_fpu_bos;
};
-#pragma pack()
-
/*
* There are two versions of the following macro.
*
diff --git a/hw/xfree86/x86emu/x86emu/regs.h b/hw/xfree86/x86emu/x86emu/regs.h
index 12426278d..3a4580138 100644
--- a/hw/xfree86/x86emu/x86emu/regs.h
+++ b/hw/xfree86/x86emu/x86emu/regs.h
@@ -35,15 +35,13 @@
* Description: Header file for x86 register definitions.
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/regs.h,v 1.4 2002/09/16 18:05:18 eich Exp $ */
+/* $XFree86: xc/extras/x86emu/include/x86emu/regs.h,v 1.6 2003/10/28 16:01:40 tsi Exp $ */
#ifndef __X86EMU_REGS_H
#define __X86EMU_REGS_H
/*---------------------- Macros and type definitions ----------------------*/
-#pragma pack(1)
-
/*
* General EAX, EBX, ECX, EDX type registers. Note that for
* portability, and speed, the issue of byte swapping is not addressed
@@ -305,8 +303,6 @@ typedef struct {
X86EMU_regs x86;
} X86EMU_sysEnv;
-#pragma pack()
-
/*----------------------------- Global Variables --------------------------*/
#ifdef __cplusplus
diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h
index 847ce835d..3a0dc17fc 100644
--- a/hw/xfree86/x86emu/x86emu/types.h
+++ b/hw/xfree86/x86emu/x86emu/types.h
@@ -36,7 +36,7 @@
*
****************************************************************************/
-/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.5 2002/07/23 14:22:45 tsi Exp $ */
+/* $XFree86: xc/extras/x86emu/include/x86emu/types.h,v 1.7 2003/07/07 15:34:21 eich Exp $ */
#ifndef __X86EMU_TYPES_H
#define __X86EMU_TYPES_H
@@ -70,12 +70,13 @@
/* Taken from Xmd.h */
#undef NUM32
-#if defined(__alpha) || defined(__alpha__) || \
+#if defined (_LP64) || \
+ defined(__alpha) || defined(__alpha__) || \
defined(__ia64__) || defined(ia64) || \
defined(__sparc64__) || \
defined(__s390x__) || \
(defined(__hppa__) && defined(__LP64)) || \
- defined(__x86_64__) || defined(x86_64) || \
+ defined(__AMD64__) || defined(AMD64) || \
(defined(__sgi) && (_MIPS_SZLONG == 64))
#define NUM32 int
#else