mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 05:25:11 +00:00
target-i386: Fix signedness of MSR_IA32_APICBASE_BASE
Existing definition triggers the following when using clang -fsanitize=undefined: hw/intc/apic_common.c:314:55: runtime error: left shift of 1048575 by 12 places cannot be represented in type 'int' Fix it so we won't try to shift a 1 to the sign bit of a signed integer. Backports commit 458cf469f4a1cb520b07092f5537c5a6d2389d23 from qemu
This commit is contained in:
parent
ed58b3afac
commit
79df79434d
|
@ -304,7 +304,7 @@
|
|||
#define MSR_IA32_APICBASE 0x1b
|
||||
#define MSR_IA32_APICBASE_BSP (1<<8)
|
||||
#define MSR_IA32_APICBASE_ENABLE (1<<11)
|
||||
#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
|
||||
#define MSR_IA32_APICBASE_BASE (0xfffffU<<12)
|
||||
#define MSR_IA32_FEATURE_CONTROL 0x0000003a
|
||||
#define MSR_TSC_ADJUST 0x0000003b
|
||||
#define MSR_IA32_TSCDEADLINE 0x6e0
|
||||
|
|
Loading…
Reference in a new issue