Index: kernel/arch/amd64/src/asm.S
===================================================================
--- kernel/arch/amd64/src/asm.S	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
+++ kernel/arch/amd64/src/asm.S	(revision a66e299372bdb43d55e8f9e08081d47accc2dbdf)
@@ -95,5 +95,5 @@
 memcpy_from_uspace_failover_address:
 memcpy_to_uspace_failover_address:
-	xorq %rax, %rax         /* return 0, failure */
+	xorl %eax, %eax         /* return 0, failure */
 	ret
 
@@ -143,5 +143,5 @@
 
 set_efer_flag:
-	movq $0xc0000080, %rcx
+	movl $0xc0000080, %ecx
 	rdmsr
 	btsl %edi, %eax
@@ -150,5 +150,5 @@
 
 read_efer_flag:
-	movq $0xc0000080, %rcx
+	movl $0xc0000080, %ecx
 	rdmsr
 	ret
@@ -243,5 +243,5 @@
 	 * Stop stack traces here if we came from userspace.
 	 */
-	xorq %rdx, %rdx
+	xorl %edx, %edx
 	cmpq $(GDT_SELECTOR(KTEXT_DES)), ISTATE_OFFSET_CS(%rsp)
 	cmovnzq %rdx, %rbp
@@ -425,5 +425,5 @@
 	movq %rdi, %rsi
 	movq $(PA2KA(0xb8000)), %rdi  /* base of EGA text mode memory */
-	xorq %rax, %rax
+	xorl %eax, %eax
 	
 	/* Read bits 8 - 15 of the cursor address */
@@ -505,10 +505,10 @@
 		movq $(PA2KA(0xb80a0)), %rsi
 		movq $(PA2KA(0xb8000)), %rdi
-		movq $480, %rcx
+		movl $480, %ecx
 		rep movsq
 		
 		/* Clear the 24th row */
-		xorq %rax, %rax
-		movq $20, %rcx
+		xorl %eax, %eax
+		movl $20, %ecx
 		rep stosq
 		
Index: kernel/arch/amd64/src/boot/boot.S
===================================================================
--- kernel/arch/amd64/src/boot/boot.S	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
+++ kernel/arch/amd64/src/boot/boot.S	(revision a66e299372bdb43d55e8f9e08081d47accc2dbdf)
@@ -516,10 +516,10 @@
 		movq $(PA2KA(0xb80a0)), %rsi
 		movq $(PA2KA(0xb8000)), %rdi
-		movq $480, %rcx
+		movl $480, %ecx
 		rep movsq
 		
 		/* Clear the 24th row */
-		xorq %rax, %rax
-		movq $20, %rcx
+		xorl %eax, %eax
+		movl $20, %ecx
 		rep stosq
 		
Index: kernel/arch/amd64/src/context.S
===================================================================
--- kernel/arch/amd64/src/context.S	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
+++ kernel/arch/amd64/src/context.S	(revision a66e299372bdb43d55e8f9e08081d47accc2dbdf)
@@ -45,6 +45,6 @@
 	CONTEXT_SAVE_ARCH_CORE %rdi %rdx
 	
-	xorq %rax, %rax       # context_save returns 1
-	incq %rax
+	xorl %eax, %eax       # context_save returns 1
+	incl %eax
 	ret
 
@@ -60,4 +60,4 @@
 	movq %rdx, (%rsp)
 	
-	xorq %rax, %rax       # context_restore returns 0
+	xorl %eax, %eax       # context_restore returns 0
 	ret
