diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:57:35 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:57:35 -0500 |
commit | 5f51fe20de64eb7a32083eedac0bd27938b1deb7 (patch) | |
tree | eb54f7a7b329d45fab45cc9d9a0779f61dc13a26 /src/arch/sparc/isa/base.isa | |
parent | 6d9d0c68b574ceba53fc36d34b83f7109e00b1d0 (diff) | |
parent | 2939d7d061efc8444c06ac52f82c8aeaf0048aaf (diff) | |
download | gem5-5f51fe20de64eb7a32083eedac0bd27938b1deb7.tar.xz |
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem
--HG--
extra : convert_revision : 53ee81b099930d4d827db99e2d944ffb8645c706
Diffstat (limited to 'src/arch/sparc/isa/base.isa')
-rw-r--r-- | src/arch/sparc/isa/base.isa | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/arch/sparc/isa/base.isa b/src/arch/sparc/isa/base.isa index 4a806bfd0..5b65ec288 100644 --- a/src/arch/sparc/isa/base.isa +++ b/src/arch/sparc/isa/base.isa @@ -1,4 +1,4 @@ -// Copyright (c) 2006 The Regents of The University of Michigan +// Copyright (c) 2006-2007 The Regents of The University of Michigan // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -290,3 +290,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 +}}; + + |