ARM: Make the exception return form of ldm restore CPSR.
This commit is contained in:
parent
903fb8c73d
commit
9127ee5ac8
1 changed files with 10 additions and 3 deletions
|
@ -210,6 +210,7 @@ inline %(class_name)s::%(class_name)s(ExtMachInst machInst)
|
|||
microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
|
||||
|
||||
unsigned reg = 0;
|
||||
bool forceUser = machInst.puswl.psruser;
|
||||
for (int i = 1; i < ones + 1; i++) {
|
||||
// Find the next register.
|
||||
while (!bits(regs, reg))
|
||||
|
@ -217,13 +218,19 @@ inline %(class_name)s::%(class_name)s(ExtMachInst machInst)
|
|||
replaceBits(regs, reg, 0);
|
||||
|
||||
unsigned regIdx = reg;
|
||||
if (machInst.puswl.psruser) {
|
||||
if (forceUser) {
|
||||
regIdx = intRegForceUser(regIdx);
|
||||
}
|
||||
|
||||
if (machInst.puswl.loadOp) {
|
||||
if (reg == INTREG_PC && forceUser) {
|
||||
// This must be the exception return form of ldm.
|
||||
microOps[i] =
|
||||
new MicroLdrRetUop(machInst, regIdx, INTREG_UREG0, addr);
|
||||
} else {
|
||||
microOps[i] =
|
||||
new MicroLdrUop(machInst, regIdx, INTREG_UREG0, addr);
|
||||
}
|
||||
} else {
|
||||
microOps[i] =
|
||||
new MicroStrUop(machInst, regIdx, INTREG_UREG0, addr);
|
||||
|
|
Loading…
Reference in a new issue