utility.cc (7720:65d338a8dba4) | utility.cc (7748:7bf78d12b359) |
---|---|
1/* 2 * Copyright (c) 2009-2010 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 119 unchanged lines hidden (view full) --- 128void 129skipFunction(ThreadContext *tc) 130{ 131 TheISA::PCState newPC = tc->pcState(); 132 newPC.set(tc->readIntReg(ReturnAddressReg) & ~ULL(1)); 133 tc->pcState(newPC); 134} 135 | 1/* 2 * Copyright (c) 2009-2010 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 119 unchanged lines hidden (view full) --- 128void 129skipFunction(ThreadContext *tc) 130{ 131 TheISA::PCState newPC = tc->pcState(); 132 newPC.set(tc->readIntReg(ReturnAddressReg) & ~ULL(1)); 133 tc->pcState(newPC); 134} 135 |
136void 137copyRegs(ThreadContext *src, ThreadContext *dest) 138{ 139 int i; 140 for(i = 0; i < TheISA::NumIntRegs; i++) 141 dest->setIntReg(i, src->readIntReg(i)); 142 for(i = 0; i < TheISA::NumFloatRegs; i++) 143 dest->setFloatReg(i, src->readFloatReg(i)); 144 for(i = 0; i < TheISA::NumMiscRegs; i++) 145 dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i)); |
|
136 | 146 |
147 // setMiscReg "with effect" will set the misc register mapping correctly. 148 // e.g. updateRegMap(val) 149 dest->setMiscReg(MISCREG_CPSR, src->readMiscRegNoEffect(MISCREG_CPSR)); 150 151 // Lastly copy PC/NPC 152 dest->pcState(src->pcState()); |
|
137} | 153} |
154} |
|