Commit 0b22a2c
committed
fix: use #else instead of #endif for x86 guards in msr(), kvm_interception(), and breakpoint()
The previous pattern (#if (!x86) return false; #endif) inserts an early
return but the compiler still compiles the code below. MSVC on ARM64
fails because x86-specific intrinsics (__readmsr, __stosb, __movsb) and
x86 debug registers (Dr0, Dr7) don't exist on that platform.
Changed all three functions to use #if (!x86) return false; #else ... #endif
so the x86-specific code is completely excluded from compilation on non-x86
targets.1 parent 97f75ae commit 0b22a2c
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11797 | 11797 | | |
11798 | 11798 | | |
11799 | 11799 | | |
11800 | | - | |
| 11800 | + | |
11801 | 11801 | | |
11802 | 11802 | | |
11803 | 11803 | | |
| |||
11849 | 11849 | | |
11850 | 11850 | | |
11851 | 11851 | | |
| 11852 | + | |
11852 | 11853 | | |
11853 | 11854 | | |
11854 | 11855 | | |
| |||
11861 | 11862 | | |
11862 | 11863 | | |
11863 | 11864 | | |
11864 | | - | |
| 11865 | + | |
11865 | 11866 | | |
11866 | 11867 | | |
11867 | 11868 | | |
| |||
11947 | 11948 | | |
11948 | 11949 | | |
11949 | 11950 | | |
| 11951 | + | |
11950 | 11952 | | |
11951 | 11953 | | |
11952 | 11954 | | |
| |||
11958 | 11960 | | |
11959 | 11961 | | |
11960 | 11962 | | |
11961 | | - | |
| 11963 | + | |
11962 | 11964 | | |
11963 | 11965 | | |
11964 | 11966 | | |
| |||
12072 | 12074 | | |
12073 | 12075 | | |
12074 | 12076 | | |
| 12077 | + | |
12075 | 12078 | | |
12076 | 12079 | | |
12077 | 12080 | | |
| |||
0 commit comments