fp.isa (7799:5d0f62927d75) | fp.isa (8560:5c4bac827934) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2005 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37// BasicOperateWithNopCheck. 38// 39 40output exec {{ 41 /// Check "FP enabled" machine status bit. Called when executing any FP 42 /// instruction in full-system mode. 43 /// @retval Full-system mode: NoFault if FP is enabled, FenFault 44 /// if not. Non-full-system mode: always returns NoFault. | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2003-2005 The Regents of The University of Michigan 4// All rights reserved. 5// 6// Redistribution and use in source and binary forms, with or without 7// modification, are permitted provided that the following conditions are 8// met: redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37// BasicOperateWithNopCheck. 38// 39 40output exec {{ 41 /// Check "FP enabled" machine status bit. Called when executing any FP 42 /// instruction in full-system mode. 43 /// @retval Full-system mode: NoFault if FP is enabled, FenFault 44 /// if not. Non-full-system mode: always returns NoFault. |
45#if FULL_SYSTEM | |
46 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 47 { 48 Fault fault = NoFault; // dummy... this ipr access should not fault | 45 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 46 { 47 Fault fault = NoFault; // dummy... this ipr access should not fault |
49 if (!ICSR_FPE(xc->readMiscReg(IPR_ICSR))) { | 48 if (FULL_SYSTEM && !ICSR_FPE(xc->readMiscReg(IPR_ICSR))) { |
50 fault = new FloatEnableFault; 51 } 52 return fault; 53 } | 49 fault = new FloatEnableFault; 50 } 51 return fault; 52 } |
54#else 55 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 56 { 57 return NoFault; 58 } 59#endif | |
60}}; 61 62output header {{ 63 /** 64 * Base class for general floating-point instructions. Includes 65 * support for various Alpha rounding and trapping modes. Only FP 66 * instructions that require this support are derived from this 67 * class; the rest derive directly from AlphaStaticInst. --- 245 unchanged lines hidden --- | 53}}; 54 55output header {{ 56 /** 57 * Base class for general floating-point instructions. Includes 58 * support for various Alpha rounding and trapping modes. Only FP 59 * instructions that require this support are derived from this 60 * class; the rest derive directly from AlphaStaticInst. --- 245 unchanged lines hidden --- |