From d6d3999ccb2cb72d55820770260172eccbbb68d7 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 16 Apr 2012 09:17:34 +0200 Subject: libX11 xserver pixman mesa git update 16 Apr 2012 --- xorg-server/hw/xfree86/x86emu/x86emu.h | 75 ++++--- xorg-server/hw/xfree86/x86emu/x86emu/debug.h | 163 ++++++++------- xorg-server/hw/xfree86/x86emu/x86emu/decode.h | 57 +++--- xorg-server/hw/xfree86/x86emu/x86emu/fpu.h | 23 ++- xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h | 44 ++--- xorg-server/hw/xfree86/x86emu/x86emu/ops.h | 6 +- xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h | 251 ++++++++++++++++-------- xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h | 189 +++++++++--------- xorg-server/hw/xfree86/x86emu/x86emu/regs.h | 101 +++++----- xorg-server/hw/xfree86/x86emu/x86emu/types.h | 23 ++- xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h | 34 ++-- 11 files changed, 520 insertions(+), 446 deletions(-) (limited to 'xorg-server/hw/xfree86/x86emu') diff --git a/xorg-server/hw/xfree86/x86emu/x86emu.h b/xorg-server/hw/xfree86/x86emu/x86emu.h index 795e2d688..501dd913c 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu.h @@ -56,7 +56,7 @@ typedef int X86EMU_pioAddr; /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK -# pragma PACK /* Don't pack structs with function pointers! */ +#pragma PACK /* Don't pack structs with function pointers! */ #endif /**************************************************************************** @@ -81,13 +81,13 @@ outw - Function to write a word to an I/O port outl - Function to write a dword to an I/O port ****************************************************************************/ typedef struct { - u8 (X86APIP inb)(X86EMU_pioAddr addr); - u16 (X86APIP inw)(X86EMU_pioAddr addr); - u32 (X86APIP inl)(X86EMU_pioAddr addr); - void (X86APIP outb)(X86EMU_pioAddr addr, u8 val); - void (X86APIP outw)(X86EMU_pioAddr addr, u16 val); - void (X86APIP outl)(X86EMU_pioAddr addr, u32 val); - } X86EMU_pioFuncs; + u8(X86APIP inb) (X86EMU_pioAddr addr); + u16(X86APIP inw) (X86EMU_pioAddr addr); + u32(X86APIP inl) (X86EMU_pioAddr addr); + void (X86APIP outb) (X86EMU_pioAddr addr, u8 val); + void (X86APIP outw) (X86EMU_pioAddr addr, u16 val); + void (X86APIP outl) (X86EMU_pioAddr addr, u32 val); +} X86EMU_pioFuncs; /**************************************************************************** REMARKS: @@ -112,13 +112,13 @@ wrw - Function to write a word to an address wrl - Function to write a dword to an address ****************************************************************************/ typedef struct { - u8 (X86APIP rdb)(u32 addr); - u16 (X86APIP rdw)(u32 addr); - u32 (X86APIP rdl)(u32 addr); - void (X86APIP wrb)(u32 addr, u8 val); - void (X86APIP wrw)(u32 addr, u16 val); - void (X86APIP wrl)(u32 addr, u32 val); - } X86EMU_memFuncs; + u8(X86APIP rdb) (u32 addr); + u16(X86APIP rdw) (u32 addr); + u32(X86APIP rdl) (u32 addr); + void (X86APIP wrb) (u32 addr, u8 val); + void (X86APIP wrw) (u32 addr, u16 val); + void (X86APIP wrl) (u32 addr, u32 val); +} X86EMU_memFuncs; /**************************************************************************** Here are the default memory read and write @@ -132,29 +132,29 @@ extern void X86API wrw(u32 addr, u16 val); extern void X86API wrl(u32 addr, u32 val); #ifdef END_PACK -# pragma END_PACK +#pragma END_PACK #endif /*--------------------- type definitions -----------------------------------*/ -typedef void (X86APIP X86EMU_intrFuncs)(int num); +typedef void (X86APIP X86EMU_intrFuncs) (int num); extern X86EMU_intrFuncs _X86EMU_intrTab[256]; /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -void X86EMU_setupMemFuncs(X86EMU_memFuncs *funcs); -void X86EMU_setupPioFuncs(X86EMU_pioFuncs *funcs); -void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]); -void X86EMU_prepareForInt(int num); + void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs); + void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs); + void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]); + void X86EMU_prepareForInt(int num); /* decode.c */ -void X86EMU_exec(void); -void X86EMU_halt_sys(void); + void X86EMU_exec(void); + void X86EMU_halt_sys(void); #ifdef DEBUG #define HALT_SYS() \ @@ -166,8 +166,8 @@ void X86EMU_halt_sys(void); /* Debug options */ -#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */ -#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */ +#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */ +#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */ #define DEBUG_STEP_F 0x000004 #define DEBUG_DISASSEMBLE_F 0x000008 #define DEBUG_BREAK_F 0x000010 @@ -175,24 +175,23 @@ void X86EMU_halt_sys(void); #define DEBUG_SAVE_IP_CS_F 0x000040 #define DEBUG_FS_F 0x000080 #define DEBUG_PROC_F 0x000100 -#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */ +#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */ #define DEBUG_TRACECALL_F 0x000400 #define DEBUG_INSTRUMENT_F 0x000800 -#define DEBUG_MEM_TRACE_F 0x001000 -#define DEBUG_IO_TRACE_F 0x002000 +#define DEBUG_MEM_TRACE_F 0x001000 +#define DEBUG_IO_TRACE_F 0x002000 #define DEBUG_TRACECALL_REGS_F 0x004000 -#define DEBUG_DECODE_NOPRINT_F 0x008000 +#define DEBUG_DECODE_NOPRINT_F 0x008000 #define DEBUG_EXIT 0x010000 #define DEBUG_SYS_F (DEBUG_SVC_F|DEBUG_FS_F|DEBUG_PROC_F) -void X86EMU_trace_regs(void); -void X86EMU_trace_xregs(void); -void X86EMU_dump_memory(u16 seg, u16 off, u32 amt); -int X86EMU_trace_on(void); -int X86EMU_trace_off(void); + void X86EMU_trace_regs(void); + void X86EMU_trace_xregs(void); + void X86EMU_dump_memory(u16 seg, u16 off, u32 amt); + int X86EMU_trace_on(void); + int X86EMU_trace_off(void); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_X86EMU_H */ +#endif /* __X86EMU_X86EMU_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h index 5f78d0575..385b804dd 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h @@ -45,65 +45,65 @@ #define CHECK_IP_FETCH_F 0x1 #define CHECK_SP_ACCESS_F 0x2 -#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */ -#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/ +#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */ +#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset */ #ifdef DEBUG -# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F) -# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F) -# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F) -# define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F) +#define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F) +#define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F) +#define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F) +#define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F) #else -# define CHECK_IP_FETCH() -# define CHECK_SP_ACCESS() -# define CHECK_MEM_ACCESS() -# define CHECK_DATA_ACCESS() +#define CHECK_IP_FETCH() +#define CHECK_SP_ACCESS() +#define CHECK_MEM_ACCESS() +#define CHECK_DATA_ACCESS() #endif #ifdef DEBUG -# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F) -# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F) -# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F) -# define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F) -# define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F) -# define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F) -# define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F) -# define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F) - -# define DEBUG_FS() (M.x86.debug & DEBUG_FS_F) -# define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F) -# define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F) -# define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F) -# define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F) -# define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F) -# define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F) -# define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F) -# define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F) +#define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F) +#define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F) +#define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F) +#define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F) +#define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F) +#define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F) +#define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F) +#define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F) + +#define DEBUG_FS() (M.x86.debug & DEBUG_FS_F) +#define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F) +#define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F) +#define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F) +#define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F) +#define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F) +#define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F) +#define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F) +#define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F) #else -# define DEBUG_INSTRUMENT() 0 -# define DEBUG_DECODE() 0 -# define DEBUG_TRACE() 0 -# define DEBUG_STEP() 0 -# define DEBUG_DISASSEMBLE() 0 -# define DEBUG_BREAK() 0 -# define DEBUG_SVC() 0 -# define DEBUG_SAVE_IP_CS() 0 -# define DEBUG_FS() 0 -# define DEBUG_PROC() 0 -# define DEBUG_SYSINT() 0 -# define DEBUG_TRACECALL() 0 -# define DEBUG_TRACECALLREGS() 0 -# define DEBUG_SYS() 0 -# define DEBUG_MEM_TRACE() 0 -# define DEBUG_IO_TRACE() 0 -# define DEBUG_DECODE_NOPRINT() 0 +#define DEBUG_INSTRUMENT() 0 +#define DEBUG_DECODE() 0 +#define DEBUG_TRACE() 0 +#define DEBUG_STEP() 0 +#define DEBUG_DISASSEMBLE() 0 +#define DEBUG_BREAK() 0 +#define DEBUG_SVC() 0 +#define DEBUG_SAVE_IP_CS() 0 +#define DEBUG_FS() 0 +#define DEBUG_PROC() 0 +#define DEBUG_SYSINT() 0 +#define DEBUG_TRACECALL() 0 +#define DEBUG_TRACECALLREGS() 0 +#define DEBUG_SYS() 0 +#define DEBUG_MEM_TRACE() 0 +#define DEBUG_IO_TRACE() 0 +#define DEBUG_DECODE_NOPRINT() 0 #endif #ifdef DEBUG -# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ +#define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ x86emu_decode_printf(x) -# define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \ +#define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \ x86emu_decode_printf2(x,y) /* @@ -123,10 +123,10 @@ M.x86.saved_ip = y; \ } #else -# define INC_DECODED_INST_LEN(x) -# define DECODE_PRINTF(x) -# define DECODE_PRINTF2(x,y) -# define SAVE_IP_CS(x,y) +#define INC_DECODED_INST_LEN(x) +#define DECODE_PRINTF(x) +#define DECODE_PRINTF2(x,y) +#define SAVE_IP_CS(x,y) #endif #ifdef DEBUG @@ -137,13 +137,13 @@ } \ if (DEBUG_TRACE() || DEBUG_DECODE()) X86EMU_trace_regs() #else -# define TRACE_REGS() +#define TRACE_REGS() #endif #ifdef DEBUG -# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() +#define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() #else -# define SINGLE_STEP() +#define SINGLE_STEP() #endif #define TRACE_AND_STEP() \ @@ -151,29 +151,29 @@ SINGLE_STEP() #ifdef DEBUG -# define START_OF_INSTR() -# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr(); -# define END_OF_INSTR_NO_TRACE() x86emu_end_instr(); +#define START_OF_INSTR() +#define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr(); +#define END_OF_INSTR_NO_TRACE() x86emu_end_instr(); #else -# define START_OF_INSTR() -# define END_OF_INSTR() -# define END_OF_INSTR_NO_TRACE() +#define START_OF_INSTR() +#define END_OF_INSTR() +#define END_OF_INSTR_NO_TRACE() #endif #ifdef DEBUG -# define CALL_TRACE(u,v,w,x,s) \ +#define CALL_TRACE(u,v,w,x,s) \ if (DEBUG_TRACECALLREGS()) \ x86emu_dump_regs(); \ if (DEBUG_TRACECALL()) \ printk("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x); -# define RETURN_TRACE(n,u,v) \ +#define RETURN_TRACE(n,u,v) \ if (DEBUG_TRACECALLREGS()) \ x86emu_dump_regs(); \ if (DEBUG_TRACECALL()) \ printk("%04x:%04x: %s\n",u,v,n); #else -# define CALL_TRACE(u,v,w,x,s) -# define RETURN_TRACE(n,u,v) +#define CALL_TRACE(u,v,w,x,s) +#define RETURN_TRACE(n,u,v) #endif #ifdef DEBUG @@ -185,26 +185,25 @@ /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -extern void x86emu_inc_decoded_inst_len (int x); -extern void x86emu_decode_printf (const char *x); -extern void x86emu_decode_printf2 (const char *x, int y); -extern void x86emu_just_disassemble (void); -extern void x86emu_single_step (void); -extern void x86emu_end_instr (void); -extern void x86emu_dump_regs (void); -extern void x86emu_dump_xregs (void); -extern void x86emu_print_int_vect (u16 iv); -extern void x86emu_instrument_instruction (void); -extern void x86emu_check_ip_access (void); -extern void x86emu_check_sp_access (void); -extern void x86emu_check_mem_access (u32 p); -extern void x86emu_check_data_access (uint s, uint o); + extern void x86emu_inc_decoded_inst_len(int x); + extern void x86emu_decode_printf(const char *x); + extern void x86emu_decode_printf2(const char *x, int y); + extern void x86emu_just_disassemble(void); + extern void x86emu_single_step(void); + extern void x86emu_end_instr(void); + extern void x86emu_dump_regs(void); + extern void x86emu_dump_xregs(void); + extern void x86emu_print_int_vect(u16 iv); + extern void x86emu_instrument_instruction(void); + extern void x86emu_check_ip_access(void); + extern void x86emu_check_sp_access(void); + extern void x86emu_check_mem_access(u32 p); + extern void x86emu_check_data_access(uint s, uint o); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_DEBUG_H */ +#endif /* __X86EMU_DEBUG_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h index 61cd4dc10..49a1f7b54 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h @@ -52,37 +52,36 @@ /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -void x86emu_intr_raise (u8 type); -void fetch_decode_modrm (int *mod,int *regh,int *regl); -u8 fetch_byte_imm (void); -u16 fetch_word_imm (void); -u32 fetch_long_imm (void); -u8 fetch_data_byte (uint offset); -u8 fetch_data_byte_abs (uint segment, uint offset); -u16 fetch_data_word (uint offset); -u16 fetch_data_word_abs (uint segment, uint offset); -u32 fetch_data_long (uint offset); -u32 fetch_data_long_abs (uint segment, uint offset); -void store_data_byte (uint offset, u8 val); -void store_data_byte_abs (uint segment, uint offset, u8 val); -void store_data_word (uint offset, u16 val); -void store_data_word_abs (uint segment, uint offset, u16 val); -void store_data_long (uint offset, u32 val); -void store_data_long_abs (uint segment, uint offset, u32 val); -u8* decode_rm_byte_register(int reg); -u16* decode_rm_word_register(int reg); -u32* decode_rm_long_register(int reg); -u16* decode_rm_seg_register(int reg); -u32 decode_rm00_address(int rm); -u32 decode_rm01_address(int rm); -u32 decode_rm10_address(int rm); -u32 decode_sib_address(int sib, int mod); + void x86emu_intr_raise(u8 type); + void fetch_decode_modrm(int *mod, int *regh, int *regl); + u8 fetch_byte_imm(void); + u16 fetch_word_imm(void); + u32 fetch_long_imm(void); + u8 fetch_data_byte(uint offset); + u8 fetch_data_byte_abs(uint segment, uint offset); + u16 fetch_data_word(uint offset); + u16 fetch_data_word_abs(uint segment, uint offset); + u32 fetch_data_long(uint offset); + u32 fetch_data_long_abs(uint segment, uint offset); + void store_data_byte(uint offset, u8 val); + void store_data_byte_abs(uint segment, uint offset, u8 val); + void store_data_word(uint offset, u16 val); + void store_data_word_abs(uint segment, uint offset, u16 val); + void store_data_long(uint offset, u32 val); + void store_data_long_abs(uint segment, uint offset, u32 val); + u8 *decode_rm_byte_register(int reg); + u16 *decode_rm_word_register(int reg); + u32 *decode_rm_long_register(int reg); + u16 *decode_rm_seg_register(int reg); + u32 decode_rm00_address(int rm); + u32 decode_rm01_address(int rm); + u32 decode_rm10_address(int rm); + u32 decode_sib_address(int sib, int mod); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_DECODE_H */ +#endif /* __X86EMU_DECODE_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h index 5fb271463..1c114987f 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h @@ -40,22 +40,21 @@ #define __X86EMU_FPU_H #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif /* these have to be defined, whether 8087 support compiled in or not. */ -extern void x86emuOp_esc_coprocess_d8 (u8 op1); -extern void x86emuOp_esc_coprocess_d9 (u8 op1); -extern void x86emuOp_esc_coprocess_da (u8 op1); -extern void x86emuOp_esc_coprocess_db (u8 op1); -extern void x86emuOp_esc_coprocess_dc (u8 op1); -extern void x86emuOp_esc_coprocess_dd (u8 op1); -extern void x86emuOp_esc_coprocess_de (u8 op1); -extern void x86emuOp_esc_coprocess_df (u8 op1); + extern void x86emuOp_esc_coprocess_d8(u8 op1); + extern void x86emuOp_esc_coprocess_d9(u8 op1); + extern void x86emuOp_esc_coprocess_da(u8 op1); + extern void x86emuOp_esc_coprocess_db(u8 op1); + extern void x86emuOp_esc_coprocess_dc(u8 op1); + extern void x86emuOp_esc_coprocess_dd(u8 op1); + extern void x86emuOp_esc_coprocess_de(u8 op1); + extern void x86emuOp_esc_coprocess_df(u8 op1); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_FPU_H */ +#endif /* __X86EMU_FPU_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h index e59b80783..5a780e69c 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h @@ -42,23 +42,23 @@ #ifdef X86_FPU_SUPPORT #ifdef PACK -# pragma PACK +#pragma PACK #endif /* Basic 8087 register can hold any of the following values: */ union x86_fpu_reg_u { - s8 tenbytes[10]; - double dval; - float fval; - s16 sval; - s32 lval; - }; + s8 tenbytes[10]; + double dval; + float fval; + s16 sval; + s32 lval; +}; struct x86_fpu_reg { - union x86_fpu_reg_u reg; - char tag; - }; + union x86_fpu_reg_u reg; + char tag; +}; /* * Since we are not going to worry about the problems of aliasing @@ -83,14 +83,14 @@ struct x86_fpu_reg { #define X86_FPU_STKTOP 0 struct x86_fpu_registers { - struct x86_fpu_reg x86_fpu_stack[8]; - int x86_fpu_flags; - int x86_fpu_config; /* rounding modes, etc. */ - short x86_fpu_tos, x86_fpu_bos; - }; + struct x86_fpu_reg x86_fpu_stack[8]; + int x86_fpu_flags; + int x86_fpu_config; /* rounding modes, etc. */ + short x86_fpu_tos, x86_fpu_bos; +}; #ifdef END_PACK -# pragma END_PACK +#pragma END_PACK #endif /* @@ -104,16 +104,16 @@ struct x86_fpu_registers { * instructions. */ -#endif /* X86_FPU_SUPPORT */ +#endif /* X86_FPU_SUPPORT */ #ifdef DEBUG -# define DECODE_PRINTINSTR32(t,mod,rh,rl) \ +#define DECODE_PRINTINSTR32(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<3)+(rh)]); -# define DECODE_PRINTINSTR256(t,mod,rh,rl) \ +#define DECODE_PRINTINSTR256(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<6)+(rh<<3)+(rl)]); #else -# define DECODE_PRINTINSTR32(t,mod,rh,rl) -# define DECODE_PRINTINSTR256(t,mod,rh,rl) +#define DECODE_PRINTINSTR32(t,mod,rh,rl) +#define DECODE_PRINTINSTR256(t,mod,rh,rl) #endif -#endif /* __X86EMU_FPU_REGS_H */ +#endif /* __X86EMU_FPU_REGS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h index 65ea67654..1bc07a4e1 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h @@ -39,7 +39,7 @@ #ifndef __X86EMU_OPS_H #define __X86EMU_OPS_H -extern void (*x86emu_optab[0x100])(u8 op1); -extern void (*x86emu_optab2[0x100])(u8 op2); +extern void (*x86emu_optab[0x100]) (u8 op1); +extern void (*x86emu_optab2[0x100]) (u8 op2); -#endif /* __X86EMU_OPS_H */ +#endif /* __X86EMU_OPS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h index e023cf88d..aca132bf1 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h @@ -49,14 +49,16 @@ #define __HAVE_INLINE_ASSEMBLER__ #endif -u32 get_flags_asm(void); +u32 get_flags_asm(void); + #pragma aux get_flags_asm = \ "pushf" \ "pop eax" \ value [eax] \ modify exact [eax]; -u16 aaa_word_asm(u32 *flags,u16 d); +u16 aaa_word_asm(u32 * flags, u16 d); + #pragma aux aaa_word_asm = \ "push [edi]" \ "popf" \ @@ -67,7 +69,8 @@ u16 aaa_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u16 aas_word_asm(u32 *flags,u16 d); +u16 aas_word_asm(u32 * flags, u16 d); + #pragma aux aas_word_asm = \ "push [edi]" \ "popf" \ @@ -78,7 +81,8 @@ u16 aas_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u16 aad_word_asm(u32 *flags,u16 d); +u16 aad_word_asm(u32 * flags, u16 d); + #pragma aux aad_word_asm = \ "push [edi]" \ "popf" \ @@ -89,7 +93,8 @@ u16 aad_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u16 aam_word_asm(u32 *flags,u8 d); +u16 aam_word_asm(u32 * flags, u8 d); + #pragma aux aam_word_asm = \ "push [edi]" \ "popf" \ @@ -100,7 +105,8 @@ u16 aam_word_asm(u32 *flags,u8 d); value [ax] \ modify exact [ax]; -u8 adc_byte_asm(u32 *flags,u8 d, u8 s); +u8 adc_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux adc_byte_asm = \ "push [edi]" \ "popf" \ @@ -111,7 +117,8 @@ u8 adc_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 adc_word_asm(u32 *flags,u16 d, u16 s); +u16 adc_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux adc_word_asm = \ "push [edi]" \ "popf" \ @@ -122,7 +129,8 @@ u16 adc_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 adc_long_asm(u32 *flags,u32 d, u32 s); +u32 adc_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux adc_long_asm = \ "push [edi]" \ "popf" \ @@ -133,7 +141,8 @@ u32 adc_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 add_byte_asm(u32 *flags,u8 d, u8 s); +u8 add_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux add_byte_asm = \ "push [edi]" \ "popf" \ @@ -144,7 +153,8 @@ u8 add_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 add_word_asm(u32 *flags,u16 d, u16 s); +u16 add_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux add_word_asm = \ "push [edi]" \ "popf" \ @@ -155,7 +165,8 @@ u16 add_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 add_long_asm(u32 *flags,u32 d, u32 s); +u32 add_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux add_long_asm = \ "push [edi]" \ "popf" \ @@ -166,7 +177,8 @@ u32 add_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 and_byte_asm(u32 *flags,u8 d, u8 s); +u8 and_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux and_byte_asm = \ "push [edi]" \ "popf" \ @@ -177,7 +189,8 @@ u8 and_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 and_word_asm(u32 *flags,u16 d, u16 s); +u16 and_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux and_word_asm = \ "push [edi]" \ "popf" \ @@ -188,7 +201,8 @@ u16 and_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 and_long_asm(u32 *flags,u32 d, u32 s); +u32 and_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux and_long_asm = \ "push [edi]" \ "popf" \ @@ -199,7 +213,8 @@ u32 and_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 cmp_byte_asm(u32 *flags,u8 d, u8 s); +u8 cmp_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux cmp_byte_asm = \ "push [edi]" \ "popf" \ @@ -210,7 +225,8 @@ u8 cmp_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 cmp_word_asm(u32 *flags,u16 d, u16 s); +u16 cmp_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux cmp_word_asm = \ "push [edi]" \ "popf" \ @@ -221,7 +237,8 @@ u16 cmp_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 cmp_long_asm(u32 *flags,u32 d, u32 s); +u32 cmp_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux cmp_long_asm = \ "push [edi]" \ "popf" \ @@ -232,7 +249,8 @@ u32 cmp_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 daa_byte_asm(u32 *flags,u8 d); +u8 daa_byte_asm(u32 * flags, u8 d); + #pragma aux daa_byte_asm = \ "push [edi]" \ "popf" \ @@ -243,7 +261,8 @@ u8 daa_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u8 das_byte_asm(u32 *flags,u8 d); +u8 das_byte_asm(u32 * flags, u8 d); + #pragma aux das_byte_asm = \ "push [edi]" \ "popf" \ @@ -254,7 +273,8 @@ u8 das_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u8 dec_byte_asm(u32 *flags,u8 d); +u8 dec_byte_asm(u32 * flags, u8 d); + #pragma aux dec_byte_asm = \ "push [edi]" \ "popf" \ @@ -265,7 +285,8 @@ u8 dec_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 dec_word_asm(u32 *flags,u16 d); +u16 dec_word_asm(u32 * flags, u16 d); + #pragma aux dec_word_asm = \ "push [edi]" \ "popf" \ @@ -276,7 +297,8 @@ u16 dec_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 dec_long_asm(u32 *flags,u32 d); +u32 dec_long_asm(u32 * flags, u32 d); + #pragma aux dec_long_asm = \ "push [edi]" \ "popf" \ @@ -287,7 +309,8 @@ u32 dec_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 inc_byte_asm(u32 *flags,u8 d); +u8 inc_byte_asm(u32 * flags, u8 d); + #pragma aux inc_byte_asm = \ "push [edi]" \ "popf" \ @@ -298,7 +321,8 @@ u8 inc_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 inc_word_asm(u32 *flags,u16 d); +u16 inc_word_asm(u32 * flags, u16 d); + #pragma aux inc_word_asm = \ "push [edi]" \ "popf" \ @@ -309,7 +333,8 @@ u16 inc_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 inc_long_asm(u32 *flags,u32 d); +u32 inc_long_asm(u32 * flags, u32 d); + #pragma aux inc_long_asm = \ "push [edi]" \ "popf" \ @@ -320,7 +345,8 @@ u32 inc_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 or_byte_asm(u32 *flags,u8 d, u8 s); +u8 or_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux or_byte_asm = \ "push [edi]" \ "popf" \ @@ -331,7 +357,8 @@ u8 or_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 or_word_asm(u32 *flags,u16 d, u16 s); +u16 or_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux or_word_asm = \ "push [edi]" \ "popf" \ @@ -342,7 +369,8 @@ u16 or_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 or_long_asm(u32 *flags,u32 d, u32 s); +u32 or_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux or_long_asm = \ "push [edi]" \ "popf" \ @@ -353,7 +381,8 @@ u32 or_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 neg_byte_asm(u32 *flags,u8 d); +u8 neg_byte_asm(u32 * flags, u8 d); + #pragma aux neg_byte_asm = \ "push [edi]" \ "popf" \ @@ -364,7 +393,8 @@ u8 neg_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 neg_word_asm(u32 *flags,u16 d); +u16 neg_word_asm(u32 * flags, u16 d); + #pragma aux neg_word_asm = \ "push [edi]" \ "popf" \ @@ -375,7 +405,8 @@ u16 neg_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 neg_long_asm(u32 *flags,u32 d); +u32 neg_long_asm(u32 * flags, u32 d); + #pragma aux neg_long_asm = \ "push [edi]" \ "popf" \ @@ -386,7 +417,8 @@ u32 neg_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 not_byte_asm(u32 *flags,u8 d); +u8 not_byte_asm(u32 * flags, u8 d); + #pragma aux not_byte_asm = \ "push [edi]" \ "popf" \ @@ -397,7 +429,8 @@ u8 not_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 not_word_asm(u32 *flags,u16 d); +u16 not_word_asm(u32 * flags, u16 d); + #pragma aux not_word_asm = \ "push [edi]" \ "popf" \ @@ -408,7 +441,8 @@ u16 not_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 not_long_asm(u32 *flags,u32 d); +u32 not_long_asm(u32 * flags, u32 d); + #pragma aux not_long_asm = \ "push [edi]" \ "popf" \ @@ -419,7 +453,8 @@ u32 not_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 rcl_byte_asm(u32 *flags,u8 d, u8 s); +u8 rcl_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux rcl_byte_asm = \ "push [edi]" \ "popf" \ @@ -430,7 +465,8 @@ u8 rcl_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 rcl_word_asm(u32 *flags,u16 d, u8 s); +u16 rcl_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux rcl_word_asm = \ "push [edi]" \ "popf" \ @@ -441,7 +477,8 @@ u16 rcl_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 rcl_long_asm(u32 *flags,u32 d, u8 s); +u32 rcl_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux rcl_long_asm = \ "push [edi]" \ "popf" \ @@ -452,7 +489,8 @@ u32 rcl_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 rcr_byte_asm(u32 *flags,u8 d, u8 s); +u8 rcr_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux rcr_byte_asm = \ "push [edi]" \ "popf" \ @@ -463,7 +501,8 @@ u8 rcr_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 rcr_word_asm(u32 *flags,u16 d, u8 s); +u16 rcr_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux rcr_word_asm = \ "push [edi]" \ "popf" \ @@ -474,7 +513,8 @@ u16 rcr_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 rcr_long_asm(u32 *flags,u32 d, u8 s); +u32 rcr_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux rcr_long_asm = \ "push [edi]" \ "popf" \ @@ -485,7 +525,8 @@ u32 rcr_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 rol_byte_asm(u32 *flags,u8 d, u8 s); +u8 rol_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux rol_byte_asm = \ "push [edi]" \ "popf" \ @@ -496,7 +537,8 @@ u8 rol_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 rol_word_asm(u32 *flags,u16 d, u8 s); +u16 rol_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux rol_word_asm = \ "push [edi]" \ "popf" \ @@ -507,7 +549,8 @@ u16 rol_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 rol_long_asm(u32 *flags,u32 d, u8 s); +u32 rol_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux rol_long_asm = \ "push [edi]" \ "popf" \ @@ -518,7 +561,8 @@ u32 rol_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 ror_byte_asm(u32 *flags,u8 d, u8 s); +u8 ror_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux ror_byte_asm = \ "push [edi]" \ "popf" \ @@ -529,7 +573,8 @@ u8 ror_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 ror_word_asm(u32 *flags,u16 d, u8 s); +u16 ror_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux ror_word_asm = \ "push [edi]" \ "popf" \ @@ -540,7 +585,8 @@ u16 ror_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 ror_long_asm(u32 *flags,u32 d, u8 s); +u32 ror_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux ror_long_asm = \ "push [edi]" \ "popf" \ @@ -551,7 +597,8 @@ u32 ror_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 shl_byte_asm(u32 *flags,u8 d, u8 s); +u8 shl_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux shl_byte_asm = \ "push [edi]" \ "popf" \ @@ -562,7 +609,8 @@ u8 shl_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 shl_word_asm(u32 *flags,u16 d, u8 s); +u16 shl_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux shl_word_asm = \ "push [edi]" \ "popf" \ @@ -573,7 +621,8 @@ u16 shl_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 shl_long_asm(u32 *flags,u32 d, u8 s); +u32 shl_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux shl_long_asm = \ "push [edi]" \ "popf" \ @@ -584,7 +633,8 @@ u32 shl_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 shr_byte_asm(u32 *flags,u8 d, u8 s); +u8 shr_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux shr_byte_asm = \ "push [edi]" \ "popf" \ @@ -595,7 +645,8 @@ u8 shr_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 shr_word_asm(u32 *flags,u16 d, u8 s); +u16 shr_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux shr_word_asm = \ "push [edi]" \ "popf" \ @@ -606,7 +657,8 @@ u16 shr_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 shr_long_asm(u32 *flags,u32 d, u8 s); +u32 shr_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux shr_long_asm = \ "push [edi]" \ "popf" \ @@ -617,7 +669,8 @@ u32 shr_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 sar_byte_asm(u32 *flags,u8 d, u8 s); +u8 sar_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux sar_byte_asm = \ "push [edi]" \ "popf" \ @@ -628,7 +681,8 @@ u8 sar_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 sar_word_asm(u32 *flags,u16 d, u8 s); +u16 sar_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux sar_word_asm = \ "push [edi]" \ "popf" \ @@ -639,7 +693,8 @@ u16 sar_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 sar_long_asm(u32 *flags,u32 d, u8 s); +u32 sar_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux sar_long_asm = \ "push [edi]" \ "popf" \ @@ -650,7 +705,8 @@ u32 sar_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s); +u16 shld_word_asm(u32 * flags, u16 d, u16 fill, u8 s); + #pragma aux shld_word_asm = \ "push [edi]" \ "popf" \ @@ -661,7 +717,8 @@ u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s); value [ax] \ modify exact [ax dx cl]; -u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s); +u32 shld_long_asm(u32 * flags, u32 d, u32 fill, u8 s); + #pragma aux shld_long_asm = \ "push [edi]" \ "popf" \ @@ -672,7 +729,8 @@ u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s); value [eax] \ modify exact [eax edx cl]; -u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s); +u16 shrd_word_asm(u32 * flags, u16 d, u16 fill, u8 s); + #pragma aux shrd_word_asm = \ "push [edi]" \ "popf" \ @@ -683,7 +741,8 @@ u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s); value [ax] \ modify exact [ax dx cl]; -u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s); +u32 shrd_long_asm(u32 * flags, u32 d, u32 fill, u8 s); + #pragma aux shrd_long_asm = \ "push [edi]" \ "popf" \ @@ -694,7 +753,8 @@ u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s); value [eax] \ modify exact [eax edx cl]; -u8 sbb_byte_asm(u32 *flags,u8 d, u8 s); +u8 sbb_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux sbb_byte_asm = \ "push [edi]" \ "popf" \ @@ -705,7 +765,8 @@ u8 sbb_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 sbb_word_asm(u32 *flags,u16 d, u16 s); +u16 sbb_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux sbb_word_asm = \ "push [edi]" \ "popf" \ @@ -716,7 +777,8 @@ u16 sbb_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 sbb_long_asm(u32 *flags,u32 d, u32 s); +u32 sbb_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux sbb_long_asm = \ "push [edi]" \ "popf" \ @@ -727,7 +789,8 @@ u32 sbb_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 sub_byte_asm(u32 *flags,u8 d, u8 s); +u8 sub_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux sub_byte_asm = \ "push [edi]" \ "popf" \ @@ -738,7 +801,8 @@ u8 sub_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 sub_word_asm(u32 *flags,u16 d, u16 s); +u16 sub_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux sub_word_asm = \ "push [edi]" \ "popf" \ @@ -749,7 +813,8 @@ u16 sub_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 sub_long_asm(u32 *flags,u32 d, u32 s); +u32 sub_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux sub_long_asm = \ "push [edi]" \ "popf" \ @@ -760,7 +825,8 @@ u32 sub_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -void test_byte_asm(u32 *flags,u8 d, u8 s); +void test_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux test_byte_asm = \ "push [edi]" \ "popf" \ @@ -770,7 +836,8 @@ void test_byte_asm(u32 *flags,u8 d, u8 s); parm [edi] [al] [bl] \ modify exact [al bl]; -void test_word_asm(u32 *flags,u16 d, u16 s); +void test_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux test_word_asm = \ "push [edi]" \ "popf" \ @@ -780,7 +847,8 @@ void test_word_asm(u32 *flags,u16 d, u16 s); parm [edi] [ax] [bx] \ modify exact [ax bx]; -void test_long_asm(u32 *flags,u32 d, u32 s); +void test_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux test_long_asm = \ "push [edi]" \ "popf" \ @@ -790,7 +858,8 @@ void test_long_asm(u32 *flags,u32 d, u32 s); parm [edi] [eax] [ebx] \ modify exact [eax ebx]; -u8 xor_byte_asm(u32 *flags,u8 d, u8 s); +u8 xor_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux xor_byte_asm = \ "push [edi]" \ "popf" \ @@ -801,7 +870,8 @@ u8 xor_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 xor_word_asm(u32 *flags,u16 d, u16 s); +u16 xor_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux xor_word_asm = \ "push [edi]" \ "popf" \ @@ -812,7 +882,8 @@ u16 xor_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 xor_long_asm(u32 *flags,u32 d, u32 s); +u32 xor_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux xor_long_asm = \ "push [edi]" \ "popf" \ @@ -823,7 +894,8 @@ u32 xor_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); +void imul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s); + #pragma aux imul_byte_asm = \ "push [edi]" \ "popf" \ @@ -834,7 +906,8 @@ void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); parm [edi] [esi] [al] [bl] \ modify exact [esi ax bl]; -void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); +void imul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s); + #pragma aux imul_word_asm = \ "push [edi]" \ "popf" \ @@ -846,7 +919,8 @@ void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); parm [edi] [esi] [ecx] [ax] [bx]\ modify exact [esi edi ax bx dx]; -void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); +void imul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s); + #pragma aux imul_long_asm = \ "push [edi]" \ "popf" \ @@ -858,7 +932,8 @@ void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); parm [edi] [esi] [ecx] [eax] [ebx] \ modify exact [esi edi eax ebx edx]; -void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); +void mul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s); + #pragma aux mul_byte_asm = \ "push [edi]" \ "popf" \ @@ -869,7 +944,8 @@ void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); parm [edi] [esi] [al] [bl] \ modify exact [esi ax bl]; -void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); +void mul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s); + #pragma aux mul_word_asm = \ "push [edi]" \ "popf" \ @@ -881,7 +957,8 @@ void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); parm [edi] [esi] [ecx] [ax] [bx]\ modify exact [esi edi ax bx dx]; -void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); +void mul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s); + #pragma aux mul_long_asm = \ "push [edi]" \ "popf" \ @@ -893,7 +970,8 @@ void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); parm [edi] [esi] [ecx] [eax] [ebx] \ modify exact [esi edi eax ebx edx]; -void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); +void idiv_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s); + #pragma aux idiv_byte_asm = \ "push [edi]" \ "popf" \ @@ -905,7 +983,8 @@ void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); parm [edi] [esi] [ecx] [ax] [bl]\ modify exact [esi edi ax bl]; -void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); +void idiv_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s); + #pragma aux idiv_word_asm = \ "push [edi]" \ "popf" \ @@ -917,7 +996,8 @@ void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); parm [edi] [esi] [ecx] [ax] [dx] [bx]\ modify exact [esi edi ax dx bx]; -void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); +void idiv_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s); + #pragma aux idiv_long_asm = \ "push [edi]" \ "popf" \ @@ -929,7 +1009,8 @@ void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); parm [edi] [esi] [ecx] [eax] [edx] [ebx]\ modify exact [esi edi eax edx ebx]; -void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); +void div_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s); + #pragma aux div_byte_asm = \ "push [edi]" \ "popf" \ @@ -941,7 +1022,8 @@ void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); parm [edi] [esi] [ecx] [ax] [bl]\ modify exact [esi edi ax bl]; -void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); +void div_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s); + #pragma aux div_word_asm = \ "push [edi]" \ "popf" \ @@ -953,7 +1035,8 @@ void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); parm [edi] [esi] [ecx] [ax] [dx] [bx]\ modify exact [esi edi ax dx bx]; -void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); +void div_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s); + #pragma aux div_long_asm = \ "push [edi]" \ "popf" \ @@ -967,4 +1050,4 @@ void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); #endif -#endif /* __X86EMU_PRIM_ASM_H */ +#endif /* __X86EMU_PRIM_ASM_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h index 6ac2a29f6..0f0e78d71 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h @@ -40,103 +40,102 @@ #define __X86EMU_PRIM_OPS_H #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -u16 aaa_word (u16 d); -u16 aas_word (u16 d); -u16 aad_word (u16 d); -u16 aam_word (u8 d); -u8 adc_byte (u8 d, u8 s); -u16 adc_word (u16 d, u16 s); -u32 adc_long (u32 d, u32 s); -u8 add_byte (u8 d, u8 s); -u16 add_word (u16 d, u16 s); -u32 add_long (u32 d, u32 s); -u8 and_byte (u8 d, u8 s); -u16 and_word (u16 d, u16 s); -u32 and_long (u32 d, u32 s); -u8 cmp_byte (u8 d, u8 s); -u16 cmp_word (u16 d, u16 s); -u32 cmp_long (u32 d, u32 s); -u8 daa_byte (u8 d); -u8 das_byte (u8 d); -u8 dec_byte (u8 d); -u16 dec_word (u16 d); -u32 dec_long (u32 d); -u8 inc_byte (u8 d); -u16 inc_word (u16 d); -u32 inc_long (u32 d); -u8 or_byte (u8 d, u8 s); -u16 or_word (u16 d, u16 s); -u32 or_long (u32 d, u32 s); -u8 neg_byte (u8 s); -u16 neg_word (u16 s); -u32 neg_long (u32 s); -u8 not_byte (u8 s); -u16 not_word (u16 s); -u32 not_long (u32 s); -u8 rcl_byte (u8 d, u8 s); -u16 rcl_word (u16 d, u8 s); -u32 rcl_long (u32 d, u8 s); -u8 rcr_byte (u8 d, u8 s); -u16 rcr_word (u16 d, u8 s); -u32 rcr_long (u32 d, u8 s); -u8 rol_byte (u8 d, u8 s); -u16 rol_word (u16 d, u8 s); -u32 rol_long (u32 d, u8 s); -u8 ror_byte (u8 d, u8 s); -u16 ror_word (u16 d, u8 s); -u32 ror_long (u32 d, u8 s); -u8 shl_byte (u8 d, u8 s); -u16 shl_word (u16 d, u8 s); -u32 shl_long (u32 d, u8 s); -u8 shr_byte (u8 d, u8 s); -u16 shr_word (u16 d, u8 s); -u32 shr_long (u32 d, u8 s); -u8 sar_byte (u8 d, u8 s); -u16 sar_word (u16 d, u8 s); -u32 sar_long (u32 d, u8 s); -u16 shld_word (u16 d, u16 fill, u8 s); -u32 shld_long (u32 d, u32 fill, u8 s); -u16 shrd_word (u16 d, u16 fill, u8 s); -u32 shrd_long (u32 d, u32 fill, u8 s); -u8 sbb_byte (u8 d, u8 s); -u16 sbb_word (u16 d, u16 s); -u32 sbb_long (u32 d, u32 s); -u8 sub_byte (u8 d, u8 s); -u16 sub_word (u16 d, u16 s); -u32 sub_long (u32 d, u32 s); -void test_byte (u8 d, u8 s); -void test_word (u16 d, u16 s); -void test_long (u32 d, u32 s); -u8 xor_byte (u8 d, u8 s); -u16 xor_word (u16 d, u16 s); -u32 xor_long (u32 d, u32 s); -void imul_byte (u8 s); -void imul_word (u16 s); -void imul_long (u32 s); -void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s); -void mul_byte (u8 s); -void mul_word (u16 s); -void mul_long (u32 s); -void idiv_byte (u8 s); -void idiv_word (u16 s); -void idiv_long (u32 s); -void div_byte (u8 s); -void div_word (u16 s); -void div_long (u32 s); -void ins (int size); -void outs (int size); -u16 mem_access_word (int addr); -void push_word (u16 w); -void push_long (u32 w); -u16 pop_word (void); -u32 pop_long (void); -void cpuid (void); + u16 aaa_word(u16 d); + u16 aas_word(u16 d); + u16 aad_word(u16 d); + u16 aam_word(u8 d); + u8 adc_byte(u8 d, u8 s); + u16 adc_word(u16 d, u16 s); + u32 adc_long(u32 d, u32 s); + u8 add_byte(u8 d, u8 s); + u16 add_word(u16 d, u16 s); + u32 add_long(u32 d, u32 s); + u8 and_byte(u8 d, u8 s); + u16 and_word(u16 d, u16 s); + u32 and_long(u32 d, u32 s); + u8 cmp_byte(u8 d, u8 s); + u16 cmp_word(u16 d, u16 s); + u32 cmp_long(u32 d, u32 s); + u8 daa_byte(u8 d); + u8 das_byte(u8 d); + u8 dec_byte(u8 d); + u16 dec_word(u16 d); + u32 dec_long(u32 d); + u8 inc_byte(u8 d); + u16 inc_word(u16 d); + u32 inc_long(u32 d); + u8 or_byte(u8 d, u8 s); + u16 or_word(u16 d, u16 s); + u32 or_long(u32 d, u32 s); + u8 neg_byte(u8 s); + u16 neg_word(u16 s); + u32 neg_long(u32 s); + u8 not_byte(u8 s); + u16 not_word(u16 s); + u32 not_long(u32 s); + u8 rcl_byte(u8 d, u8 s); + u16 rcl_word(u16 d, u8 s); + u32 rcl_long(u32 d, u8 s); + u8 rcr_byte(u8 d, u8 s); + u16 rcr_word(u16 d, u8 s); + u32 rcr_long(u32 d, u8 s); + u8 rol_byte(u8 d, u8 s); + u16 rol_word(u16 d, u8 s); + u32 rol_long(u32 d, u8 s); + u8 ror_byte(u8 d, u8 s); + u16 ror_word(u16 d, u8 s); + u32 ror_long(u32 d, u8 s); + u8 shl_byte(u8 d, u8 s); + u16 shl_word(u16 d, u8 s); + u32 shl_long(u32 d, u8 s); + u8 shr_byte(u8 d, u8 s); + u16 shr_word(u16 d, u8 s); + u32 shr_long(u32 d, u8 s); + u8 sar_byte(u8 d, u8 s); + u16 sar_word(u16 d, u8 s); + u32 sar_long(u32 d, u8 s); + u16 shld_word(u16 d, u16 fill, u8 s); + u32 shld_long(u32 d, u32 fill, u8 s); + u16 shrd_word(u16 d, u16 fill, u8 s); + u32 shrd_long(u32 d, u32 fill, u8 s); + u8 sbb_byte(u8 d, u8 s); + u16 sbb_word(u16 d, u16 s); + u32 sbb_long(u32 d, u32 s); + u8 sub_byte(u8 d, u8 s); + u16 sub_word(u16 d, u16 s); + u32 sub_long(u32 d, u32 s); + void test_byte(u8 d, u8 s); + void test_word(u16 d, u16 s); + void test_long(u32 d, u32 s); + u8 xor_byte(u8 d, u8 s); + u16 xor_word(u16 d, u16 s); + u32 xor_long(u32 d, u32 s); + void imul_byte(u8 s); + void imul_word(u16 s); + void imul_long(u32 s); + void imul_long_direct(u32 * res_lo, u32 * res_hi, u32 d, u32 s); + void mul_byte(u8 s); + void mul_word(u16 s); + void mul_long(u32 s); + void idiv_byte(u8 s); + void idiv_word(u16 s); + void idiv_long(u32 s); + void div_byte(u8 s); + void div_word(u16 s); + void div_long(u32 s); + void ins(int size); + void outs(int size); + u16 mem_access_word(int addr); + void push_word(u16 w); + void push_long(u32 w); + u16 pop_word(void); + u32 pop_long(void); + void cpuid(void); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_PRIM_OPS_H */ +#endif /* __X86EMU_PRIM_OPS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h index 52cf8e41b..6bd061166 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h @@ -42,7 +42,7 @@ /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK -# pragma PACK +#pragma PACK #endif /* @@ -64,48 +64,48 @@ typedef struct { u32 e_reg; - } I32_reg_t; +} I32_reg_t; typedef struct { - u16 filler0, x_reg; - } I16_reg_t; + u16 filler0, x_reg; +} I16_reg_t; typedef struct { - u8 filler0, filler1, h_reg, l_reg; - } I8_reg_t; + u8 filler0, filler1, h_reg, l_reg; +} I8_reg_t; -#else /* !__BIG_ENDIAN__ */ +#else /* !__BIG_ENDIAN__ */ typedef struct { u32 e_reg; - } I32_reg_t; +} I32_reg_t; typedef struct { - u16 x_reg; - } I16_reg_t; + u16 x_reg; +} I16_reg_t; typedef struct { - u8 l_reg, h_reg; - } I8_reg_t; + u8 l_reg, h_reg; +} I8_reg_t; -#endif /* BIG_ENDIAN */ +#endif /* BIG_ENDIAN */ typedef union { - I32_reg_t I32_reg; - I16_reg_t I16_reg; - I8_reg_t I8_reg; - } i386_general_register; + I32_reg_t I32_reg; + I16_reg_t I16_reg; + I8_reg_t I8_reg; +} i386_general_register; struct i386_general_regs { - i386_general_register A, B, C, D; - }; + i386_general_register A, B, C, D; +}; typedef struct i386_general_regs Gen_reg_t; struct i386_special_regs { - i386_general_register SP, BP, SI, DI, IP; - u32 FLAGS; - }; + i386_general_register SP, BP, SI, DI, IP; + u32 FLAGS; +}; /* * Segment registers here represent the 16 bit quantities @@ -114,7 +114,7 @@ struct i386_special_regs { struct i386_segment_regs { u16 CS, DS, SS, ES, FS, GS; - }; +}; /* 8 bit registers */ #define R_AH gen.A.I8_reg.h_reg @@ -258,9 +258,9 @@ struct i386_segment_regs { #define INTR_HALTED 0x4 typedef struct { - struct i386_general_regs gen; - struct i386_special_regs spc; - struct i386_segment_regs seg; + struct i386_general_regs gen; + struct i386_special_regs spc; + struct i386_segment_regs seg; /* * MODE contains information on: * REPE prefix 2 bits repe,repne @@ -273,21 +273,21 @@ typedef struct { * Extern interrupt 1 bits * Halted 1 bits */ - u32 mode; - volatile int intr; /* mask of pending interrupts */ - int debug; + u32 mode; + volatile int intr; /* mask of pending interrupts */ + int debug; #ifdef DEBUG - int check; - u16 saved_ip; - u16 saved_cs; - int enc_pos; - int enc_str_pos; - char decode_buf[32]; /* encoded byte stream */ - char decoded_buf[256]; /* disassembled strings */ + int check; + u16 saved_ip; + u16 saved_cs; + int enc_pos; + int enc_str_pos; + char decode_buf[32]; /* encoded byte stream */ + char decoded_buf[256]; /* disassembled strings */ #endif - u8 intno; - u8 __pad[3]; - } X86EMU_regs; + u8 intno; + u8 __pad[3]; +} X86EMU_regs; /**************************************************************************** REMARKS: @@ -300,20 +300,20 @@ private - private data pointer x86 - X86 registers ****************************************************************************/ typedef struct { - unsigned long mem_base; - unsigned long mem_size; - void* private; - X86EMU_regs x86; - } X86EMU_sysEnv; + unsigned long mem_base; + unsigned long mem_size; + void *private; + X86EMU_regs x86; +} X86EMU_sysEnv; #ifdef END_PACK -# pragma END_PACK +#pragma END_PACK #endif /*----------------------------- Global Variables --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif /* Global emulator machine state. @@ -321,17 +321,16 @@ extern "C" { /* Use "C" linkage when in C++ mode */ * We keep it global to avoid pointer dereferences in the code for speed. */ -extern X86EMU_sysEnv _X86EMU_env; + extern X86EMU_sysEnv _X86EMU_env; #define M _X86EMU_env /*-------------------------- Function Prototypes --------------------------*/ /* Function to log information at runtime */ -void printk(const char *fmt, ...); + void printk(const char *fmt, ...); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_REGS_H */ +#endif /* __X86EMU_REGS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/types.h b/xorg-server/hw/xfree86/x86emu/x86emu/types.h index fa23800d0..5a6ef01f8 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/types.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/types.h @@ -36,7 +36,6 @@ * ****************************************************************************/ - #ifndef __X86EMU_TYPES_H #define __X86EMU_TYPES_H @@ -63,19 +62,19 @@ #include -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; -typedef unsigned int uint; -typedef int sint; +typedef unsigned int uint; +typedef int sint; typedef u16 X86EMU_pioAddr; -#endif /* __X86EMU_TYPES_H */ +#endif /* __X86EMU_TYPES_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h index 112ee366f..f11dc102f 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h @@ -38,7 +38,6 @@ * ****************************************************************************/ - #ifndef __X86EMU_X86EMUI_H #define __X86EMU_X86EMUI_H @@ -74,29 +73,28 @@ #include #include #include -#endif +#endif /*--------------------------- Inline Functions ----------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -extern u8 (X86APIP sys_rdb)(u32 addr); -extern u16 (X86APIP sys_rdw)(u32 addr); -extern u32 (X86APIP sys_rdl)(u32 addr); -extern void (X86APIP sys_wrb)(u32 addr,u8 val); -extern void (X86APIP sys_wrw)(u32 addr,u16 val); -extern void (X86APIP sys_wrl)(u32 addr,u32 val); + extern u8(X86APIP sys_rdb) (u32 addr); + extern u16(X86APIP sys_rdw) (u32 addr); + extern u32(X86APIP sys_rdl) (u32 addr); + extern void (X86APIP sys_wrb) (u32 addr, u8 val); + extern void (X86APIP sys_wrw) (u32 addr, u16 val); + extern void (X86APIP sys_wrl) (u32 addr, u32 val); -extern u8 (X86APIP sys_inb)(X86EMU_pioAddr addr); -extern u16 (X86APIP sys_inw)(X86EMU_pioAddr addr); -extern u32 (X86APIP sys_inl)(X86EMU_pioAddr addr); -extern void (X86APIP sys_outb)(X86EMU_pioAddr addr,u8 val); -extern void (X86APIP sys_outw)(X86EMU_pioAddr addr,u16 val); -extern void (X86APIP sys_outl)(X86EMU_pioAddr addr,u32 val); + extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr); + extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr); + extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr); + extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val); + extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val); + extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_X86EMUI_H */ +#endif /* __X86EMU_X86EMUI_H */ -- cgit v1.2.3