utility.cc (10318:98771a936b61) utility.cc (10338:8bee5f4edb92)
1/*
1/*
2 * Copyright (c) 2009-2013 ARM Limited
2 * Copyright (c) 2009-2014 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 136 unchanged lines hidden (view full) ---

147copyRegs(ThreadContext *src, ThreadContext *dest)
148{
149 for (int i = 0; i < NumIntRegs; i++)
150 dest->setIntRegFlat(i, src->readIntRegFlat(i));
151
152 for (int i = 0; i < NumFloatRegs; i++)
153 dest->setFloatRegFlat(i, src->readFloatRegFlat(i));
154
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

--- 136 unchanged lines hidden (view full) ---

147copyRegs(ThreadContext *src, ThreadContext *dest)
148{
149 for (int i = 0; i < NumIntRegs; i++)
150 dest->setIntRegFlat(i, src->readIntRegFlat(i));
151
152 for (int i = 0; i < NumFloatRegs; i++)
153 dest->setFloatRegFlat(i, src->readFloatRegFlat(i));
154
155 // Would need to add condition-code regs if implemented
156 assert(NumCCRegs == 0);
155 for (int i = 0; i < NumCCRegs; i++)
156 dest->setCCReg(i, src->readCCReg(i));
157
158 for (int i = 0; i < NumMiscRegs; i++)
159 dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i));
160
161 // setMiscReg "with effect" will set the misc register mapping correctly.
162 // e.g. updateRegMap(val)
163 dest->setMiscReg(MISCREG_CPSR, src->readMiscRegNoEffect(MISCREG_CPSR));
164

--- 819 unchanged lines hidden ---
157
158 for (int i = 0; i < NumMiscRegs; i++)
159 dest->setMiscRegNoEffect(i, src->readMiscRegNoEffect(i));
160
161 // setMiscReg "with effect" will set the misc register mapping correctly.
162 // e.g. updateRegMap(val)
163 dest->setMiscReg(MISCREG_CPSR, src->readMiscRegNoEffect(MISCREG_CPSR));
164

--- 819 unchanged lines hidden ---