condition_register_state.cc (11308:7d8836fd043d) | condition_register_state.cc (11699:c7453f485a5f) |
---|---|
1/* 2 * Copyright (c) 2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 48 unchanged lines hidden (view full) --- 57void 58ConditionRegisterState::init(uint32_t _size) 59{ 60 c_reg.resize(_size); 61 busy.resize(_size, 0); 62} 63 64void | 1/* 2 * Copyright (c) 2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 48 unchanged lines hidden (view full) --- 57void 58ConditionRegisterState::init(uint32_t _size) 59{ 60 c_reg.resize(_size); 61 busy.resize(_size, 0); 62} 63 64void |
65ConditionRegisterState::exec(GPUStaticInst *ii, Wavefront *w) | 65ConditionRegisterState::exec(GPUDynInstPtr ii, Wavefront *w) |
66{ 67 // iterate over all operands 68 for (auto i = 0; i < ii->getNumOperands(); ++i) { 69 // is this a condition register destination operand? 70 if (ii->isCondRegister(i) && ii->isDstOperand(i)) { 71 // mark the register as busy | 66{ 67 // iterate over all operands 68 for (auto i = 0; i < ii->getNumOperands(); ++i) { 69 // is this a condition register destination operand? 70 if (ii->isCondRegister(i) && ii->isDstOperand(i)) { 71 // mark the register as busy |
72 markReg(ii->getRegisterIndex(i), 1); | 72 markReg(ii->getRegisterIndex(i, ii), 1); |
73 uint32_t pipeLen = w->computeUnit->spBypassLength(); 74 75 // schedule an event for marking the register as ready 76 w->computeUnit-> | 73 uint32_t pipeLen = w->computeUnit->spBypassLength(); 74 75 // schedule an event for marking the register as ready 76 w->computeUnit-> |
77 registerEvent(w->simdId, ii->getRegisterIndex(i), | 77 registerEvent(w->simdId, ii->getRegisterIndex(i, ii), |
78 ii->getOperandSize(i), 79 w->computeUnit->shader->tick_cnt + 80 w->computeUnit->shader->ticks(pipeLen), 0); 81 } 82 } 83} | 78 ii->getOperandSize(i), 79 w->computeUnit->shader->tick_cnt + 80 w->computeUnit->shader->ticks(pipeLen), 0); 81 } 82 } 83} |