Index: uspace/lib/libc/arch/sparc64/include/context_offset.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/context_offset.h	(revision 776f2e6f3f2763bf655dd3937028c5934c7785c9)
+++ 	(revision )
@@ -1,21 +1,0 @@
-/* This file is automatically generated by gencontext.c. */
-/* struct context */
-#define OFFSET_SP       0x0
-#define OFFSET_PC       0x8
-#define OFFSET_I0       0x10
-#define OFFSET_I1       0x18
-#define OFFSET_I2       0x20
-#define OFFSET_I3       0x28
-#define OFFSET_I4       0x30
-#define OFFSET_I5       0x38
-#define OFFSET_FP       0x40
-#define OFFSET_I7       0x48
-#define OFFSET_L0       0x50
-#define OFFSET_L1       0x58
-#define OFFSET_L2       0x60
-#define OFFSET_L3       0x68
-#define OFFSET_L4       0x70
-#define OFFSET_L5       0x78
-#define OFFSET_L6       0x80
-#define OFFSET_L7       0x88
-#define OFFSET_TP	0x90
Index: uspace/lib/libc/arch/sparc64/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/sparc64/src/fibril.S	(revision 776f2e6f3f2763bf655dd3937028c5934c7785c9)
+++ uspace/lib/libc/arch/sparc64/src/fibril.S	(revision 34f62f8e9b560136ad11f9d0048bab607fe59aeb)
@@ -27,5 +27,5 @@
 #
 
-#include <libarch/context_offset.h>
+#include <kernel/arch/context_offset.h>
 
 .text   
@@ -34,50 +34,6 @@
 .global context_restore
 
-.macro CONTEXT_STORE r
-	stx %sp, [\r + OFFSET_SP]
-	stx %o7, [\r + OFFSET_PC]
-	stx %i0, [\r + OFFSET_I0]
-	stx %i1, [\r + OFFSET_I1]
-	stx %i2, [\r + OFFSET_I2]
-	stx %i3, [\r + OFFSET_I3]
-	stx %i4, [\r + OFFSET_I4]
-	stx %i5, [\r + OFFSET_I5]
-	stx %fp, [\r + OFFSET_FP]
-	stx %i7, [\r + OFFSET_I7]
-	stx %l0, [\r + OFFSET_L0]
-	stx %l1, [\r + OFFSET_L1]
-	stx %l2, [\r + OFFSET_L2]
-	stx %l3, [\r + OFFSET_L3]
-	stx %l4, [\r + OFFSET_L4]
-	stx %l5, [\r + OFFSET_L5]
-	stx %l6, [\r + OFFSET_L6]
-	stx %l7, [\r + OFFSET_L7]
-	stx %g7, [\r + OFFSET_TP]
-.endm
-
-.macro CONTEXT_LOAD r
-	ldx [\r + OFFSET_SP], %sp
-	ldx [\r + OFFSET_PC], %o7
-	ldx [\r + OFFSET_I0], %i0
-	ldx [\r + OFFSET_I1], %i1
-	ldx [\r + OFFSET_I2], %i2
-	ldx [\r + OFFSET_I3], %i3
-	ldx [\r + OFFSET_I4], %i4
-	ldx [\r + OFFSET_I5], %i5
-	ldx [\r + OFFSET_FP], %fp
-	ldx [\r + OFFSET_I7], %i7
-	ldx [\r + OFFSET_L0], %l0
-	ldx [\r + OFFSET_L1], %l1
-	ldx [\r + OFFSET_L2], %l2
-	ldx [\r + OFFSET_L3], %l3
-	ldx [\r + OFFSET_L4], %l4
-	ldx [\r + OFFSET_L5], %l5
-	ldx [\r + OFFSET_L6], %l6
-	ldx [\r + OFFSET_L7], %l7
-	ldx [\r + OFFSET_TP], %g7
-.endm
-
 context_save:
-	CONTEXT_STORE %o0
+	CONTEXT_SAVE_ARCH_CORE %o0
 	retl
 	mov 1, %o0		! context_save_arch returns 1
@@ -93,5 +49,5 @@
 	flushw
 	
-	CONTEXT_LOAD %o0
+	CONTEXT_RESTORE_ARCH_CORE %o0
 	retl
 	xor %o0, %o0, %o0	! context_restore_arch returns 0
