Deleted Added
sdiff udiff text old ( 6725:c469a9365a4a ) new ( 6726:a5322e816a2a )
full compact
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

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

175
176def template MacroStoreConstructor {{
177inline %(class_name)s::%(class_name)s(ExtMachInst machInst)
178 : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s)
179{
180 %(constructor)s;
181 uint32_t regs = reglist;
182 uint32_t addr = 0;
183
184 if (!up)
185 addr = (ones << 2) - 4;
186
187 if (prepost)
188 addr += 4;
189
190 // Add 0 to Rn and stick it in ureg0.
191 // This is equivalent to a move.
192 microOps[0] = new MicroAddiUop(machInst, INTREG_UREG0, RN, 0);
193
194 unsigned reg = 0;
195 for (int i = 1; i < ones + 1; i++) {
196 // Find the next register.
197 while (!bits(regs, reg))
198 reg++;
199 replaceBits(regs, reg, 0);
200
201 if (loadop)
202 microOps[i] = new MicroLdrUop(machInst, reg, INTREG_UREG0, addr);
203 else
204 microOps[i] = new MicroStrUop(machInst, reg, INTREG_UREG0, addr);
205
206 if (up)
207 addr += 4;
208 else
209 addr -= 4;
210 }
211
212 StaticInstPtr &lastUop = microOps[numMicroops - 1];
213 if (writeback) {
214 if (up) {
215 lastUop = new MicroAddiUop(machInst, RN, RN, ones * 4);
216 } else {
217 lastUop = new MicroSubiUop(machInst, RN, RN, ones * 4);
218 }
219 }
220 lastUop->setLastMicroop();
221}

--- 111 unchanged lines hidden ---