Thu Apr 5 19:42:14 2012 UTC ()
Use CR_ control regsiter definition for consistency.


(skrll)
diff -r1.58 -r1.59 src/sys/arch/hp700/hp700/locore.S
diff -r1.63 -r1.64 src/sys/arch/hppa/hppa/trap.S

cvs diff -r1.58 -r1.59 src/sys/arch/hp700/hp700/Attic/locore.S (expand / switch to unified diff)

--- src/sys/arch/hp700/hp700/Attic/locore.S 2012/01/03 06:11:21 1.58
+++ src/sys/arch/hp700/hp700/Attic/locore.S 2012/04/05 19:42:13 1.59
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: locore.S,v 1.58 2012/01/03 06:11:21 skrll Exp $ */ 1/* $NetBSD: locore.S,v 1.59 2012/04/05 19:42:13 skrll Exp $ */
2/* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ 2/* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */
3 3
4/* 4/*
5 * Copyright (c) 1998-2004 Michael Shalayeff 5 * Copyright (c) 1998-2004 Michael Shalayeff
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -69,29 +69,26 @@ @@ -69,29 +69,26 @@
69#include <machine/psl.h> 69#include <machine/psl.h>
70#include <machine/trap.h> 70#include <machine/trap.h>
71#include <machine/iomod.h> 71#include <machine/iomod.h>
72#include <machine/pdc.h> 72#include <machine/pdc.h>
73#include <machine/intr.h> 73#include <machine/intr.h>
74#include <machine/frame.h> 74#include <machine/frame.h>
75#include <machine/reg.h> 75#include <machine/reg.h>
76 76
77#include "assym.h" 77#include "assym.h"
78 78
79/* Some aliases for the macros in assym.h. */ 79/* Some aliases for the macros in assym.h. */
80#define TRAPFRAME_SIZEOF trapframe_SIZEOF 80#define TRAPFRAME_SIZEOF trapframe_SIZEOF
81 81
82#define ccr cr10 
83#define rctr cr0 
84 
85/* 82/*
86 * Very crude debugging macros that write to com1. 83 * Very crude debugging macros that write to com1.
87 */ 84 */
88 85
89#if 1 86#if 1
90#define COM1_TX_REG (0xffd00000 + 0x5000 + 0x800) 87#define COM1_TX_REG (0xffd00000 + 0x5000 + 0x800)
91#else 88#else
92#define COM1_TX_REG (0xf0823000 + 0x800) 89#define COM1_TX_REG (0xf0823000 + 0x800)
93#endif 90#endif
94#define _DEBUG_PUTCHAR(reg1, reg2) ! \ 91#define _DEBUG_PUTCHAR(reg1, reg2) ! \
95 ldil L%COM1_TX_REG, %reg1 ! \ 92 ldil L%COM1_TX_REG, %reg1 ! \
96 stb %reg2, R%COM1_TX_REG(%sr1, %reg1) ! \ 93 stb %reg2, R%COM1_TX_REG(%sr1, %reg1) ! \
97 ldil L%10000000, %reg1 ! \ 94 ldil L%10000000, %reg1 ! \
@@ -234,27 +231,27 @@ L$start_zero_tf: @@ -234,27 +231,27 @@ L$start_zero_tf:
234 231
235 ldil L%lwp0, %t2 232 ldil L%lwp0, %t2
236 stw %t3, R%lwp0+L_PCB(%t2) /* XXXuvm_lwp_getuarea */ 233 stw %t3, R%lwp0+L_PCB(%t2) /* XXXuvm_lwp_getuarea */
237 ldo NBPG(%t3), %t1 234 ldo NBPG(%t3), %t1
238 stw %t1, R%lwp0+L_MD_REGS(%t2) 235 stw %t1, R%lwp0+L_MD_REGS(%t2)
239 236
240 ldil L%TFF_LAST, %t1 237 ldil L%TFF_LAST, %t1
241 stw %t1, TF_FLAGS-TRAPFRAME_SIZEOF(%sp) 238 stw %t1, TF_FLAGS-TRAPFRAME_SIZEOF(%sp)
242 stw %t3, TF_CR30-TRAPFRAME_SIZEOF(%sp) 239 stw %t3, TF_CR30-TRAPFRAME_SIZEOF(%sp)
243 240
244 /* 241 /*
245 * disable all coprocessors 242 * disable all coprocessors
246 */ 243 */
247 mtctl %r0, %ccr 244 mtctl %r0, CR_CCR
248 245
249#ifdef MULTIPROCESSOR 246#ifdef MULTIPROCESSOR
250 247
251#define PZ_MEM_RENDEZ 0x10 248#define PZ_MEM_RENDEZ 0x10
252#define PZ_MEM_RENDEZ_HI 0x28 249#define PZ_MEM_RENDEZ_HI 0x28
253 250
254 /* Setup SMP rendezvous address. */ 251 /* Setup SMP rendezvous address. */
255 ldil L%hw_cpu_spinup_trampoline, %r1 252 ldil L%hw_cpu_spinup_trampoline, %r1
256 ldo R%hw_cpu_spinup_trampoline(%r1), %r1 253 ldo R%hw_cpu_spinup_trampoline(%r1), %r1
257 stw %r1, PZ_MEM_RENDEZ(%r0) 254 stw %r1, PZ_MEM_RENDEZ(%r0)
258 stw %r0, PZ_MEM_RENDEZ_HI(%r0) 255 stw %r0, PZ_MEM_RENDEZ_HI(%r0)
259#endif 256#endif
260 257
@@ -436,27 +433,27 @@ LEAF_ENTRY_NOPROFILE(hw_cpu_spinup_tramp @@ -436,27 +433,27 @@ LEAF_ENTRY_NOPROFILE(hw_cpu_spinup_tramp
436#endif 433#endif
437 mtsp %r0, %sr0 434 mtsp %r0, %sr0
438 mtsp %r0, %sr1 435 mtsp %r0, %sr1
439 mtsp %r0, %sr2 436 mtsp %r0, %sr2
440 mtsp %r0, %sr3 437 mtsp %r0, %sr3
441 mtsp %r0, %sr4 438 mtsp %r0, %sr4
442 mtsp %r0, %sr5 439 mtsp %r0, %sr5
443 mtsp %r0, %sr6 440 mtsp %r0, %sr6
444 mtsp %r0, %sr7 441 mtsp %r0, %sr7
445 442
446 /* 443 /*
447 * disable all coprocessors 444 * disable all coprocessors
448 */ 445 */
449 mtctl %r0, %ccr 446 mtctl %r0, CR_CCR
450 447
451 /* 448 /*
452 * to keep the spl() routines consistent we need to put the correct 449 * to keep the spl() routines consistent we need to put the correct
453 * spl level into eiem, and reset any pending interrupts 450 * spl level into eiem, and reset any pending interrupts
454 */ 451 */
455 ldi -1, %r1 452 ldi -1, %r1
456 mtctl %r0, %eiem /* disable interrupts */ 453 mtctl %r0, %eiem /* disable interrupts */
457 mtctl %r1, %eirr 454 mtctl %r1, %eirr
458 455
459 /* 456 /*
460 * load address of interrupt vector table 457 * load address of interrupt vector table
461 */ 458 */
462 ldil L%ivaaddr, %t2 459 ldil L%ivaaddr, %t2
@@ -1044,33 +1041,33 @@ noras: @@ -1044,33 +1041,33 @@ noras:
1044 */ 1041 */
1045ALTENTRY(hppa_fpu_nop1) 1042ALTENTRY(hppa_fpu_nop1)
1046 b,n switch_return 1043 b,n switch_return
1047 1044
1048 /* 1045 /*
1049 * We do have a hardware FPU. If the LWP 1046 * We do have a hardware FPU. If the LWP
1050 * that we just switched to has its state in the 1047 * that we just switched to has its state in the
1051 * FPU, enable the FPU, else disable it, so if 1048 * FPU, enable the FPU, else disable it, so if
1052 * the LWP does try to use the coprocessor 1049 * the LWP does try to use the coprocessor
1053 * we'll get an assist emulation trap to swap 1050 * we'll get an assist emulation trap to swap
1054 * states. 1051 * states.
1055 */ 1052 */
1056 GET_CURCPU(%t1) 1053 GET_CURCPU(%t1)
1057 mfctl %ccr, %r1 1054 mfctl CR_CCR, %r1
1058 mfctl CR_FPPADDR, %t2 1055 mfctl CR_FPPADDR, %t2
1059 ldw CI_FPU_STATE(%t1), %t1 1056 ldw CI_FPU_STATE(%t1), %t1
1060 depi 0, 25, 2, %r1 ; disables the FPU 1057 depi 0, 25, 2, %r1 ; disables the FPU
1061 comb,<>,n %t1, %t2, 0 ; nullify if LWPs different 1058 comb,<>,n %t1, %t2, 0 ; nullify if LWPs different
1062 depi 3, 25, 2, %r1 ; enables the FPU 1059 depi 3, 25, 2, %r1 ; enables the FPU
1063 mtctl %r1, %ccr 1060 mtctl %r1, CR_CCR
1064 1061
1065switch_return: 1062switch_return:
1066 copy %arg0, %ret0 1063 copy %arg0, %ret0
1067 1064
1068 ldw HPPA_FRAME_CRP(%r3), %rp 1065 ldw HPPA_FRAME_CRP(%r3), %rp
1069 bv 0(%rp) 1066 bv 0(%rp)
1070 ldwm -(HPPA_FRAME_SIZE+16*4)(%sp), %r3 1067 ldwm -(HPPA_FRAME_SIZE+16*4)(%sp), %r3
1071EXIT(cpu_switchto) 1068EXIT(cpu_switchto)
1072 1069
1073/* 1070/*
1074 * This is the first code run in a new LWP after 1071 * This is the first code run in a new LWP after
1075 * cpu_switchto() has switched to it for the first time. 1072 * cpu_switchto() has switched to it for the first time.
1076 * 1073 *

cvs diff -r1.63 -r1.64 src/sys/arch/hppa/hppa/trap.S (expand / switch to unified diff)

--- src/sys/arch/hppa/hppa/trap.S 2012/02/26 08:28:57 1.63
+++ src/sys/arch/hppa/hppa/trap.S 2012/04/05 19:42:14 1.64
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: trap.S,v 1.63 2012/02/26 08:28:57 skrll Exp $ */ 1/* $NetBSD: trap.S,v 1.64 2012/04/05 19:42:14 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2002 The NetBSD Foundation, Inc. 4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matthew Fredette. 8 * by Matthew Fredette.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -503,27 +503,27 @@ syscall_return: @@ -503,27 +503,27 @@ syscall_return:
503 503
504#if pbably_not_worth_it 504#if pbably_not_worth_it
505 ldw TF_CR12(%sr3, %t3), %t1 505 ldw TF_CR12(%sr3, %t3), %t1
506 ldw TF_CR13(%sr3, %t3), %t2 506 ldw TF_CR13(%sr3, %t3), %t2
507 mtctl %t1, %pidr3 507 mtctl %t1, %pidr3
508 mtctl %t2, %pidr4 508 mtctl %t2, %pidr4
509#endif 509#endif
510 ldw TF_CR27(%sr3, %t3), %t1 510 ldw TF_CR27(%sr3, %t3), %t1
511 ldw TF_CR30(%sr3, %t3), %t2 511 ldw TF_CR30(%sr3, %t3), %t2
512 mtctl %t1, CR_TLS 512 mtctl %t1, CR_TLS
513 mtctl %t2, CR_FPPADDR 513 mtctl %t2, CR_FPPADDR
514 514
515 ldw TF_CR0(%sr3, %t3), %t1 515 ldw TF_CR0(%sr3, %t3), %t1
516 mtctl %t1, %rctr 516 mtctl %t1, CR_RCTR
517 517
518 GET_CURCPU_SPACE(%sr3, %t3) 518 GET_CURCPU_SPACE(%sr3, %t3)
519 519
520 /* 520 /*
521 * Clear the system mask, this puts us back into physical mode. Reload 521 * Clear the system mask, this puts us back into physical mode. Reload
522 * the trapframe pointer with the correspondent PA value. %sp will be 522 * the trapframe pointer with the correspondent PA value. %sp will be
523 * left in virtual until restored from trapframe, since we don't use it 523 * left in virtual until restored from trapframe, since we don't use it
524 * anyway. 524 * anyway.
525 */ 525 */
526 ssm 0, %r0 526 ssm 0, %r0
527 ldo CI_TRAPSAVE(%t3), %t3 527 ldo CI_TRAPSAVE(%t3), %t3
528 nop ! nop ! nop ! nop ! nop ! nop 528 nop ! nop ! nop ! nop ! nop ! nop
529 rsm RESET_PSW, %r0 529 rsm RESET_PSW, %r0
@@ -929,27 +929,27 @@ LEAF_ENTRY_NOPROFILE(TLABEL(emu)) @@ -929,27 +929,27 @@ LEAF_ENTRY_NOPROFILE(TLABEL(emu))
929 /* 929 /*
930 * As an optimization, hppa_fpu_bootstrap replaces this branch inst- 930 * As an optimization, hppa_fpu_bootstrap replaces this branch inst-
931 * ruction with a nop if there is a hardware FPU. 931 * ruction with a nop if there is a hardware FPU.
932 * 932 *
933 * Otherwise, this is the branch to emulate an FPU coprocessor. 933 * Otherwise, this is the branch to emulate an FPU coprocessor.
934 */ 934 */
935ALTENTRY(hppa_fpu_nop0) 935ALTENTRY(hppa_fpu_nop0)
936 b,n L$emulate_fpu 936 b,n L$emulate_fpu
937 937
938 /* 938 /*
939 * We have a hardware FPU. If it is enabled, branch to emulate the 939 * We have a hardware FPU. If it is enabled, branch to emulate the
940 * instruction. 940 * instruction.
941 */ 941 */
942 mfctl %ccr, %arg0 942 mfctl CR_CCR, %arg0
943 extru,= %arg0, 25, 2, %r1 943 extru,= %arg0, 25, 2, %r1
944 b,n L$emulate_fpu 944 b,n L$emulate_fpu
945 945
946 /* 946 /*
947 * The hardware FPU is disabled, so we need to swap in the FPU state of 947 * The hardware FPU is disabled, so we need to swap in the FPU state of
948 * the LWP whose uspace physical address in CR_UPADDR. We may also 948 * the LWP whose uspace physical address in CR_UPADDR. We may also
949 * need to swap out the FPU state of any LWP whose uspace physical 949 * need to swap out the FPU state of any LWP whose uspace physical
950 * address is in curcpu()->ci_fpu_state. 950 * address is in curcpu()->ci_fpu_state.
951 */ 951 */
952  952
953 /* 953 /*
954 * So far, the CTRAP() macro has saved %r1 in %tr7, and the dispatching 954 * So far, the CTRAP() macro has saved %r1 in %tr7, and the dispatching
955 * above has saved %arg0 in tr2. Save the other registers that we want 955 * above has saved %arg0 in tr2. Save the other registers that we want
@@ -1045,30 +1045,30 @@ ALTENTRY(hppa_fpu_swap) @@ -1045,30 +1045,30 @@ ALTENTRY(hppa_fpu_swap)
1045 /* 1045 /*
1046 * Note that this function must work in physical mode as well as virtual 1046 * Note that this function must work in physical mode as well as virtual
1047 * mode, because it can be called by a trap handler. This also further 1047 * mode, because it can be called by a trap handler. This also further
1048 * restricts the registers we can use. We can only use %arg0, %arg1, 1048 * restricts the registers we can use. We can only use %arg0, %arg1,
1049 * and %r1. 1049 * and %r1.
1050 */ 1050 */
1051 1051
1052 /* 1052 /*
1053 * Assuming that out and in aren't both NULL, we will have to run co- 1053 * Assuming that out and in aren't both NULL, we will have to run co-
1054 * processor instructions, so we'd better enable it. 1054 * processor instructions, so we'd better enable it.
1055 *  1055 *
1056 * Also, branch if there's no FPU state to swap out. 1056 * Also, branch if there's no FPU state to swap out.
1057 */ 1057 */
1058 mfctl %ccr, %r1 1058 mfctl CR_CCR, %r1
1059 depi 3, 25, 2, %r1 1059 depi 3, 25, 2, %r1
1060 comb,= %r0, %arg0, L$fpu_swap_in 1060 comb,= %r0, %arg0, L$fpu_swap_in
1061 mtctl %r1, %ccr 1061 mtctl %r1,CR_CCR
1062 1062
1063 /* 1063 /*
1064 * Swap out the current FPU state. 1064 * Swap out the current FPU state.
1065 */ 1065 */
1066 fstds,ma %fr0 , 8(%arg0) /* fr0 must be saved first */ 1066 fstds,ma %fr0 , 8(%arg0) /* fr0 must be saved first */
1067 fstds,ma %fr1 , 8(%arg0) 1067 fstds,ma %fr1 , 8(%arg0)
1068 fstds,ma %fr2 , 8(%arg0) 1068 fstds,ma %fr2 , 8(%arg0)
1069 fstds,ma %fr3 , 8(%arg0) 1069 fstds,ma %fr3 , 8(%arg0)
1070 fstds,ma %fr4 , 8(%arg0) 1070 fstds,ma %fr4 , 8(%arg0)
1071 fstds,ma %fr5 , 8(%arg0) 1071 fstds,ma %fr5 , 8(%arg0)
1072 fstds,ma %fr6 , 8(%arg0) 1072 fstds,ma %fr6 , 8(%arg0)
1073 fstds,ma %fr7 , 8(%arg0) 1073 fstds,ma %fr7 , 8(%arg0)
1074 fstds,ma %fr8 , 8(%arg0) 1074 fstds,ma %fr8 , 8(%arg0)
@@ -1176,30 +1176,30 @@ L$fpu_swap_in: @@ -1176,30 +1176,30 @@ L$fpu_swap_in:
1176 1176
1177L$fpu_swap_done: 1177L$fpu_swap_done:
1178 1178
1179 /* Increment the switch count and return. */ 1179 /* Increment the switch count and return. */
1180 ldil L%fpu_csw, %r1 1180 ldil L%fpu_csw, %r1
1181 ldw R%fpu_csw(%r1), %arg0 1181 ldw R%fpu_csw(%r1), %arg0
1182 ldo 1(%arg0), %arg0 1182 ldo 1(%arg0), %arg0
1183 bv %r0(%rp) 1183 bv %r0(%rp)
1184 stw %arg0, R%fpu_csw(%r1) 1184 stw %arg0, R%fpu_csw(%r1)
1185 1185
1186L$fpu_no_swap_in: 1186L$fpu_no_swap_in:
1187 1187
1188 /* We didn't swap any FPU state in, so disable the FPU. */ 1188 /* We didn't swap any FPU state in, so disable the FPU. */
1189 mfctl %ccr, %r1 1189 mfctl CR_CCR, %r1
1190 depi 0, 25, 2, %r1 1190 depi 0, 25, 2, %r1
1191 b L$fpu_swap_done 1191 b L$fpu_swap_done
1192 mtctl %r1, %ccr 1192 mtctl %r1, CR_CCR
1193EXIT(hppa_fpu_swapout) 1193EXIT(hppa_fpu_swapout)
1194 1194
1195 /* Construct the virtual address tag. */ 1195 /* Construct the virtual address tag. */
1196 /* NB: it is legal for off and t to be the same. */ 1196 /* NB: it is legal for off and t to be the same. */
1197#define VTAG(sp,off,t) \ 1197#define VTAG(sp,off,t) \
1198 shd %r0, off, 1, t /* t[1..15] = off[0..14] */ ! \ 1198 shd %r0, off, 1, t /* t[1..15] = off[0..14] */ ! \
1199 dep sp, 31, 16, t /* put in the space id */ ! \ 1199 dep sp, 31, 16, t /* put in the space id */ ! \
1200 depi 1, 0, 1, t /* and set the valid bit */ 1200 depi 1, 0, 1, t /* and set the valid bit */
1201 1201
1202#if 0 1202#if 0
1203 BSS(dtlb_c, 8) 1203 BSS(dtlb_c, 8)
1204 BSS(tlbd_c, 8) 1204 BSS(tlbd_c, 8)
1205 BSS(itlb_c, 8) 1205 BSS(itlb_c, 8)
@@ -2043,47 +2043,47 @@ L$trap_have_stack: @@ -2043,47 +2043,47 @@ L$trap_have_stack:
2043 mfctl %isr, %t1 2043 mfctl %isr, %t1
2044 mfctl %ior, %t2 2044 mfctl %ior, %t2
2045 stw %t1, CI_TRAPSAVE + TF_CR20(%t3) /* use ,bc */ 2045 stw %t1, CI_TRAPSAVE + TF_CR20(%t3) /* use ,bc */
2046 stw %t2, CI_TRAPSAVE + TF_CR21(%t3) 2046 stw %t2, CI_TRAPSAVE + TF_CR21(%t3)
2047 2047
2048 /* save the interruption instruction register */ 2048 /* save the interruption instruction register */
2049 mfctl %iir, %t2 2049 mfctl %iir, %t2
2050 stw %t2, CI_TRAPSAVE + TF_CR19(%t3) 2050 stw %t2, CI_TRAPSAVE + TF_CR19(%t3)
2051 2051
2052 /* save the trap type and flags */ 2052 /* save the trap type and flags */
2053 stw %r1, CI_TRAPSAVE + TF_FLAGS(%t3) 2053 stw %r1, CI_TRAPSAVE + TF_FLAGS(%t3)
2054 2054
2055 /* gotta get it before R is up */ 2055 /* gotta get it before R is up */
2056 mfctl %rctr, %t1 2056 mfctl CR_RCTR, %t1
2057 2057
2058 copy %sp, %t3 2058 copy %sp, %t3
2059 ldo HPPA_FRAME_SIZE+TRAPFRAME_SIZEOF(%sp), %sp 2059 ldo HPPA_FRAME_SIZE+TRAPFRAME_SIZEOF(%sp), %sp
2060 2060
2061#if defined(DDB) || defined(KGDB) 2061#if defined(DDB) || defined(KGDB)
2062 /* 2062 /*
2063 * Match the offset from %sp for the trapframe with syscall_entry 2063 * Match the offset from %sp for the trapframe with syscall_entry
2064 */ 2064 */
2065 ldo HPPA_FRAME_MAXARGS+HPPA_FRAME_SIZE-1(%sp),%sp 2065 ldo HPPA_FRAME_MAXARGS+HPPA_FRAME_SIZE-1(%sp),%sp
2066 depi 0, 31, 6, %sp 2066 depi 0, 31, 6, %sp
2067#endif 2067#endif
2068 rfir 2068 rfir
2069 nop ! nop ! nop ! nop ! nop ! nop ! nop ! nop 2069 nop ! nop ! nop ! nop ! nop ! nop ! nop ! nop
2070trapnowvirt: 2070trapnowvirt:
2071 /* 2071 /*
2072 * %t3 contains the virtual address of the trapframe 2072 * %t3 contains the virtual address of the trapframe
2073 * %sp is loaded w/ the right VA (we did not need it being physical) 2073 * %sp is loaded w/ the right VA (we did not need it being physical)
2074 */ 2074 */
2075 2075
2076 mfctl %ccr, %t2 2076 mfctl CR_CCR, %t2
2077 stw %t1, TF_CR0(%sr3, %t3) 2077 stw %t1, TF_CR0(%sr3, %t3)
2078 stw %t2, TF_CR10(%sr3, %t3) 2078 stw %t2, TF_CR10(%sr3, %t3)
2079 2079
2080 mfsp %sr0, %t1 2080 mfsp %sr0, %t1
2081 mfsp %sr1, %t2 2081 mfsp %sr1, %t2
2082 stw %t1, TF_SR0(%sr3, %t3) 2082 stw %t1, TF_SR0(%sr3, %t3)
2083 stw %t2, TF_SR1(%sr3, %t3) 2083 stw %t2, TF_SR1(%sr3, %t3)
2084 2084
2085 mfsp %sr2, %t1 2085 mfsp %sr2, %t1
2086 mfsp %sr4, %t2 2086 mfsp %sr4, %t2
2087 stw %t1, TF_SR2(%sr3, %t3) 2087 stw %t1, TF_SR2(%sr3, %t3)
2088 stw %t2, TF_SR4(%sr3, %t3) 2088 stw %t2, TF_SR4(%sr3, %t3)
2089 2089