Lines Matching full:cunit
35 static TGT_LIR *loadWordDisp(CompilationUnit *cUnit, int rBase,
38 return loadBaseDisp(cUnit, NULL, rBase, displacement, rDest, kWord,
42 static TGT_LIR *storeWordDisp(CompilationUnit *cUnit, int rBase,
45 return storeBaseDisp(cUnit, rBase, displacement, rSrc, kWord);
53 static void loadValueDirect(CompilationUnit *cUnit, RegLocation rlSrc,
56 rlSrc = dvmCompilerUpdateLoc(cUnit, rlSrc);
58 genRegCopy(cUnit, reg1, rlSrc.lowReg);
60 loadWordDisp(cUnit, rSELF, offsetof(Thread, interpSave.retval), reg1);
63 loadWordDisp(cUnit, rFP, dvmCompilerS2VReg(cUnit, rlSrc.sRegLow) << 2,
73 static void loadValueDirectFixed(CompilationUnit *cUnit, RegLocation rlSrc,
76 dvmCompilerClobber(cUnit, reg1);
77 dvmCompilerMarkInUse(cUnit, reg1);
78 loadValueDirect(cUnit, rlSrc, reg1);
86 static void loadValueDirectWide(CompilationUnit *cUnit, RegLocation rlSrc,
89 rlSrc = dvmCompilerUpdateLocWide(cUnit, rlSrc);
91 genRegCopyWide(cUnit, regLo, regHi, rlSrc.lowReg, rlSrc.highReg);
93 loadBaseDispWide(cUnit, NULL, rSELF,
98 loadBaseDispWide(cUnit, NULL, rFP,
99 dvmCompilerS2VReg(cUnit, rlSrc.sRegLow) << 2,
109 static void loadValueDirectWideFixed(CompilationUnit *cUnit, RegLocation rlSrc,
112 dvmCompilerClobber(cUnit, regLo);
113 dvmCompilerClobber(cUnit, regHi);
114 dvmCompilerMarkInUse(cUnit, regLo);
115 dvmCompilerMarkInUse(cUnit, regHi);
116 loadValueDirectWide(cUnit, rlSrc, regLo, regHi);
119 static RegLocation loadValue(CompilationUnit *cUnit, RegLocation rlSrc,
122 rlSrc = dvmCompilerEvalLoc(cUnit, rlSrc, opKind, false);
124 loadValueDirect(cUnit, rlSrc, rlSrc.lowReg);
126 dvmCompilerMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow);
128 loadWordDisp(cUnit, rSELF, offsetof(Thread, interpSave.retval),
131 dvmCompilerClobber(cUnit, rlSrc.lowReg);
136 static void storeValue(CompilationUnit *cUnit, RegLocation rlDest,
143 dvmCompilerKillNullCheckedLoc(cUnit, rlDest);
144 rlSrc = dvmCompilerUpdateLoc(cUnit, rlSrc);
145 rlDest = dvmCompilerUpdateLoc(cUnit, rlDest);
147 if (dvmCompilerIsLive(cUnit, rlSrc.lowReg) ||
150 rlDest = dvmCompilerEvalLoc(cUnit, rlDest, kAnyReg, false);
151 genRegCopy(cUnit, rlDest.lowReg, rlSrc.lowReg);
155 dvmCompilerClobber(cUnit, rlSrc.lowReg);
159 rlDest = dvmCompilerEvalLoc(cUnit, rlDest, kAnyReg, false);
160 loadValueDirect(cUnit, rlSrc, rlDest.lowReg);
164 dvmCompilerMarkLive(cUnit, rlDest.lowReg, rlDest.sRegLow);
165 dvmCompilerMarkDirty(cUnit, rlDest.lowReg);
169 storeBaseDisp(cUnit, rSELF, offsetof(Thread, interpSave.retval),
171 dvmCompilerClobber(cUnit, rlDest.lowReg);
173 dvmCompilerResetDefLoc(cUnit, rlDest);
174 if (dvmCompilerLiveOut(cUnit, rlDest.sRegLow)) {
175 defStart = (LIR *)cUnit->lastLIRInsn;
176 int vReg = dvmCompilerS2VReg(cUnit, rlDest.sRegLow);
177 storeBaseDisp(cUnit, rFP, vReg << 2, rlDest.lowReg, kWord);
178 dvmCompilerMarkClean(cUnit, rlDest.lowReg);
179 defEnd = (LIR *)cUnit->lastLIRInsn;
180 dvmCompilerMarkDef(cUnit, rlDest, defStart, defEnd);
185 static RegLocation loadValueWide(CompilationUnit *cUnit, RegLocation rlSrc,
189 rlSrc = dvmCompilerEvalLoc(cUnit, rlSrc, opKind, false);
191 loadValueDirectWide(cUnit, rlSrc, rlSrc.lowReg, rlSrc.highReg);
193 dvmCompilerMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow);
194 dvmCompilerMarkLive(cUnit, rlSrc.highReg,
197 loadBaseDispWide(cUnit, NULL, rSELF,
201 dvmCompilerClobber(cUnit, rlSrc.lowReg);
202 dvmCompilerClobber(cUnit, rlSrc.highReg);
207 static void storeValueWide(CompilationUnit *cUnit, RegLocation rlDest,
215 dvmCompilerKillNullCheckedLoc(cUnit, rlDest);
217 if (dvmCompilerIsLive(cUnit, rlSrc.lowReg) ||
218 dvmCompilerIsLive(cUnit, rlSrc.highReg) ||
221 rlDest = dvmCompilerEvalLoc(cUnit, rlDest, kAnyReg, false);
222 genRegCopyWide(cUnit, rlDest.lowReg, rlDest.highReg,
228 dvmCompilerClobber(cUnit, rlSrc.lowReg);
229 dvmCompilerClobber(cUnit, rlSrc.highReg);
233 rlDest = dvmCompilerEvalLoc(cUnit, rlDest, kAnyReg, false);
234 loadValueDirectWide(cUnit, rlSrc, rlDest.lowReg,
239 dvmCompilerMarkLive(cUnit, rlDest.lowReg, rlDest.sRegLow);
240 dvmCompilerMarkLive(cUnit, rlDest.highReg,
242 dvmCompilerMarkDirty(cUnit, rlDest.lowReg);
243 dvmCompilerMarkDirty(cUnit, rlDest.highReg);
244 dvmCompilerMarkPair(cUnit, rlDest.lowReg, rlDest.highReg);
248 storeBaseDispWide(cUnit, rSELF, offsetof(Thread, interpSave.retval),
250 dvmCompilerClobber(cUnit, rlDest.lowReg);
251 dvmCompilerClobber(cUnit, rlDest.highReg);
253 dvmCompilerResetDefLocWide(cUnit, rlDest);
254 if (dvmCompilerLiveOut(cUnit, rlDest.sRegLow) ||
255 dvmCompilerLiveOut(cUnit, dvmCompilerSRegHi(rlDest.sRegLow))) {
256 defStart = (LIR *)cUnit->lastLIRInsn;
257 int vReg = dvmCompilerS2VReg(cUnit, rlDest.sRegLow);
258 assert((vReg+1) == dvmCompilerS2VReg(cUnit,
260 storeBaseDispWide(cUnit, rFP, vReg << 2, rlDest.lowReg,
262 dvmCompilerMarkClean(cUnit, rlDest.lowReg);
263 dvmCompilerMarkClean(cUnit, rlDest.highReg);
264 defEnd = (LIR *)cUnit->lastLIRInsn;
265 dvmCompilerMarkDefWide(cUnit, rlDest, defStart, defEnd);