diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-01-27 01:59:20 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-01-27 01:59:20 -0500 |
commit | 0358ccee23072eef0b6448e3170457037682a452 (patch) | |
tree | 378b5ba325d74536092a7f245423d81274db38b4 /src/arch/sparc/isa/base.isa | |
parent | e41f54f97f9ebdea32cc6498c346636cddc9e06d (diff) | |
parent | 5c7bf74c073d0aea808046d10dfcaa6c319217a3 (diff) | |
download | gem5-0358ccee23072eef0b6448e3170457037682a452.tar.xz |
Merge zizzer:/bk/newmem
into zower.eecs.umich.edu:/eecshome/m5/newmem
src/arch/sparc/isa/formats/mem/util.isa:
src/arch/sparc/isa_traits.hh:
src/arch/sparc/system.cc:
Hand Merge
--HG--
extra : convert_revision : d5e0c97caebb616493e2f642e915969d7028109c
Diffstat (limited to 'src/arch/sparc/isa/base.isa')
-rw-r--r-- | src/arch/sparc/isa/base.isa | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/arch/sparc/isa/base.isa b/src/arch/sparc/isa/base.isa index b78511398..58a17f23e 100644 --- a/src/arch/sparc/isa/base.isa +++ b/src/arch/sparc/isa/base.isa @@ -416,3 +416,27 @@ output decoder {{ } }}; +output exec {{ + /// Check "FP enabled" machine status bit. Called when executing any FP + /// instruction in full-system mode. + /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled + /// if not. Non-full-system mode: always returns NoFault. +#if FULL_SYSTEM + inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) + { + Fault fault = NoFault; // dummy... this ipr access should not fault + if (xc->readMiscRegWithEffect(MISCREG_PSTATE) & PSTATE::pef && + xc->readMiscRegWithEffect(MISCREG_FPRS) & 0x4) + return NoFault; + else + return new FpDisabled; + } +#else + inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) + { + return NoFault; + } +#endif +}}; + + |