1/* 2 * Copyright (c) 2004-2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 18 unchanged lines hidden (view full) --- 27 * 28 * Authors: Kevin Lim 29 * Korey Sewell 30 */ 31 32#include <limits> 33#include <vector> 34 |
35#include "sim/core.hh" |
36 37#include "cpu/o3/fu_pool.hh" 38#include "cpu/o3/inst_queue.hh" 39 40template <class Impl> 41InstructionQueue<Impl>::FUCompletion::FUCompletion(DynInstPtr &_inst, 42 int fu_idx, 43 InstructionQueue<Impl> *iq_ptr) --- 780 unchanged lines hidden (view full) --- 824 "to execute.\n", inst); 825 826 NonSpecMapIt inst_it = nonSpecInsts.find(inst); 827 828 assert(inst_it != nonSpecInsts.end()); 829 830 unsigned tid = (*inst_it).second->threadNumber; 831 |
832 (*inst_it).second->setCanIssue(); 833 834 if (!(*inst_it).second->isMemRef()) { 835 addIfReady((*inst_it).second); 836 } else { 837 memDepUnit[tid].nonSpecInstReady((*inst_it).second); 838 } 839 --- 115 unchanged lines hidden (view full) --- 955 "the ready list, PC %#x opclass:%i [sn:%lli].\n", 956 ready_inst->readPC(), op_class, ready_inst->seqNum); 957} 958 959template <class Impl> 960void 961InstructionQueue<Impl>::rescheduleMemInst(DynInstPtr &resched_inst) 962{ |
963 memDepUnit[resched_inst->threadNumber].reschedule(resched_inst); 964} 965 966template <class Impl> 967void 968InstructionQueue<Impl>::replayMemInst(DynInstPtr &replay_inst) 969{ 970 memDepUnit[replay_inst->threadNumber].replay(replay_inst); --- 8 unchanged lines hidden (view full) --- 979 DPRINTF(IQ, "Completing mem instruction PC:%#x [sn:%lli]\n", 980 completed_inst->readPC(), completed_inst->seqNum); 981 982 ++freeEntries; 983 984 completed_inst->memOpDone = true; 985 986 memDepUnit[tid].completed(completed_inst); |
987 |
988 count[tid]--; 989} 990 991template <class Impl> 992void 993InstructionQueue<Impl>::violation(DynInstPtr &store, 994 DynInstPtr &faulting_load) 995{ --- 83 unchanged lines hidden (view full) --- 1079 if (!squashed_inst->isReadySrcRegIdx(src_reg_idx) && 1080 src_reg < numPhysRegs) { 1081 dependGraph.remove(src_reg, squashed_inst); 1082 } 1083 1084 1085 ++iqSquashedOperandsExamined; 1086 } |
1087 } else if (!squashed_inst->isStoreConditional() || !squashed_inst->isCompleted()) { |
1088 NonSpecMapIt ns_inst_it = 1089 nonSpecInsts.find(squashed_inst->seqNum); 1090 assert(ns_inst_it != nonSpecInsts.end()); |
1091 |
1092 (*ns_inst_it).second = NULL; |
1093 |
1094 nonSpecInsts.erase(ns_inst_it); |
1095 |
1096 ++iqSquashedNonSpecRemoved; |
1097 } 1098 1099 // Might want to also clear out the head of the dependency graph. 1100 1101 // Mark it as squashed within the IQ. 1102 squashed_inst->setSquashedInIQ(); 1103 1104 // @todo: Remove this hack where several statuses are set so the --- 303 unchanged lines hidden --- |