base.isa (3978:739bc3a17929) | base.isa (3980:9bcb2a2e9bb8) |
---|---|
1// Copyright (c) 2006-2007 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 402 unchanged lines hidden (view full) --- 411 case OverflowSet: 412 return condCodes.v; 413 } 414 panic("Tried testing condition nonexistant " 415 "condition code %d", condition); 416 } 417}}; 418 | 1// Copyright (c) 2006-2007 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 402 unchanged lines hidden (view full) --- 411 case OverflowSet: 412 return condCodes.v; 413 } 414 panic("Tried testing condition nonexistant " 415 "condition code %d", condition); 416 } 417}}; 418 |
419output exec {{ 420 /// Check "FP enabled" machine status bit. Called when executing any FP 421 /// instruction in full-system mode. 422 /// @retval Full-system mode: NoFault if FP is enabled, FpDisabled 423 /// if not. Non-full-system mode: always returns NoFault. 424#if FULL_SYSTEM 425 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 426 { 427 Fault fault = NoFault; // dummy... this ipr access should not fault 428 if (xc->readMiscRegWithEffect(MISCREG_PSTATE) & PSTATE::pef && 429 xc->readMiscRegWithEffect(MISCREG_FPRS) & 0x4) 430 return NoFault; 431 else 432 return new FpDisabled; 433 } 434#else 435 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 436 { 437 return NoFault; 438 } 439#endif 440}}; 441 442 |
|