ARM: Differentiate between LDM exception return and LDM user regs.
This commit is contained in:
parent
1470dae8e9
commit
0916c376a9
1 changed files with 5 additions and 3 deletions
|
@ -210,7 +210,9 @@ inline %(class_name)s::%(class_name)s(ExtMachInst machInst)
|
||||||
microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
|
microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
|
||||||
|
|
||||||
unsigned reg = 0;
|
unsigned reg = 0;
|
||||||
bool forceUser = machInst.puswl.psruser;
|
bool force_user = machInst.puswl.psruser & !OPCODE_15;
|
||||||
|
bool exception_ret = machInst.puswl.psruser & OPCODE_15;
|
||||||
|
|
||||||
for (int i = 1; i < ones + 1; i++) {
|
for (int i = 1; i < ones + 1; i++) {
|
||||||
// Find the next register.
|
// Find the next register.
|
||||||
while (!bits(regs, reg))
|
while (!bits(regs, reg))
|
||||||
|
@ -218,12 +220,12 @@ inline %(class_name)s::%(class_name)s(ExtMachInst machInst)
|
||||||
replaceBits(regs, reg, 0);
|
replaceBits(regs, reg, 0);
|
||||||
|
|
||||||
unsigned regIdx = reg;
|
unsigned regIdx = reg;
|
||||||
if (forceUser) {
|
if (force_user) {
|
||||||
regIdx = intRegForceUser(regIdx);
|
regIdx = intRegForceUser(regIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (machInst.puswl.loadOp) {
|
if (machInst.puswl.loadOp) {
|
||||||
if (reg == INTREG_PC && forceUser) {
|
if (reg == INTREG_PC && exception_ret) {
|
||||||
// This must be the exception return form of ldm.
|
// This must be the exception return form of ldm.
|
||||||
microOps[i] =
|
microOps[i] =
|
||||||
new MicroLdrRetUop(machInst, regIdx, INTREG_UREG0, addr);
|
new MicroLdrRetUop(machInst, regIdx, INTREG_UREG0, addr);
|
||||||
|
|
Loading…
Reference in a new issue