681 lines
21 KiB
Plaintext
681 lines
21 KiB
Plaintext
----------------------------------------------------------------------
|
|
Patch name: inlines
|
|
Author: Bryce Denney
|
|
Date: Fri Apr 6 12:54:05 EDT 2001
|
|
|
|
Detailed description:
|
|
Make it easier to fix inline syntax and link problems. This patch defines
|
|
two macros BX_C_INLINE and BX_CPP_INLINE, for C and C++ headers respectively.
|
|
We already had the ability to #define the inline keyword to whatever the
|
|
platform supports (even empty), and the configure would try to deduce the
|
|
correct value. But BX_C_INLINE and BX_CPP_INLINE should include any
|
|
"extern" or "static" keywords in addition to the "inline" keyword. The
|
|
default definitions are:
|
|
#define inline inline
|
|
#define BX_C_INLINE static inline
|
|
#define BX_CPP_INLINE inline
|
|
Hopefully some combination of these three will accomodate any compiler.
|
|
|
|
Apply patch to:
|
|
bochs 3-25-2000 snapshot, with portable1 and portable2 patches
|
|
Instructions:
|
|
To patch, go to main bochs directory.
|
|
Type "patch -p1 < THIS_PATCH_FILE".
|
|
----------------------------------------------------------------------
|
|
diff -cr clean-portable2/config.h.in inline-hell/config.h.in
|
|
*** clean-portable2/config.h.in Fri Apr 6 03:35:29 2001
|
|
--- inline-hell/config.h.in Fri Apr 6 12:50:36 2001
|
|
***************
|
|
*** 375,381 ****
|
|
--- 375,402 ----
|
|
|
|
#define HAVE_SIGACTION 1
|
|
|
|
+ // configure will change the definition of "inline" to the value
|
|
+ // that the C compiler allows. It tests the following keywords to
|
|
+ // see if any is permitted: inline, __inline__, __inline. If none
|
|
+ // is permitted, it defines inline to be empty.
|
|
#define inline inline
|
|
+
|
|
+ // inline functions in headers that are compiled with C compiler
|
|
+ // (e.g. fpu code) are declared with BX_C_INLINE macro. Note that
|
|
+ // the word "inline" itself may now be redefined by the above #define.
|
|
+ // Many compilers are known to work with "static inline". If the
|
|
+ // compiler can put the function inline, it does so and never creates
|
|
+ // a symbol for the function. If optimization is off, or inline is
|
|
+ // defined to be empty, the static keyword causes the function to create
|
|
+ // a symbol that's visible only to that .c file. Each .c file that
|
|
+ // includes the header will produde another local version of the
|
|
+ // BX_C_INLINE function (not ideal). However without "static" you can
|
|
+ // duplicate symbol problems which are even worse.
|
|
+ #define BX_C_INLINE static inline
|
|
+
|
|
+ // Use BX_CPP_INLINE for all C++ inline functions. Note that the
|
|
+ // word "inline" itself may now be redefined by the above #define.
|
|
+ #define BX_CPP_INLINE inline
|
|
|
|
#define BX_DEBUGGER 0
|
|
#define BX_DISASM 0
|
|
diff -cr clean-portable2/cpu/cpu.h inline-hell/cpu/cpu.h
|
|
*** clean-portable2/cpu/cpu.h Fri Apr 6 03:35:18 2001
|
|
--- inline-hell/cpu/cpu.h Fri Apr 6 12:50:36 2001
|
|
***************
|
|
*** 1308,1355 ****
|
|
unsigned opa, unsigned opb);
|
|
#endif
|
|
|
|
! BX_SMF inline void set_CF(Boolean val);
|
|
! BX_SMF inline void set_AF(Boolean val);
|
|
! BX_SMF inline void set_ZF(Boolean val);
|
|
! BX_SMF inline void set_SF(Boolean val);
|
|
! BX_SMF inline void set_OF(Boolean val);
|
|
! BX_SMF inline void set_PF(Boolean val);
|
|
! BX_SMF inline void set_PF_base(Bit8u val);
|
|
!
|
|
!
|
|
! BX_SMF inline void set_AX(Bit16u ax);
|
|
! BX_SMF inline void set_BX(Bit16u bx);
|
|
! BX_SMF inline void set_CX(Bit16u cx);
|
|
! BX_SMF inline void set_DX(Bit16u dx);
|
|
! BX_SMF inline void set_AL(Bit8u al);
|
|
! BX_SMF inline void set_AH(Bit8u ah);
|
|
! BX_SMF inline void set_BL(Bit8u bl);
|
|
! BX_SMF inline void set_BH(Bit8u bh);
|
|
! BX_SMF inline void set_CL(Bit8u cl);
|
|
! BX_SMF inline void set_CH(Bit8u ch);
|
|
! BX_SMF inline void set_DL(Bit8u dl);
|
|
! BX_SMF inline void set_DH(Bit8u dh);
|
|
!
|
|
! BX_SMF inline Bit8u get_AL(void);
|
|
! BX_SMF inline Bit8u get_AH(void);
|
|
! BX_SMF inline Bit8u get_BL(void);
|
|
! BX_SMF inline Bit8u get_BH(void);
|
|
! BX_SMF inline Bit8u get_CL(void);
|
|
! BX_SMF inline Bit8u get_CH(void);
|
|
! BX_SMF inline Bit8u get_DL(void);
|
|
! BX_SMF inline Bit8u get_DH(void);
|
|
!
|
|
! BX_SMF inline Bit16u get_AX(void);
|
|
! BX_SMF inline Bit16u get_BX(void);
|
|
! BX_SMF inline Bit16u get_CX(void);
|
|
! BX_SMF inline Bit16u get_DX(void);
|
|
|
|
#if BX_CPU_LEVEL >= 2
|
|
! BX_SMF inline Boolean real_mode(void);
|
|
#endif
|
|
#if BX_CPU_LEVEL >= 3
|
|
! BX_SMF inline Boolean protected_mode(void);
|
|
! BX_SMF inline Boolean v8086_mode(void);
|
|
#endif
|
|
};
|
|
|
|
--- 1308,1355 ----
|
|
unsigned opa, unsigned opb);
|
|
#endif
|
|
|
|
! BX_SMF BX_CPP_INLINE void set_CF(Boolean val);
|
|
! BX_SMF BX_CPP_INLINE void set_AF(Boolean val);
|
|
! BX_SMF BX_CPP_INLINE void set_ZF(Boolean val);
|
|
! BX_SMF BX_CPP_INLINE void set_SF(Boolean val);
|
|
! BX_SMF BX_CPP_INLINE void set_OF(Boolean val);
|
|
! BX_SMF BX_CPP_INLINE void set_PF(Boolean val);
|
|
! BX_SMF BX_CPP_INLINE void set_PF_base(Bit8u val);
|
|
!
|
|
!
|
|
! BX_SMF BX_CPP_INLINE void set_AX(Bit16u ax);
|
|
! BX_SMF BX_CPP_INLINE void set_BX(Bit16u bx);
|
|
! BX_SMF BX_CPP_INLINE void set_CX(Bit16u cx);
|
|
! BX_SMF BX_CPP_INLINE void set_DX(Bit16u dx);
|
|
! BX_SMF BX_CPP_INLINE void set_AL(Bit8u al);
|
|
! BX_SMF BX_CPP_INLINE void set_AH(Bit8u ah);
|
|
! BX_SMF BX_CPP_INLINE void set_BL(Bit8u bl);
|
|
! BX_SMF BX_CPP_INLINE void set_BH(Bit8u bh);
|
|
! BX_SMF BX_CPP_INLINE void set_CL(Bit8u cl);
|
|
! BX_SMF BX_CPP_INLINE void set_CH(Bit8u ch);
|
|
! BX_SMF BX_CPP_INLINE void set_DL(Bit8u dl);
|
|
! BX_SMF BX_CPP_INLINE void set_DH(Bit8u dh);
|
|
!
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_AL(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_AH(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_BL(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_BH(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_CL(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_CH(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_DL(void);
|
|
! BX_SMF BX_CPP_INLINE Bit8u get_DH(void);
|
|
!
|
|
! BX_SMF BX_CPP_INLINE Bit16u get_AX(void);
|
|
! BX_SMF BX_CPP_INLINE Bit16u get_BX(void);
|
|
! BX_SMF BX_CPP_INLINE Bit16u get_CX(void);
|
|
! BX_SMF BX_CPP_INLINE Bit16u get_DX(void);
|
|
|
|
#if BX_CPU_LEVEL >= 2
|
|
! BX_SMF BX_CPP_INLINE Boolean real_mode(void);
|
|
#endif
|
|
#if BX_CPU_LEVEL >= 3
|
|
! BX_SMF BX_CPP_INLINE Boolean protected_mode(void);
|
|
! BX_SMF BX_CPP_INLINE Boolean v8086_mode(void);
|
|
#endif
|
|
};
|
|
|
|
***************
|
|
*** 1365,1469 ****
|
|
extern BX_CPU_C BX_CPU;
|
|
|
|
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_AX(Bit16u ax) { AX = ax; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_BX(Bit16u bx) { BX = bx; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_CX(Bit16u cx) { CX = cx; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_DX(Bit16u dx) { DX = dx; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_AL(Bit8u al) { AL = al; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_AH(Bit8u ah) { AH = ah; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_BL(Bit8u bl) { BL = bl; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_BH(Bit8u bh) { BH = bh; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_CL(Bit8u cl) { CL = cl; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_CH(Bit8u ch) { CH = ch; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_DL(Bit8u dl) { DL = dl; };
|
|
! BX_SMF inline void BX_CPU_C_PREFIX set_DH(Bit8u dh) { DH = dh; };
|
|
!
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_AL(void) { return(AL); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_AH(void) { return(AH); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_BL(void) { return(BL); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_BH(void) { return(BH); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_CL(void) { return(CL); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_CH(void) { return(CH); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_DL(void) { return(DL); };
|
|
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_DH(void) { return(DH); };
|
|
!
|
|
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_AX(void) { return(AX); };
|
|
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_BX(void) { return(BX); };
|
|
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_CX(void) { return(CX); };
|
|
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_DX(void) { return(DX); };
|
|
|
|
|
|
#if BX_CPU_LEVEL >= 2
|
|
! inline Boolean BX_CPU_C::real_mode(void) { return( !BX_CPU_THIS_PTR cr0.pe ); };
|
|
#endif
|
|
|
|
#if BX_CPU_LEVEL == 2
|
|
! inline Boolean BX_CPU_C::protected_mode(void) { return( BX_CPU_THIS_PTR cr0.pe ); };
|
|
#endif
|
|
|
|
|
|
#if BX_CPU_LEVEL >= 3
|
|
# if BX_SUPPORT_V8086_MODE
|
|
! inline Boolean
|
|
BX_CPU_C::v8086_mode(void) {
|
|
return(BX_CPU_THIS_PTR eflags.vm);
|
|
}
|
|
|
|
! inline Boolean
|
|
BX_CPU_C::protected_mode(void) {
|
|
return(BX_CPU_THIS_PTR cr0.pe && !BX_CPU_THIS_PTR eflags.vm);
|
|
}
|
|
# else
|
|
! inline Boolean
|
|
BX_CPU_C::v8086_mode(void) {
|
|
return(0);
|
|
}
|
|
|
|
! inline Boolean
|
|
BX_CPU_C::protected_mode(void) {
|
|
return(BX_CPU_THIS_PTR cr0.pe);
|
|
}
|
|
# endif
|
|
#endif
|
|
|
|
! inline void
|
|
BX_CPU_C::set_CF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xfffff0;
|
|
BX_CPU_THIS_PTR eflags.cf = val;
|
|
}
|
|
|
|
! inline void
|
|
BX_CPU_C::set_AF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xfff0ff;
|
|
BX_CPU_THIS_PTR eflags.af = val;
|
|
}
|
|
|
|
! inline void
|
|
BX_CPU_C::set_ZF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xff0fff;
|
|
BX_CPU_THIS_PTR eflags.zf = val;
|
|
}
|
|
|
|
! inline void
|
|
BX_CPU_C::set_SF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xf0ffff;
|
|
BX_CPU_THIS_PTR eflags.sf = val;
|
|
}
|
|
|
|
|
|
! inline void
|
|
BX_CPU_C::set_OF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0x0fffff;
|
|
BX_CPU_THIS_PTR eflags.of = val;
|
|
}
|
|
|
|
! inline void
|
|
BX_CPU_C::set_PF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xffff0f;
|
|
BX_CPU_THIS_PTR lf_pf = val;
|
|
}
|
|
|
|
! inline void
|
|
BX_CPU_C::set_PF_base(Bit8u val) {
|
|
BX_CPU_THIS_PTR eflags.pf_byte = val;
|
|
BX_CPU_THIS_PTR lf_flags_status = (BX_CPU_THIS_PTR lf_flags_status & 0xffff0f) | BX_LF_MASK_P;
|
|
--- 1365,1469 ----
|
|
extern BX_CPU_C BX_CPU;
|
|
|
|
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_AX(Bit16u ax) { AX = ax; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_BX(Bit16u bx) { BX = bx; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_CX(Bit16u cx) { CX = cx; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_DX(Bit16u dx) { DX = dx; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_AL(Bit8u al) { AL = al; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_AH(Bit8u ah) { AH = ah; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_BL(Bit8u bl) { BL = bl; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_BH(Bit8u bh) { BH = bh; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_CL(Bit8u cl) { CL = cl; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_CH(Bit8u ch) { CH = ch; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_DL(Bit8u dl) { DL = dl; };
|
|
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_DH(Bit8u dh) { DH = dh; };
|
|
!
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_AL(void) { return(AL); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_AH(void) { return(AH); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_BL(void) { return(BL); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_BH(void) { return(BH); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_CL(void) { return(CL); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_CH(void) { return(CH); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_DL(void) { return(DL); };
|
|
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_DH(void) { return(DH); };
|
|
!
|
|
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_AX(void) { return(AX); };
|
|
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_BX(void) { return(BX); };
|
|
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_CX(void) { return(CX); };
|
|
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_DX(void) { return(DX); };
|
|
|
|
|
|
#if BX_CPU_LEVEL >= 2
|
|
! BX_CPP_INLINE Boolean BX_CPU_C::real_mode(void) { return( !BX_CPU_THIS_PTR cr0.pe ); };
|
|
#endif
|
|
|
|
#if BX_CPU_LEVEL == 2
|
|
! BX_CPP_INLINE Boolean BX_CPU_C::protected_mode(void) { return( BX_CPU_THIS_PTR cr0.pe ); };
|
|
#endif
|
|
|
|
|
|
#if BX_CPU_LEVEL >= 3
|
|
# if BX_SUPPORT_V8086_MODE
|
|
! BX_CPP_INLINE Boolean
|
|
BX_CPU_C::v8086_mode(void) {
|
|
return(BX_CPU_THIS_PTR eflags.vm);
|
|
}
|
|
|
|
! BX_CPP_INLINE Boolean
|
|
BX_CPU_C::protected_mode(void) {
|
|
return(BX_CPU_THIS_PTR cr0.pe && !BX_CPU_THIS_PTR eflags.vm);
|
|
}
|
|
# else
|
|
! BX_CPP_INLINE Boolean
|
|
BX_CPU_C::v8086_mode(void) {
|
|
return(0);
|
|
}
|
|
|
|
! BX_CPP_INLINE Boolean
|
|
BX_CPU_C::protected_mode(void) {
|
|
return(BX_CPU_THIS_PTR cr0.pe);
|
|
}
|
|
# endif
|
|
#endif
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_CF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xfffff0;
|
|
BX_CPU_THIS_PTR eflags.cf = val;
|
|
}
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_AF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xfff0ff;
|
|
BX_CPU_THIS_PTR eflags.af = val;
|
|
}
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_ZF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xff0fff;
|
|
BX_CPU_THIS_PTR eflags.zf = val;
|
|
}
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_SF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xf0ffff;
|
|
BX_CPU_THIS_PTR eflags.sf = val;
|
|
}
|
|
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_OF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0x0fffff;
|
|
BX_CPU_THIS_PTR eflags.of = val;
|
|
}
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_PF(Boolean val) {
|
|
BX_CPU_THIS_PTR lf_flags_status &= 0xffff0f;
|
|
BX_CPU_THIS_PTR lf_pf = val;
|
|
}
|
|
|
|
! BX_CPP_INLINE void
|
|
BX_CPU_C::set_PF_base(Bit8u val) {
|
|
BX_CPU_THIS_PTR eflags.pf_byte = val;
|
|
BX_CPU_THIS_PTR lf_flags_status = (BX_CPU_THIS_PTR lf_flags_status & 0xffff0f) | BX_LF_MASK_P;
|
|
diff -cr clean-portable2/disasm/disasm.h inline-hell/disasm/disasm.h
|
|
*** clean-portable2/disasm/disasm.h Fri Apr 6 03:35:18 2001
|
|
--- inline-hell/disasm/disasm.h Fri Apr 6 12:50:38 2001
|
|
***************
|
|
*** 69,82 ****
|
|
char *index_name16[8];
|
|
char *index_name32[8];
|
|
|
|
! inline Bit8u fetch_byte(void) {
|
|
return(*instruction++);
|
|
};
|
|
! inline Bit8u peek_byte(void) {
|
|
return(*instruction);
|
|
};
|
|
|
|
! inline Bit16u fetch_word(void) {
|
|
Bit16u ret16;
|
|
Bit8u b1, b0;
|
|
|
|
--- 69,82 ----
|
|
char *index_name16[8];
|
|
char *index_name32[8];
|
|
|
|
! BX_CPP_INLINE Bit8u fetch_byte(void) {
|
|
return(*instruction++);
|
|
};
|
|
! BX_CPP_INLINE Bit8u peek_byte(void) {
|
|
return(*instruction);
|
|
};
|
|
|
|
! BX_CPP_INLINE Bit16u fetch_word(void) {
|
|
Bit16u ret16;
|
|
Bit8u b1, b0;
|
|
|
|
***************
|
|
*** 86,92 ****
|
|
return(ret16);
|
|
};
|
|
|
|
! inline Bit32u fetch_dword(void) {
|
|
Bit32u ret32;
|
|
Bit8u b3, b2, b1, b0;
|
|
|
|
--- 86,92 ----
|
|
return(ret16);
|
|
};
|
|
|
|
! BX_CPP_INLINE Bit32u fetch_dword(void) {
|
|
Bit32u ret32;
|
|
Bit8u b3, b2, b1, b0;
|
|
|
|
diff -cr clean-portable2/fpu/fpu_emu.h inline-hell/fpu/fpu_emu.h
|
|
*** clean-portable2/fpu/fpu_emu.h Fri Apr 6 03:35:27 2001
|
|
--- inline-hell/fpu/fpu_emu.h Fri Apr 6 12:50:38 2001
|
|
***************
|
|
*** 198,204 ****
|
|
#define significand(x) ( ((u64 *)&((x)->sigl))[0] )
|
|
#endif
|
|
|
|
! static inline void reg_copy(FPU_REG const *x, FPU_REG *y)
|
|
{
|
|
y->exp = x->exp;
|
|
significand(y) = significand(x);
|
|
--- 198,205 ----
|
|
#define significand(x) ( ((u64 *)&((x)->sigl))[0] )
|
|
#endif
|
|
|
|
! BX_C_INLINE
|
|
! void reg_copy(FPU_REG const *x, FPU_REG *y)
|
|
{
|
|
y->exp = x->exp;
|
|
significand(y) = significand(x);
|
|
diff -cr clean-portable2/fpu/poly.h inline-hell/fpu/poly.h
|
|
*** clean-portable2/fpu/poly.h Fri Apr 6 03:35:27 2001
|
|
--- inline-hell/fpu/poly.h Fri Apr 6 12:50:38 2001
|
|
***************
|
|
*** 74,87 ****
|
|
*/
|
|
|
|
/* Multiply two fixed-point 32 bit numbers, producing a 32 bit result.
|
|
! The answer is the ms word of the product.
|
|
!
|
|
! bbd: this and all other inline functions in this file used to be
|
|
! declared extern inline. But if the compiler does not inline the function,
|
|
! each .c declares its own external symbol for the function, leading to
|
|
! symbol conflicts. static inline seems to be safe in either case.
|
|
! */
|
|
! static inline u32 mul_32_32(const u32 arg1, const u32 arg2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
return (((u64)arg1) * arg2) >> 32;
|
|
--- 74,82 ----
|
|
*/
|
|
|
|
/* Multiply two fixed-point 32 bit numbers, producing a 32 bit result.
|
|
! The answer is the ms word of the product. */
|
|
! BX_C_INLINE
|
|
! u32 mul_32_32(const u32 arg1, const u32 arg2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
return (((u64)arg1) * arg2) >> 32;
|
|
***************
|
|
*** 100,106 ****
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
|
|
! static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
dest->lsw += x2->lsw;
|
|
--- 95,102 ----
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
|
|
! BX_C_INLINE
|
|
! void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
dest->lsw += x2->lsw;
|
|
***************
|
|
*** 128,134 ****
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, adjust exp if overflow occurs. */
|
|
! static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, s32 *exp)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
int ovfl = 0;
|
|
--- 124,131 ----
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, adjust exp if overflow occurs. */
|
|
! BX_C_INLINE
|
|
! void add_two_Xsig(Xsig *dest, const Xsig *x2, s32 *exp)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
int ovfl = 0;
|
|
***************
|
|
*** 188,194 ****
|
|
|
|
|
|
/* Negate the 12 byte Xsig */
|
|
! static inline void negate_Xsig(Xsig *x)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
x->lsw = ~x->lsw;
|
|
--- 185,192 ----
|
|
|
|
|
|
/* Negate the 12 byte Xsig */
|
|
! BX_C_INLINE
|
|
! void negate_Xsig(Xsig *x)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
x->lsw = ~x->lsw;
|
|
diff -cr clean-portable2/gui/macintosh.cc inline-hell/gui/macintosh.cc
|
|
*** clean-portable2/gui/macintosh.cc Fri Apr 6 03:35:18 2001
|
|
--- inline-hell/gui/macintosh.cc Fri Apr 6 12:50:39 2001
|
|
***************
|
|
*** 119,128 ****
|
|
} bx_tool_pixmap[BX_MAX_PIXMAPS];
|
|
|
|
// Event handlers
|
|
! inline void HandleKey(EventRecord *event, Bit32u keyState);
|
|
! inline void HandleToolClick(Point where);
|
|
void HandleMenuChoice(long menuChoice);
|
|
! inline void HandleClick(EventRecord *event);
|
|
|
|
// Update routines
|
|
void UpdateWindow(WindowPtr window);
|
|
--- 119,128 ----
|
|
} bx_tool_pixmap[BX_MAX_PIXMAPS];
|
|
|
|
// Event handlers
|
|
! BX_CPP_INLINE void HandleKey(EventRecord *event, Bit32u keyState);
|
|
! BX_CPP_INLINE void HandleToolClick(Point where);
|
|
void HandleMenuChoice(long menuChoice);
|
|
! BX_CPP_INLINE void HandleClick(EventRecord *event);
|
|
|
|
// Update routines
|
|
void UpdateWindow(WindowPtr window);
|
|
***************
|
|
*** 363,369 ****
|
|
//
|
|
// Handles keyboard-related events.
|
|
|
|
! inline void HandleKey(EventRecord *event, Bit32u keyState)
|
|
{
|
|
int key;
|
|
UInt32 trans;
|
|
--- 363,369 ----
|
|
//
|
|
// Handles keyboard-related events.
|
|
|
|
! BX_CPP_INLINE void HandleKey(EventRecord *event, Bit32u keyState)
|
|
{
|
|
int key;
|
|
UInt32 trans;
|
|
***************
|
|
*** 412,418 ****
|
|
//
|
|
// Handles mouse clicks in the Bochs tool window
|
|
|
|
! inline void HandleToolClick(Point where)
|
|
{
|
|
unsigned i;
|
|
int xorigin;
|
|
--- 412,418 ----
|
|
//
|
|
// Handles mouse clicks in the Bochs tool window
|
|
|
|
! BX_CPP_INLINE void HandleToolClick(Point where)
|
|
{
|
|
unsigned i;
|
|
int xorigin;
|
|
***************
|
|
*** 433,439 ****
|
|
thisGUI->show_headerbar();
|
|
}
|
|
|
|
! inline void ResetPointer(void)
|
|
{
|
|
#if 0
|
|
CursorDevice *theMouse;
|
|
--- 433,439 ----
|
|
thisGUI->show_headerbar();
|
|
}
|
|
|
|
! BX_CPP_INLINE void ResetPointer(void)
|
|
{
|
|
#if 0
|
|
CursorDevice *theMouse;
|
|
***************
|
|
*** 567,573 ****
|
|
HiliteMenu(0);
|
|
}
|
|
|
|
! inline void HandleClick(EventRecord *event)
|
|
{
|
|
short part;
|
|
WindowPtr whichWindow;
|
|
--- 567,573 ----
|
|
HiliteMenu(0);
|
|
}
|
|
|
|
! BX_CPP_INLINE void HandleClick(EventRecord *event)
|
|
{
|
|
short part;
|
|
WindowPtr whichWindow;
|
|
diff -cr clean-portable2/iodev/sb16.h inline-hell/iodev/sb16.h
|
|
*** clean-portable2/iodev/sb16.h Fri Apr 6 03:35:19 2001
|
|
--- inline-hell/iodev/sb16.h Fri Apr 6 12:50:39 2001
|
|
***************
|
|
*** 42,48 ****
|
|
#endif
|
|
|
|
// If the buffer commands are to be inlined:
|
|
! #define BX_SB16_BUFINL inline
|
|
|
|
// maximum number of patch translations
|
|
#define BX_SB16_PATCHTABLESIZE 1024
|
|
--- 42,49 ----
|
|
#endif
|
|
|
|
// If the buffer commands are to be inlined:
|
|
! #define BX_SB16_BUFINL BX_CPP_INLINE
|
|
! // BX_CPP_INLINE is defined to the inline keyword for the C++ compiler.
|
|
|
|
// maximum number of patch translations
|
|
#define BX_SB16_PATCHTABLESIZE 1024
|
|
diff -cr clean-portable2/pc_system.h inline-hell/pc_system.h
|
|
*** clean-portable2/pc_system.h Fri Apr 6 03:35:18 2001
|
|
--- inline-hell/pc_system.h Fri Apr 6 12:50:36 2001
|
|
***************
|
|
*** 109,115 ****
|
|
void activate_timer( unsigned timer_index, Bit32u useconds,
|
|
Boolean continuous );
|
|
void deactivate_timer( unsigned timer_index );
|
|
! static inline void tick1(void) {
|
|
#if BX_SHOW_IPS
|
|
{
|
|
extern unsigned long ips_count;
|
|
--- 109,115 ----
|
|
void activate_timer( unsigned timer_index, Bit32u useconds,
|
|
Boolean continuous );
|
|
void deactivate_timer( unsigned timer_index );
|
|
! static BX_CPP_INLINE void tick1(void) {
|
|
#if BX_SHOW_IPS
|
|
{
|
|
extern unsigned long ips_count;
|
|
***************
|
|
*** 120,126 ****
|
|
bx_pc_system.timer_handler();
|
|
}
|
|
}
|
|
! static inline void tickn(Bit64u n) {
|
|
#if BX_SHOW_IPS
|
|
{
|
|
extern unsigned long ips_count;
|
|
--- 120,126 ----
|
|
bx_pc_system.timer_handler();
|
|
}
|
|
}
|
|
! static BX_CPP_INLINE void tickn(Bit64u n) {
|
|
#if BX_SHOW_IPS
|
|
{
|
|
extern unsigned long ips_count;
|