Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/mpc6xx Use lvewx/stvewx for VSCR and save o...
details: https://anonhg.NetBSD.org/src/rev/06cba344e774
branches: trunk
changeset: 533674:06cba344e774
user: matt <matt%NetBSD.org@localhost>
date: Sun Jul 07 00:46:20 2002 +0000
description:
Use lvewx/stvewx for VSCR and save ourselves 12 bytes we don't need to load.
diffstat:
sys/arch/powerpc/mpc6xx/altivec.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r 151ffb7044ff -r 06cba344e774 sys/arch/powerpc/mpc6xx/altivec.c
--- a/sys/arch/powerpc/mpc6xx/altivec.c Sun Jul 07 00:43:11 2002 +0000
+++ b/sys/arch/powerpc/mpc6xx/altivec.c Sun Jul 07 00:46:20 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altivec.c,v 1.2 2002/07/05 18:45:22 matt Exp $ */
+/* $NetBSD: altivec.c,v 1.3 2002/07/07 00:46:20 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -87,8 +87,8 @@
* (this needs to done before loading the user's vector registers
* since we need to a scratch vector register)
*/
- __asm __volatile("lvx %2,%0,%1; mtvscr %2" \
- :: "r"(vr), "r"(offsetof(struct vreg, vreg[32])), "n"(0));
+ __asm __volatile("vxor %2,%2,%2; lvewx %2,%0,%1; mtvscr %2" \
+ :: "r"(vr), "r"(offsetof(struct vreg, vscr)), "n"(0));
/*
* VRSAVE will be restored when trap frame returns
@@ -152,8 +152,8 @@
* Save VSCR (this needs to be done after save the vector registers
* since we need to use one as scratch).
*/
- __asm __volatile("mfvscr %2; stvx %2,%0,%1" \
- :: "r"(vr), "r"(offsetof(struct vreg, vreg[32])), "n"(0));
+ __asm __volatile("mfvscr %2; stvewx %2,%0,%1" \
+ :: "r"(vr), "r"(offsetof(struct vreg, vscr)), "n"(0));
/*
* Save VRSAVE
Home |
Main Index |
Thread Index |
Old Index