summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmuHS <almuhs@github.com>2019-05-20 23:51:37 +0200
committerAlmuHS <almuhs@github.com>2019-05-20 23:51:37 +0200
commit182f0c9e89b623dd8f93ea5de60d1c93c7987090 (patch)
tree8a6042197340b5b27cfba53856450cd3de2b9e8f
parent4d2c80d3350dfbd13a5f70191d254cdecdfc5235 (diff)
fix: optimize cr0 initialize
-rw-r--r--i386/i386/cpuboot.S6
1 files changed, 1 insertions, 5 deletions
diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S
index beb3c78b..e5b7d543 100644
--- a/i386/i386/cpuboot.S
+++ b/i386/i386/cpuboot.S
@@ -128,11 +128,7 @@ nopae:
//set_cr0(get_cr0() & ~(CR0_CD | CR0_NW));
movl %cr0, %eax
- movl $0, %edx
- movl $CR0_CD, %edx
- orl $CR0_NW, %edx
- not %edx
- andl %edx, %eax
+ andl $(~(CR0_CD | CR0_NW)), %eax
movl %eax, %cr0