1/* 2 * Copyright (c) 2011,2013 ARM Limited 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 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 --- 85 unchanged lines hidden (view full) --- 94 enum { 95 MaxInstSrcRegs = TheISA::MaxInstSrcRegs, /// Max source regs 96 MaxInstDestRegs = TheISA::MaxInstDestRegs /// Max dest regs 97 }; 98 99 union Result { 100 uint64_t integer; 101 double dbl; |
102 void set(uint64_t i) { integer = i; } 103 void set(double d) { dbl = d; } |
104 void get(uint64_t& i) { i = integer; } 105 void get(double& d) { d = dbl; } |
106 }; 107 108 protected: 109 enum Status { 110 IqEntry, /// Instruction is in the IQ 111 RobEntry, /// Instruction is in the ROB 112 LsqEntry, /// Instruction is in the LSQ 113 Completed, /// Instruction has completed --- 402 unchanged lines hidden (view full) --- 516 bool isLoad() const { return staticInst->isLoad(); } 517 bool isStore() const { return staticInst->isStore(); } 518 bool isStoreConditional() const 519 { return staticInst->isStoreConditional(); } 520 bool isInstPrefetch() const { return staticInst->isInstPrefetch(); } 521 bool isDataPrefetch() const { return staticInst->isDataPrefetch(); } 522 bool isInteger() const { return staticInst->isInteger(); } 523 bool isFloating() const { return staticInst->isFloating(); } |
524 bool isControl() const { return staticInst->isControl(); } 525 bool isCall() const { return staticInst->isCall(); } 526 bool isReturn() const { return staticInst->isReturn(); } 527 bool isDirectCtrl() const { return staticInst->isDirectCtrl(); } 528 bool isIndirectCtrl() const { return staticInst->isIndirectCtrl(); } 529 bool isCondCtrl() const { return staticInst->isCondCtrl(); } 530 bool isUncondCtrl() const { return staticInst->isUncondCtrl(); } 531 bool isCondDelaySlot() const { return staticInst->isCondDelaySlot(); } --- 13 unchanged lines hidden (view full) --- 545 bool isSyscall() const { return staticInst->isSyscall(); } 546 bool isMacroop() const { return staticInst->isMacroop(); } 547 bool isMicroop() const { return staticInst->isMicroop(); } 548 bool isDelayedCommit() const { return staticInst->isDelayedCommit(); } 549 bool isLastMicroop() const { return staticInst->isLastMicroop(); } 550 bool isFirstMicroop() const { return staticInst->isFirstMicroop(); } 551 bool isMicroBranch() const { return staticInst->isMicroBranch(); } 552 |
553 /** Temporarily sets this instruction as a serialize before instruction. */ 554 void setSerializeBefore() { status.set(SerializeBefore); } 555 556 /** Clears the serializeBefore part of this instruction. */ 557 void clearSerializeBefore() { status.reset(SerializeBefore); } 558 559 /** Checks if this serializeBefore is only temporarily set. */ 560 bool isTempSerializeBefore() { return status[SerializeBefore]; } --- 30 unchanged lines hidden (view full) --- 591 /** Returns the number of destination registers. */ 592 int8_t numDestRegs() const { return staticInst->numDestRegs(); } 593 594 // the following are used to track physical register usage 595 // for machines with separate int & FP reg files 596 int8_t numFPDestRegs() const { return staticInst->numFPDestRegs(); } 597 int8_t numIntDestRegs() const { return staticInst->numIntDestRegs(); } 598 int8_t numCCDestRegs() const { return staticInst->numCCDestRegs(); } |
599 600 /** Returns the logical register index of the i'th destination register. */ 601 RegIndex destRegIdx(int i) const { return staticInst->destRegIdx(i); } 602 603 /** Returns the logical register index of the i'th source register. */ 604 RegIndex srcRegIdx(int i) const { return staticInst->srcRegIdx(i); } 605 606 /** Pops a result off the instResult queue */ --- 43 unchanged lines hidden (view full) --- 650 } 651 652 /** Records an fp register being set to an integer value. */ 653 void setFloatRegOperandBits(const StaticInst *si, int idx, FloatRegBits val) 654 { 655 setResult<uint64_t>(val); 656 } 657 |
658 /** Records that one of the source registers is ready. */ 659 void markSrcRegReady(); 660 661 /** Marks a specific register as ready. */ 662 void markSrcRegReady(RegIndex src_idx); 663 664 /** Returns if a source register is ready. */ 665 bool isReadySrcRegIdx(int idx) const --- 410 unchanged lines hidden --- |