macromem.isa (6755:e9970c1bccdd) macromem.isa (6758:06d26015e4f1)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007-2008 The Florida State University
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

205 if (machInst.puswl.prepost)
206 addr += 4;
207
208 // Add 0 to Rn and stick it in ureg0.
209 // This is equivalent to a move.
210 microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
211
212 unsigned reg = 0;
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007-2008 The Florida State University
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

205 if (machInst.puswl.prepost)
206 addr += 4;
207
208 // Add 0 to Rn and stick it in ureg0.
209 // This is equivalent to a move.
210 microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
211
212 unsigned reg = 0;
213 bool forceUser = machInst.puswl.psruser;
213 bool force_user = machInst.puswl.psruser & !OPCODE_15;
214 bool exception_ret = machInst.puswl.psruser & OPCODE_15;
215
214 for (int i = 1; i < ones + 1; i++) {
215 // Find the next register.
216 while (!bits(regs, reg))
217 reg++;
218 replaceBits(regs, reg, 0);
219
220 unsigned regIdx = reg;
216 for (int i = 1; i < ones + 1; i++) {
217 // Find the next register.
218 while (!bits(regs, reg))
219 reg++;
220 replaceBits(regs, reg, 0);
221
222 unsigned regIdx = reg;
221 if (forceUser) {
223 if (force_user) {
222 regIdx = intRegForceUser(regIdx);
223 }
224
225 if (machInst.puswl.loadOp) {
224 regIdx = intRegForceUser(regIdx);
225 }
226
227 if (machInst.puswl.loadOp) {
226 if (reg == INTREG_PC && forceUser) {
228 if (reg == INTREG_PC && exception_ret) {
227 // This must be the exception return form of ldm.
228 microOps[i] =
229 new MicroLdrRetUop(machInst, regIdx, INTREG_UREG0, addr);
230 } else {
231 microOps[i] =
232 new MicroLdrUop(machInst, regIdx, INTREG_UREG0, addr);
233 }
234 } else {

--- 131 unchanged lines hidden ---
229 // This must be the exception return form of ldm.
230 microOps[i] =
231 new MicroLdrRetUop(machInst, regIdx, INTREG_UREG0, addr);
232 } else {
233 microOps[i] =
234 new MicroLdrUop(machInst, regIdx, INTREG_UREG0, addr);
235 }
236 } else {

--- 131 unchanged lines hidden ---