buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 17 | namespace art { |
| 18 | |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 19 | /* |
| 20 | * This file contains target-independent codegen and support, and is |
| 21 | * included by: |
| 22 | * |
| 23 | * $(TARGET_ARCH)/Codegen-$(TARGET_ARCH_VARIANT).c |
| 24 | * |
| 25 | * which combines this common code with specific support found in the |
| 26 | * applicable directories below this one. |
| 27 | * |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 28 | */ |
| 29 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 30 | /* |
| 31 | * Load an immediate value into a fixed or temp register. Target |
| 32 | * register is clobbered, and marked inUse. |
| 33 | */ |
| 34 | LIR* loadConstant(CompilationUnit* cUnit, int rDest, int value) |
| 35 | { |
| 36 | if (oatIsTemp(cUnit, rDest)) { |
| 37 | oatClobber(cUnit, rDest); |
| 38 | oatMarkInUse(cUnit, rDest); |
| 39 | } |
| 40 | return loadConstantNoClobber(cUnit, rDest, value); |
| 41 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 42 | |
| 43 | /* Load a word at base + displacement. Displacement must be word multiple */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 44 | LIR* loadWordDisp(CompilationUnit* cUnit, int rBase, int displacement, |
| 45 | int rDest) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 46 | { |
| 47 | return loadBaseDisp(cUnit, NULL, rBase, displacement, rDest, kWord, |
| 48 | INVALID_SREG); |
| 49 | } |
| 50 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 51 | LIR* storeWordDisp(CompilationUnit* cUnit, int rBase, int displacement, |
| 52 | int rSrc) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 53 | { |
| 54 | return storeBaseDisp(cUnit, rBase, displacement, rSrc, kWord); |
| 55 | } |
| 56 | |
| 57 | /* |
| 58 | * Load a Dalvik register into a physical register. Take care when |
| 59 | * using this routine, as it doesn't perform any bookkeeping regarding |
| 60 | * register liveness. That is the responsibility of the caller. |
| 61 | */ |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 62 | void loadValueDirect(CompilationUnit* cUnit, RegLocation rlSrc, int rDest) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 63 | { |
| 64 | rlSrc = oatUpdateLoc(cUnit, rlSrc); |
| 65 | if (rlSrc.location == kLocPhysReg) { |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 66 | opRegCopy(cUnit, rDest, rlSrc.lowReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 67 | } else { |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 68 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 69 | (rlSrc.location == kLocCompilerTemp)); |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 70 | loadWordDisp(cUnit, rSP, oatSRegOffset(cUnit, rlSrc.sRegLow), rDest); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 71 | } |
| 72 | } |
| 73 | |
| 74 | /* |
| 75 | * Similar to loadValueDirect, but clobbers and allocates the target |
| 76 | * register. Should be used when loading to a fixed register (for example, |
| 77 | * loading arguments to an out of line call. |
| 78 | */ |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 79 | void loadValueDirectFixed(CompilationUnit* cUnit, RegLocation rlSrc, int rDest) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 80 | { |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 81 | oatClobber(cUnit, rDest); |
| 82 | oatMarkInUse(cUnit, rDest); |
| 83 | loadValueDirect(cUnit, rlSrc, rDest); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | /* |
| 87 | * Load a Dalvik register pair into a physical register[s]. Take care when |
| 88 | * using this routine, as it doesn't perform any bookkeeping regarding |
| 89 | * register liveness. That is the responsibility of the caller. |
| 90 | */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 91 | void loadValueDirectWide(CompilationUnit* cUnit, RegLocation rlSrc, int regLo, |
| 92 | int regHi) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 93 | { |
| 94 | rlSrc = oatUpdateLocWide(cUnit, rlSrc); |
| 95 | if (rlSrc.location == kLocPhysReg) { |
buzbee | 82488f5 | 2012-03-02 08:20:26 -0800 | [diff] [blame] | 96 | opRegCopyWide(cUnit, regLo, regHi, rlSrc.lowReg, rlSrc.highReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 97 | } else { |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 98 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 99 | (rlSrc.location == kLocCompilerTemp)); |
buzbee | 67bc236 | 2011-10-11 18:08:40 -0700 | [diff] [blame] | 100 | loadBaseDispWide(cUnit, NULL, rSP, |
| 101 | oatSRegOffset(cUnit, rlSrc.sRegLow), |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 102 | regLo, regHi, INVALID_SREG); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /* |
| 107 | * Similar to loadValueDirect, but clobbers and allocates the target |
| 108 | * registers. Should be used when loading to a fixed registers (for example, |
| 109 | * loading arguments to an out of line call. |
| 110 | */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 111 | void loadValueDirectWideFixed(CompilationUnit* cUnit, RegLocation rlSrc, |
| 112 | int regLo, int regHi) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 113 | { |
| 114 | oatClobber(cUnit, regLo); |
| 115 | oatClobber(cUnit, regHi); |
| 116 | oatMarkInUse(cUnit, regLo); |
| 117 | oatMarkInUse(cUnit, regHi); |
| 118 | loadValueDirectWide(cUnit, rlSrc, regLo, regHi); |
| 119 | } |
| 120 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 121 | RegLocation loadValue(CompilationUnit* cUnit, RegLocation rlSrc, |
| 122 | RegisterClass opKind) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 123 | { |
| 124 | rlSrc = oatEvalLoc(cUnit, rlSrc, opKind, false); |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 125 | if (rlSrc.location != kLocPhysReg) { |
| 126 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 127 | (rlSrc.location == kLocCompilerTemp)); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 128 | loadValueDirect(cUnit, rlSrc, rlSrc.lowReg); |
| 129 | rlSrc.location = kLocPhysReg; |
| 130 | oatMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow); |
| 131 | } |
| 132 | return rlSrc; |
| 133 | } |
| 134 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 135 | void storeValue(CompilationUnit* cUnit, RegLocation rlDest, RegLocation rlSrc) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 136 | { |
buzbee | 3d66194 | 2012-03-14 17:37:27 -0700 | [diff] [blame] | 137 | #ifndef NDEBUG |
| 138 | /* |
| 139 | * Sanity checking - should never try to store to the same |
| 140 | * ssa name during the compilation of a single instruction |
| 141 | * without an intervening oatClobberSReg(). |
| 142 | */ |
| 143 | DCHECK((cUnit->liveSReg == INVALID_SREG) || |
| 144 | (rlDest.sRegLow != cUnit->liveSReg)); |
| 145 | cUnit->liveSReg = rlDest.sRegLow; |
| 146 | #endif |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 147 | LIR* defStart; |
| 148 | LIR* defEnd; |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 149 | DCHECK(!rlDest.wide); |
| 150 | DCHECK(!rlSrc.wide); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 151 | rlSrc = oatUpdateLoc(cUnit, rlSrc); |
| 152 | rlDest = oatUpdateLoc(cUnit, rlDest); |
| 153 | if (rlSrc.location == kLocPhysReg) { |
| 154 | if (oatIsLive(cUnit, rlSrc.lowReg) || |
buzbee | b29e4d1 | 2011-09-26 15:05:48 -0700 | [diff] [blame] | 155 | oatIsPromoted(cUnit, rlSrc.lowReg) || |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 156 | (rlDest.location == kLocPhysReg)) { |
buzbee | b29e4d1 | 2011-09-26 15:05:48 -0700 | [diff] [blame] | 157 | // Src is live/promoted or Dest has assigned reg. |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 158 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
buzbee | 82488f5 | 2012-03-02 08:20:26 -0800 | [diff] [blame] | 159 | opRegCopy(cUnit, rlDest.lowReg, rlSrc.lowReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 160 | } else { |
| 161 | // Just re-assign the registers. Dest gets Src's regs |
| 162 | rlDest.lowReg = rlSrc.lowReg; |
| 163 | oatClobber(cUnit, rlSrc.lowReg); |
| 164 | } |
| 165 | } else { |
| 166 | // Load Src either into promoted Dest or temps allocated for Dest |
| 167 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
| 168 | loadValueDirect(cUnit, rlSrc, rlDest.lowReg); |
| 169 | } |
| 170 | |
| 171 | // Dest is now live and dirty (until/if we flush it to home location) |
| 172 | oatMarkLive(cUnit, rlDest.lowReg, rlDest.sRegLow); |
| 173 | oatMarkDirty(cUnit, rlDest); |
| 174 | |
| 175 | |
| 176 | oatResetDefLoc(cUnit, rlDest); |
| 177 | if (oatIsDirty(cUnit, rlDest.lowReg) && |
| 178 | oatLiveOut(cUnit, rlDest.sRegLow)) { |
| 179 | defStart = (LIR* )cUnit->lastLIRInsn; |
buzbee | 67bc236 | 2011-10-11 18:08:40 -0700 | [diff] [blame] | 180 | storeBaseDisp(cUnit, rSP, oatSRegOffset(cUnit, rlDest.sRegLow), |
| 181 | rlDest.lowReg, kWord); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 182 | oatMarkClean(cUnit, rlDest); |
| 183 | defEnd = (LIR* )cUnit->lastLIRInsn; |
| 184 | oatMarkDef(cUnit, rlDest, defStart, defEnd); |
| 185 | } |
| 186 | } |
| 187 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 188 | RegLocation loadValueWide(CompilationUnit* cUnit, RegLocation rlSrc, |
| 189 | RegisterClass opKind) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 190 | { |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 191 | DCHECK(rlSrc.wide); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 192 | rlSrc = oatEvalLoc(cUnit, rlSrc, opKind, false); |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 193 | if (rlSrc.location != kLocPhysReg) { |
| 194 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 195 | (rlSrc.location == kLocCompilerTemp)); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 196 | loadValueDirectWide(cUnit, rlSrc, rlSrc.lowReg, rlSrc.highReg); |
| 197 | rlSrc.location = kLocPhysReg; |
| 198 | oatMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow); |
| 199 | oatMarkLive(cUnit, rlSrc.highReg, |
| 200 | oatSRegHi(rlSrc.sRegLow)); |
| 201 | } |
| 202 | return rlSrc; |
| 203 | } |
| 204 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 205 | void storeValueWide(CompilationUnit* cUnit, RegLocation rlDest, |
| 206 | RegLocation rlSrc) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 207 | { |
buzbee | 3d66194 | 2012-03-14 17:37:27 -0700 | [diff] [blame] | 208 | #ifndef NDEBUG |
| 209 | /* |
| 210 | * Sanity checking - should never try to store to the same |
| 211 | * ssa name during the compilation of a single instruction |
| 212 | * without an intervening oatClobberSReg(). |
| 213 | */ |
| 214 | DCHECK((cUnit->liveSReg == INVALID_SREG) || |
| 215 | (rlDest.sRegLow != cUnit->liveSReg)); |
| 216 | cUnit->liveSReg = rlDest.sRegLow; |
| 217 | #endif |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 218 | LIR* defStart; |
| 219 | LIR* defEnd; |
buzbee | ed3e930 | 2011-09-23 17:34:19 -0700 | [diff] [blame] | 220 | DCHECK_EQ(FPREG(rlSrc.lowReg), FPREG(rlSrc.highReg)); |
| 221 | DCHECK(rlDest.wide); |
| 222 | DCHECK(rlSrc.wide); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 223 | if (rlSrc.location == kLocPhysReg) { |
| 224 | if (oatIsLive(cUnit, rlSrc.lowReg) || |
| 225 | oatIsLive(cUnit, rlSrc.highReg) || |
buzbee | b29e4d1 | 2011-09-26 15:05:48 -0700 | [diff] [blame] | 226 | oatIsPromoted(cUnit, rlSrc.lowReg) || |
| 227 | oatIsPromoted(cUnit, rlSrc.highReg) || |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 228 | (rlDest.location == kLocPhysReg)) { |
buzbee | b29e4d1 | 2011-09-26 15:05:48 -0700 | [diff] [blame] | 229 | // Src is live or promoted or Dest has assigned reg. |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 230 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
buzbee | 82488f5 | 2012-03-02 08:20:26 -0800 | [diff] [blame] | 231 | opRegCopyWide(cUnit, rlDest.lowReg, rlDest.highReg, |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 232 | rlSrc.lowReg, rlSrc.highReg); |
| 233 | } else { |
| 234 | // Just re-assign the registers. Dest gets Src's regs |
| 235 | rlDest.lowReg = rlSrc.lowReg; |
| 236 | rlDest.highReg = rlSrc.highReg; |
| 237 | oatClobber(cUnit, rlSrc.lowReg); |
| 238 | oatClobber(cUnit, rlSrc.highReg); |
| 239 | } |
| 240 | } else { |
| 241 | // Load Src either into promoted Dest or temps allocated for Dest |
| 242 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
| 243 | loadValueDirectWide(cUnit, rlSrc, rlDest.lowReg, |
| 244 | rlDest.highReg); |
| 245 | } |
| 246 | |
| 247 | // Dest is now live and dirty (until/if we flush it to home location) |
| 248 | oatMarkLive(cUnit, rlDest.lowReg, rlDest.sRegLow); |
| 249 | oatMarkLive(cUnit, rlDest.highReg, |
| 250 | oatSRegHi(rlDest.sRegLow)); |
| 251 | oatMarkDirty(cUnit, rlDest); |
| 252 | oatMarkPair(cUnit, rlDest.lowReg, rlDest.highReg); |
| 253 | |
| 254 | |
| 255 | oatResetDefLocWide(cUnit, rlDest); |
| 256 | if ((oatIsDirty(cUnit, rlDest.lowReg) || |
| 257 | oatIsDirty(cUnit, rlDest.highReg)) && |
| 258 | (oatLiveOut(cUnit, rlDest.sRegLow) || |
| 259 | oatLiveOut(cUnit, oatSRegHi(rlDest.sRegLow)))) { |
| 260 | defStart = (LIR*)cUnit->lastLIRInsn; |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 261 | DCHECK_EQ((SRegToVReg(cUnit, rlDest.sRegLow)+1), |
| 262 | SRegToVReg(cUnit, oatSRegHi(rlDest.sRegLow))); |
buzbee | 67bc236 | 2011-10-11 18:08:40 -0700 | [diff] [blame] | 263 | storeBaseDispWide(cUnit, rSP, oatSRegOffset(cUnit, rlDest.sRegLow), |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 264 | rlDest.lowReg, rlDest.highReg); |
| 265 | oatMarkClean(cUnit, rlDest); |
| 266 | defEnd = (LIR*)cUnit->lastLIRInsn; |
| 267 | oatMarkDefWide(cUnit, rlDest, defStart, defEnd); |
| 268 | } |
| 269 | } |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 270 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 271 | /* |
| 272 | * Mark garbage collection card. Skip if the value we're storing is null. |
| 273 | */ |
| 274 | void markGCCard(CompilationUnit* cUnit, int valReg, int tgtAddrReg) |
| 275 | { |
buzbee | a7678db | 2012-03-05 15:35:46 -0800 | [diff] [blame] | 276 | #if defined(TARGET_X86) |
| 277 | UNIMPLEMENTED(WARNING) << "markGCCard"; |
| 278 | #else |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 279 | int regCardBase = oatAllocTemp(cUnit); |
| 280 | int regCardNo = oatAllocTemp(cUnit); |
buzbee | 82488f5 | 2012-03-02 08:20:26 -0800 | [diff] [blame] | 281 | LIR* branchOver = opCmpImmBranch(cUnit, kCondEq, valReg, 0, NULL); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 282 | loadWordDisp(cUnit, rSELF, Thread::CardTableOffset().Int32Value(), |
| 283 | regCardBase); |
| 284 | opRegRegImm(cUnit, kOpLsr, regCardNo, tgtAddrReg, GC_CARD_SHIFT); |
| 285 | storeBaseIndexed(cUnit, regCardBase, regCardNo, regCardBase, 0, |
| 286 | kUnsignedByte); |
| 287 | LIR* target = newLIR0(cUnit, kPseudoTargetLabel); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 288 | branchOver->target = (LIR*)target; |
| 289 | oatFreeTemp(cUnit, regCardBase); |
| 290 | oatFreeTemp(cUnit, regCardNo); |
buzbee | a7678db | 2012-03-05 15:35:46 -0800 | [diff] [blame] | 291 | #endif |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 292 | } |
| 293 | |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 294 | /* Utilities to load the current Method* */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 295 | void loadCurrMethodDirect(CompilationUnit *cUnit, int rTgt) |
| 296 | { |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 297 | loadValueDirectFixed(cUnit, cUnit->regLocation[cUnit->methodSReg], rTgt); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 298 | } |
| 299 | |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 300 | RegLocation loadCurrMethod(CompilationUnit *cUnit) |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 301 | { |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 302 | return loadValue(cUnit, cUnit->regLocation[cUnit->methodSReg], kCoreReg); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 303 | } |
| 304 | |
buzbee | 9c044ce | 2012-03-18 13:24:07 -0700 | [diff] [blame] | 305 | bool methodStarInReg(CompilationUnit* cUnit) |
| 306 | { |
| 307 | return (cUnit->regLocation[cUnit->methodSReg].location == kLocPhysReg); |
| 308 | } |
| 309 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 310 | |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 311 | } // namespace art |