Go to the documentation of this file.
45 #include "fputils/fp80.h"
54 panic(
"getArgument(): Floating point arguments not implemented\n");
55 }
else if (size != 8) {
56 panic(
"getArgument(): Can only handle 64-bit arguments.\n");
61 const int int_reg_map[] = {
62 INTREG_RDI, INTREG_RSI, INTREG_RDX,
65 if (number <
sizeof(int_reg_map) /
sizeof(*int_reg_map)) {
68 panic(
"getArgument(): Don't know how to handle stack arguments.\n");
121 return ((ncc_flags | cc_flags | cfof_bits | df_bit) & 0x3F7FD5)
145 for (
int i = 0;
i < 8; ++
i) {
147 const unsigned tag((ftw >> (2 *
i)) & 0x3);
170 for (
int i = 0;
i < 8; ++
i) {
171 const unsigned xtag(((ftwx >>
i) & 0x1));
176 ftw |= 0x3 << (2 *
i);
190 const uint8_t new_top((
top + spm + 8) % 8);
194 for (
int i =
top;
i != new_top;
i = (
i + 1 + 8) % 8)
195 ftw |= 0x3 << (2 *
i);
196 }
else if (spm < 0) {
200 for (
int i = new_top;
i !=
top;
i = (
i + 1 + 8) % 8)
201 ftw &= ~(0x3 << (2 *
i));
211 memcpy(fp80.bits, _mem, 10);
213 return fp80_cvtd(fp80);
219 fp80_t fp80 = fp80_cvfd(value);
220 memcpy(_mem, fp80.bits, 10);
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
uint8_t convX87TagsToXTags(uint16_t ftw)
Convert an x87 tag word to abridged tag format.
virtual RegVal readIntRegFlat(RegIndex idx) const =0
Flat register interfaces.
uint16_t genX87Tags(uint16_t ftw, uint8_t top, int8_t spm)
Generate and updated x87 tag register after a push/pop operation.
double loadFloat80(const void *_mem)
Load an 80-bit float from memory and convert it to double.
void copyRegs(ThreadContext *src, ThreadContext *dest)
uint16_t convX87XTagsToTags(uint8_t ftwx)
Convert an x87 xtag word to normal tags format.
virtual void setFloatRegFlat(RegIndex idx, RegVal val)=0
void storeFloat80(void *_mem, double value)
Convert and store a double as an 80-bit float.
virtual RegVal readCCRegFlat(RegIndex idx) const =0
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void setIntRegFlat(RegIndex idx, RegVal val)=0
const uint32_t ccFlagMask
static bool isValidMiscReg(int index)
void setRFlags(ThreadContext *tc, uint64_t val)
Set update the rflags register and internal gem5 state.
virtual RegVal readFloatRegFlat(RegIndex idx) const =0
This is exposed globally, independent of the ISA.
virtual BaseTLB * getITBPtr()=0
virtual TheISA::PCState pcState() const =0
uint64_t getRFlags(ThreadContext *tc)
Reconstruct the rflags register from the internal gem5 register state.
virtual RegVal readCCReg(RegIndex reg_idx) const =0
virtual void setCCReg(RegIndex reg_idx, RegVal val)=0
virtual void setCCRegFlat(RegIndex idx, RegVal val)=0
virtual RegVal readMiscReg(RegIndex misc_reg)=0
uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp)
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
virtual RegVal readIntReg(RegIndex reg_idx) const =0
void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
virtual void flushAll()=0
Remove all entries from the TLB.
virtual BaseTLB * getDTBPtr()=0
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17