Deleted Added
sdiff udiff text old ( 7175:db22937a4e0f ) new ( 7190:e6240d7be030 )
full compact
1/*
2 * Copyright (c) 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

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

62 uint32_t addr = 0;
63
64 if (!up)
65 addr = (ones << 2) - 4;
66
67 if (!index)
68 addr += 4;
69
70 StaticInstPtr *uop = microOps;
71 StaticInstPtr wbUop;
72 if (writeback) {
73 if (up) {
74 wbUop = new MicroAddiUop(machInst, rn, rn, ones * 4);
75 } else {
76 wbUop = new MicroSubiUop(machInst, rn, rn, ones * 4);
77 }
78 }
79
80 // Add 0 to Rn and stick it in ureg0.
81 // This is equivalent to a move.
82 *uop = new MicroAddiUop(machInst, INTREG_UREG0, rn, 0);
83
84 // Write back at the start for loads. This covers the ldm exception return
85 // case where the base needs to be written in the old mode. Stores may need
86 // the original value of the base, but they don't change mode and can
87 // write back at the end like before.
88 if (load && writeback) {
89 *++uop = wbUop;
90 }
91
92 unsigned reg = 0;
93 bool force_user = user & !bits(reglist, 15);
94 bool exception_ret = user & bits(reglist, 15);
95
96 for (int i = 0; i < ones; i++) {
97 // Find the next register.
98 while (!bits(regs, reg))
99 reg++;
100 replaceBits(regs, reg, 0);
101
102 unsigned regIdx = reg;
103 if (force_user) {
104 regIdx = intRegForceUser(regIdx);
105 }
106
107 if (load) {
108 if (reg == INTREG_PC && exception_ret) {
109 // This must be the exception return form of ldm.
110 *++uop = new MicroLdrRetUop(machInst, regIdx,
111 INTREG_UREG0, up, addr);
112 } else {
113 *++uop = new MicroLdrUop(machInst, regIdx,
114 INTREG_UREG0, up, addr);
115 }
116 } else {
117 *++uop = new MicroStrUop(machInst, regIdx, INTREG_UREG0, up, addr);
118 }
119
120 if (up)
121 addr += 4;
122 else
123 addr -= 4;
124 }
125
126 if (!load && writeback) {
127 *++uop = wbUop;
128 }
129
130 (*uop)->setLastMicroop();
131}
132
133MacroVFPMemOp::MacroVFPMemOp(const char *mnem, ExtMachInst machInst,
134 OpClass __opClass, IntRegIndex rn,
135 RegIndex vd, bool single, bool up,
136 bool writeback, bool load, uint32_t offset) :
137 PredMacroOp(mnem, machInst, __opClass)
138{

--- 55 unchanged lines hidden ---