Index: kernel/arch/amd64/src/asm.S
===================================================================
--- kernel/arch/amd64/src/asm.S	(revision c75698b941dcd25fb9a093edcff36a8e3bf8e2e6)
+++ kernel/arch/amd64/src/asm.S	(revision e80329d664f5d49f31f3da70a215121f490db79d)
@@ -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 c75698b941dcd25fb9a093edcff36a8e3bf8e2e6)
+++ kernel/arch/amd64/src/boot/boot.S	(revision e80329d664f5d49f31f3da70a215121f490db79d)
@@ -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 c75698b941dcd25fb9a093edcff36a8e3bf8e2e6)
+++ kernel/arch/amd64/src/context.S	(revision e80329d664f5d49f31f3da70a215121f490db79d)
@@ -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
Index: uspace/lib/c/arch/amd64/src/fibril.S
===================================================================
--- uspace/lib/c/arch/amd64/src/fibril.S	(revision c75698b941dcd25fb9a093edcff36a8e3bf8e2e6)
+++ uspace/lib/c/arch/amd64/src/fibril.S	(revision e80329d664f5d49f31f3da70a215121f490db79d)
@@ -49,6 +49,6 @@
 	movq %rax, OFFSET_TLS(%rdi)
 		
-	xorq %rax,%rax		# context_save returns 1
-	incq %rax
+	xorl %eax, %eax		# context_save returns 1
+	incl %eax
 	ret
 
@@ -67,7 +67,7 @@
 	# Set thread local storage
 	movq OFFSET_TLS(%rdi), %rdi   # Set arg1 to TLS addr
-	movq $1, %rax		# SYS_TLS_SET
+	movl $1, %eax		# SYS_TLS_SET
 	syscall
 
-	xorq %rax,%rax		# context_restore returns 0
+	xorl %eax, %eax		# context_restore returns 0
 	ret
