change a bit more defines to const with type

This commit is contained in:
Stanislav Shwartsman 2019-12-26 16:48:33 +00:00
parent 955a466df0
commit ff167d0f65
4 changed files with 10 additions and 8 deletions

View File

@ -30,7 +30,7 @@
// 3-byte opcodes
#define CRC32_POLYNOMIAL BX_CONST64(0x11edc6f41)
const Bit64u CRC32_POLYNOMIAL = BX_CONST64(0x11edc6f41);
// primitives for CRC32 usage
BX_CPP_INLINE Bit8u BitReflect8(Bit8u val8)

View File

@ -382,7 +382,9 @@ void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_RqDq(bxInstruction_c *i)
}
#endif // #if BX_SUPPORT_X86_64
#define BX_SVM_CR_WRITE_MASK (BX_CONST64(1) << 63)
#if BX_SUPPORT_SVM
const Bit64u BX_SVM_CR_WRITE_MASK = (BX_CONST64(1) << 63);
#endif
void BX_CPP_AttrRegparmN(1) BX_CPU_C::MOV_CR0Rd(bxInstruction_c *i)
{

View File

@ -971,8 +971,8 @@ void BX_CPU_C::exception(unsigned vector, Bit16u error_code)
if (vector == BX_DB_EXCEPTION) {
// Commit debug events to DR6: preserve DR5.BS and DR6.BD values,
// only software can clear them
BX_CPU_THIS_PTR dr6.val32 = (BX_CPU_THIS_PTR dr6.val32 & 0xffff6ff0) |
(BX_CPU_THIS_PTR debug_trap & 0x0000e00f);
BX_CPU_THIS_PTR dr6.val32 = (BX_CPU_THIS_PTR dr6.val32 & 0xffff6ff0) |
(BX_CPU_THIS_PTR debug_trap & 0x0000e00f);
// clear GD flag in the DR7 prior entering debug exception handler
BX_CPU_THIS_PTR dr7.set_GD(0);

View File

@ -311,10 +311,10 @@ void BX_CPP_AttrRegparmN(2) BX_CPU_C::VMexit_TaskSwitch(Bit16u tss_selector, uns
VMexit(VMX_VMEXIT_TASK_SWITCH, tss_selector | (source << 30));
}
#define BX_VMX_LO_MSR_START 0x00000000
#define BX_VMX_LO_MSR_END 0x00001FFF
#define BX_VMX_HI_MSR_START 0xC0000000
#define BX_VMX_HI_MSR_END 0xC0001FFF
const Bit32u BX_VMX_LO_MSR_START = 0x00000000;
const Bit32u BX_VMX_LO_MSR_END = 0x00001FFF;
const Bit32u BX_VMX_HI_MSR_START = 0xC0000000;
const Bit32u BX_VMX_HI_MSR_END = 0xC0001FFF;
void BX_CPP_AttrRegparmN(2) BX_CPU_C::VMexit_MSR(unsigned op, Bit32u msr)
{