macromem.cc (7170:6f97f5107abe) | macromem.cc (7175:db22937a4e0f) |
---|---|
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 --- 104 unchanged lines hidden (view full) --- 113 lastUop = new MicroAddiUop(machInst, rn, rn, ones * 4); 114 } else { 115 lastUop = new MicroSubiUop(machInst, rn, rn, ones * 4); 116 } 117 } 118 lastUop->setLastMicroop(); 119} 120 | 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 --- 104 unchanged lines hidden (view full) --- 113 lastUop = new MicroAddiUop(machInst, rn, rn, ones * 4); 114 } else { 115 lastUop = new MicroSubiUop(machInst, rn, rn, ones * 4); 116 } 117 } 118 lastUop->setLastMicroop(); 119} 120 |
121MacroVFPMemOp::MacroVFPMemOp(const char *mnem, ExtMachInst machInst, 122 OpClass __opClass, IntRegIndex rn, 123 RegIndex vd, bool single, bool up, 124 bool writeback, bool load, uint32_t offset) : 125 PredMacroOp(mnem, machInst, __opClass) 126{ 127 const int maxMicroops = 17; 128 microOps = new StaticInstPtr[maxMicroops]; 129 int i = 0; 130 131 // The lowest order bit selects fldmx (set) or fldmd (clear). These seem 132 // to be functionally identical except that fldmx is deprecated. For now 133 // we'll assume they're otherwise interchangable. 134 int count = (single ? offset : (offset / 2)); 135 if (count == 0 || count > NumFloatArchRegs) 136 warn_once("Bad offset field for VFP load/store multiple.\n"); 137 if (count == 0) { 138 // Force there to be at least one microop so the macroop makes sense. 139 writeback = true; 140 } 141 if (count > NumFloatArchRegs) 142 count = NumFloatArchRegs; 143 144 uint32_t addr = 0; 145 146 if (up) 147 addr = -4 * offset; 148 149 for (int j = 0; j < count; j++) { 150 if (load) { 151 microOps[i++] = new MicroLdrFpUop(machInst, vd++, rn, 152 true, addr); 153 if (!single) 154 microOps[i++] = new MicroLdrFpUop(machInst, vd++, rn, 155 true, addr + 4); 156 } else { 157 microOps[i++] = new MicroStrFpUop(machInst, vd++, rn, 158 true, addr); 159 if (!single) 160 microOps[i++] = new MicroStrFpUop(machInst, vd++, rn, 161 true, addr + 4); 162 } 163 addr += (single ? 4 : 8); 164 } 165 166 if (writeback) { 167 if (up) { 168 microOps[i++] = 169 new MicroAddiUop(machInst, rn, rn, 4 * offset); 170 } else { 171 microOps[i++] = 172 new MicroSubiUop(machInst, rn, rn, 4 * offset); 173 } 174 } 175 176 numMicroops = i; 177 assert(numMicroops <= maxMicroops); 178 microOps[numMicroops - 1]->setLastMicroop(); |
|
121} | 179} |
180 181} |
|