summaryrefslogtreecommitdiff
path: root/src/arch/sparc/faults.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-08 04:18:15 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-08 04:18:15 -0500
commitf0c4d3664930f28229c7e336c4d4372b2e1d4c21 (patch)
tree894f8784aaa03a14b841ee26db451502c4e71c4e /src/arch/sparc/faults.cc
parent8cb7ac090059db62f869f726ffef6f93c0e49beb (diff)
downloadgem5-f0c4d3664930f28229c7e336c4d4372b2e1d4c21.tar.xz
The new global level is computed with min, not max.
--HG-- extra : convert_revision : 6339c82d3655694445c3eb43e467b9aa6b4c8224
Diffstat (limited to 'src/arch/sparc/faults.cc')
-rw-r--r--src/arch/sparc/faults.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/sparc/faults.cc b/src/arch/sparc/faults.cc
index da7fc730d..1a44d34cf 100644
--- a/src/arch/sparc/faults.cc
+++ b/src/arch/sparc/faults.cc
@@ -291,9 +291,9 @@ void doNormalFault(ThreadContext *tc, TrapType tt)
//Update the global register level
if(1/*We're delivering the trap in priveleged mode*/)
- tc->setMiscReg(MISCREG_GL, max<int>(GL+1, MaxGL));
+ tc->setMiscReg(MISCREG_GL, min<int>(GL+1, MaxGL));
else
- tc->setMiscReg(MISCREG_GL, max<int>(GL+1, MaxPGL));
+ tc->setMiscReg(MISCREG_GL, min<int>(GL+1, MaxPGL));
//PSTATE.mm is unchanged
//PSTATE.pef = whether or not an fpu is present