From 263dc8093d7eeece36160515b3a4f76a95352050 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 8 Dec 2020 16:00:57 +0100 Subject: pc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate() On AMD64, CR0/CR4 are 64-bit registers, with the upper half reserved. So use uintptr type to store the register values to get 32 bit on 386 and 64 bit on AMD64. --- sys/src/9/pc/mtrr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/9/pc/mtrr.c b/sys/src/9/pc/mtrr.c index 7adb13a64..a2dd475b0 100644 --- a/sys/src/9/pc/mtrr.c +++ b/sys/src/9/pc/mtrr.c @@ -354,7 +354,7 @@ enum { static void putstate(State *s) { - ulong cr0, cr4; + uintptr cr0, cr4; int i, x; x = splhi(); -- cgit v1.2.3