1/* 2 * Copyright (c) 2013 ARM Limited 3 * Copyright (c) 2014-2015 Sven Karlsson 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 42 unchanged lines hidden (view full) --- 51 52#include "base/types.hh" 53#include "cpu/static_inst.hh" 54#include "cpu/thread_context.hh" 55 56namespace RiscvISA 57{ 58 |
59template<typename T> inline bool 60isquietnan(T val) 61{ 62 return false; 63} 64 65template<> inline bool 66isquietnan<float>(float val) 67{ 68 return std::isnan(val) 69 && (reinterpret_cast<uint32_t&>(val)&0x00400000); 70} 71 72template<> inline bool 73isquietnan<double>(double val) 74{ 75 return std::isnan(val) 76 && (reinterpret_cast<uint64_t&>(val)&0x0008000000000000ULL); 77} 78 79template<typename T> inline bool 80issignalingnan(T val) 81{ 82 return false; 83} 84 85template<> inline bool 86issignalingnan<float>(float val) 87{ 88 return std::isnan(val) 89 && (reinterpret_cast<uint32_t&>(val)&0x00200000); 90} 91 92template<> inline bool 93issignalingnan<double>(double val) 94{ 95 return std::isnan(val) 96 && (reinterpret_cast<uint64_t&>(val)&0x0004000000000000ULL); 97} 98 |
99inline PCState 100buildRetPC(const PCState &curPC, const PCState &callPC) 101{ 102 PCState retPC = callPC; 103 retPC.advance(); 104 retPC.pc(curPC.npc()); 105 return retPC; 106} --- 55 unchanged lines hidden --- |