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 | |
buzbee | 1bc37c6 | 2012-11-20 13:35:41 -0800 | [diff] [blame] | 17 | #include "../compiler_ir.h" |
| 18 | #include "ralloc_util.h" |
| 19 | #include "codegen_util.h" |
| 20 | |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 21 | namespace art { |
| 22 | |
buzbee | b046e16 | 2012-10-30 15:48:42 -0700 | [diff] [blame] | 23 | /* This file contains target-independent codegen and support. */ |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 24 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 25 | /* |
| 26 | * Load an immediate value into a fixed or temp register. Target |
| 27 | * register is clobbered, and marked inUse. |
| 28 | */ |
| 29 | LIR* loadConstant(CompilationUnit* cUnit, int rDest, int value) |
| 30 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 31 | if (oatIsTemp(cUnit, rDest)) { |
| 32 | oatClobber(cUnit, rDest); |
| 33 | oatMarkInUse(cUnit, rDest); |
| 34 | } |
| 35 | return loadConstantNoClobber(cUnit, rDest, value); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 36 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 37 | |
| 38 | /* Load a word at base + displacement. Displacement must be word multiple */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 39 | LIR* loadWordDisp(CompilationUnit* cUnit, int rBase, int displacement, |
| 40 | int rDest) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 41 | { |
buzbee | 408ad16 | 2012-06-06 16:45:18 -0700 | [diff] [blame] | 42 | return loadBaseDisp(cUnit, rBase, displacement, rDest, kWord, |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 43 | INVALID_SREG); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 44 | } |
| 45 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 46 | LIR* storeWordDisp(CompilationUnit* cUnit, int rBase, int displacement, |
| 47 | int rSrc) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 48 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 49 | return storeBaseDisp(cUnit, rBase, displacement, rSrc, kWord); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | /* |
| 53 | * Load a Dalvik register into a physical register. Take care when |
| 54 | * using this routine, as it doesn't perform any bookkeeping regarding |
| 55 | * register liveness. That is the responsibility of the caller. |
| 56 | */ |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 57 | void loadValueDirect(CompilationUnit* cUnit, RegLocation rlSrc, int rDest) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 58 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 59 | rlSrc = oatUpdateLoc(cUnit, rlSrc); |
| 60 | if (rlSrc.location == kLocPhysReg) { |
| 61 | opRegCopy(cUnit, rDest, rlSrc.lowReg); |
| 62 | } else { |
| 63 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 64 | (rlSrc.location == kLocCompilerTemp)); |
buzbee | f0504cd | 2012-11-13 16:31:10 -0800 | [diff] [blame] | 65 | loadWordDisp(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlSrc.sRegLow), rDest); |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 66 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | /* |
| 70 | * Similar to loadValueDirect, but clobbers and allocates the target |
| 71 | * register. Should be used when loading to a fixed register (for example, |
| 72 | * loading arguments to an out of line call. |
| 73 | */ |
Ian Rogers | ab2b55d | 2012-03-18 00:06:11 -0700 | [diff] [blame] | 74 | void loadValueDirectFixed(CompilationUnit* cUnit, RegLocation rlSrc, int rDest) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 75 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 76 | oatClobber(cUnit, rDest); |
| 77 | oatMarkInUse(cUnit, rDest); |
| 78 | loadValueDirect(cUnit, rlSrc, rDest); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | /* |
| 82 | * Load a Dalvik register pair into a physical register[s]. Take care when |
| 83 | * using this routine, as it doesn't perform any bookkeeping regarding |
| 84 | * register liveness. That is the responsibility of the caller. |
| 85 | */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 86 | void loadValueDirectWide(CompilationUnit* cUnit, RegLocation rlSrc, int regLo, |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 87 | int regHi) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 88 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 89 | rlSrc = oatUpdateLocWide(cUnit, rlSrc); |
| 90 | if (rlSrc.location == kLocPhysReg) { |
| 91 | opRegCopyWide(cUnit, regLo, regHi, rlSrc.lowReg, rlSrc.highReg); |
| 92 | } else { |
| 93 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 94 | (rlSrc.location == kLocCompilerTemp)); |
buzbee | f0504cd | 2012-11-13 16:31:10 -0800 | [diff] [blame] | 95 | loadBaseDispWide(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlSrc.sRegLow), |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 96 | regLo, regHi, INVALID_SREG); |
| 97 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | /* |
| 101 | * Similar to loadValueDirect, but clobbers and allocates the target |
| 102 | * registers. Should be used when loading to a fixed registers (for example, |
| 103 | * loading arguments to an out of line call. |
| 104 | */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 105 | void loadValueDirectWideFixed(CompilationUnit* cUnit, RegLocation rlSrc, |
| 106 | int regLo, int regHi) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 107 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 108 | oatClobber(cUnit, regLo); |
| 109 | oatClobber(cUnit, regHi); |
| 110 | oatMarkInUse(cUnit, regLo); |
| 111 | oatMarkInUse(cUnit, regHi); |
| 112 | loadValueDirectWide(cUnit, rlSrc, regLo, regHi); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 113 | } |
| 114 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 115 | RegLocation loadValue(CompilationUnit* cUnit, RegLocation rlSrc, |
| 116 | RegisterClass opKind) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 117 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 118 | rlSrc = oatEvalLoc(cUnit, rlSrc, opKind, false); |
| 119 | if (rlSrc.location != kLocPhysReg) { |
| 120 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 121 | (rlSrc.location == kLocCompilerTemp)); |
| 122 | loadValueDirect(cUnit, rlSrc, rlSrc.lowReg); |
| 123 | rlSrc.location = kLocPhysReg; |
| 124 | oatMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow); |
| 125 | } |
| 126 | return rlSrc; |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 127 | } |
| 128 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 129 | void storeValue(CompilationUnit* cUnit, RegLocation rlDest, RegLocation rlSrc) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 130 | { |
buzbee | 3d66194 | 2012-03-14 17:37:27 -0700 | [diff] [blame] | 131 | #ifndef NDEBUG |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 132 | /* |
| 133 | * Sanity checking - should never try to store to the same |
| 134 | * ssa name during the compilation of a single instruction |
| 135 | * without an intervening oatClobberSReg(). |
| 136 | */ |
| 137 | DCHECK((cUnit->liveSReg == INVALID_SREG) || |
| 138 | (rlDest.sRegLow != cUnit->liveSReg)); |
| 139 | cUnit->liveSReg = rlDest.sRegLow; |
buzbee | 3d66194 | 2012-03-14 17:37:27 -0700 | [diff] [blame] | 140 | #endif |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 141 | LIR* defStart; |
| 142 | LIR* defEnd; |
| 143 | DCHECK(!rlDest.wide); |
| 144 | DCHECK(!rlSrc.wide); |
| 145 | rlSrc = oatUpdateLoc(cUnit, rlSrc); |
| 146 | rlDest = oatUpdateLoc(cUnit, rlDest); |
| 147 | if (rlSrc.location == kLocPhysReg) { |
| 148 | if (oatIsLive(cUnit, rlSrc.lowReg) || |
| 149 | oatIsPromoted(cUnit, rlSrc.lowReg) || |
| 150 | (rlDest.location == kLocPhysReg)) { |
| 151 | // Src is live/promoted or Dest has assigned reg. |
| 152 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
| 153 | opRegCopy(cUnit, rlDest.lowReg, rlSrc.lowReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 154 | } else { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 155 | // Just re-assign the registers. Dest gets Src's regs |
| 156 | rlDest.lowReg = rlSrc.lowReg; |
| 157 | oatClobber(cUnit, rlSrc.lowReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 158 | } |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 159 | } else { |
| 160 | // Load Src either into promoted Dest or temps allocated for Dest |
| 161 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
| 162 | loadValueDirect(cUnit, rlSrc, rlDest.lowReg); |
| 163 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 164 | |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 165 | // Dest is now live and dirty (until/if we flush it to home location) |
| 166 | oatMarkLive(cUnit, rlDest.lowReg, rlDest.sRegLow); |
| 167 | oatMarkDirty(cUnit, rlDest); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 168 | |
| 169 | |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 170 | oatResetDefLoc(cUnit, rlDest); |
| 171 | if (oatIsDirty(cUnit, rlDest.lowReg) && |
| 172 | oatLiveOut(cUnit, rlDest.sRegLow)) { |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 173 | defStart = cUnit->lastLIRInsn; |
buzbee | f0504cd | 2012-11-13 16:31:10 -0800 | [diff] [blame] | 174 | storeBaseDisp(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlDest.sRegLow), |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 175 | rlDest.lowReg, kWord); |
| 176 | oatMarkClean(cUnit, rlDest); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 177 | defEnd = cUnit->lastLIRInsn; |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 178 | oatMarkDef(cUnit, rlDest, defStart, defEnd); |
| 179 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 180 | } |
| 181 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 182 | RegLocation loadValueWide(CompilationUnit* cUnit, RegLocation rlSrc, |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 183 | RegisterClass opKind) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 184 | { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 185 | DCHECK(rlSrc.wide); |
| 186 | rlSrc = oatEvalLoc(cUnit, rlSrc, opKind, false); |
| 187 | if (rlSrc.location != kLocPhysReg) { |
| 188 | DCHECK((rlSrc.location == kLocDalvikFrame) || |
| 189 | (rlSrc.location == kLocCompilerTemp)); |
| 190 | loadValueDirectWide(cUnit, rlSrc, rlSrc.lowReg, rlSrc.highReg); |
| 191 | rlSrc.location = kLocPhysReg; |
| 192 | oatMarkLive(cUnit, rlSrc.lowReg, rlSrc.sRegLow); |
| 193 | oatMarkLive(cUnit, rlSrc.highReg, |
| 194 | oatSRegHi(rlSrc.sRegLow)); |
| 195 | } |
| 196 | return rlSrc; |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 197 | } |
| 198 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 199 | void storeValueWide(CompilationUnit* cUnit, RegLocation rlDest, |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 200 | RegLocation rlSrc) |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 201 | { |
buzbee | 3d66194 | 2012-03-14 17:37:27 -0700 | [diff] [blame] | 202 | #ifndef NDEBUG |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 203 | /* |
| 204 | * Sanity checking - should never try to store to the same |
| 205 | * ssa name during the compilation of a single instruction |
| 206 | * without an intervening oatClobberSReg(). |
| 207 | */ |
| 208 | DCHECK((cUnit->liveSReg == INVALID_SREG) || |
| 209 | (rlDest.sRegLow != cUnit->liveSReg)); |
| 210 | cUnit->liveSReg = rlDest.sRegLow; |
buzbee | 3d66194 | 2012-03-14 17:37:27 -0700 | [diff] [blame] | 211 | #endif |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 212 | LIR* defStart; |
| 213 | LIR* defEnd; |
buzbee | f0504cd | 2012-11-13 16:31:10 -0800 | [diff] [blame] | 214 | DCHECK_EQ(fpReg(rlSrc.lowReg), fpReg(rlSrc.highReg)); |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 215 | DCHECK(rlDest.wide); |
| 216 | DCHECK(rlSrc.wide); |
| 217 | if (rlSrc.location == kLocPhysReg) { |
| 218 | if (oatIsLive(cUnit, rlSrc.lowReg) || |
| 219 | oatIsLive(cUnit, rlSrc.highReg) || |
| 220 | oatIsPromoted(cUnit, rlSrc.lowReg) || |
| 221 | oatIsPromoted(cUnit, rlSrc.highReg) || |
| 222 | (rlDest.location == kLocPhysReg)) { |
| 223 | // Src is live or promoted or Dest has assigned reg. |
| 224 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
| 225 | opRegCopyWide(cUnit, rlDest.lowReg, rlDest.highReg, |
| 226 | rlSrc.lowReg, rlSrc.highReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 227 | } else { |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 228 | // Just re-assign the registers. Dest gets Src's regs |
| 229 | rlDest.lowReg = rlSrc.lowReg; |
| 230 | rlDest.highReg = rlSrc.highReg; |
| 231 | oatClobber(cUnit, rlSrc.lowReg); |
| 232 | oatClobber(cUnit, rlSrc.highReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 233 | } |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 234 | } else { |
| 235 | // Load Src either into promoted Dest or temps allocated for Dest |
| 236 | rlDest = oatEvalLoc(cUnit, rlDest, kAnyReg, false); |
| 237 | loadValueDirectWide(cUnit, rlSrc, rlDest.lowReg, rlDest.highReg); |
| 238 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 239 | |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 240 | // Dest is now live and dirty (until/if we flush it to home location) |
| 241 | oatMarkLive(cUnit, rlDest.lowReg, rlDest.sRegLow); |
| 242 | oatMarkLive(cUnit, rlDest.highReg, oatSRegHi(rlDest.sRegLow)); |
| 243 | oatMarkDirty(cUnit, rlDest); |
| 244 | oatMarkPair(cUnit, rlDest.lowReg, rlDest.highReg); |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 245 | |
| 246 | |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 247 | oatResetDefLocWide(cUnit, rlDest); |
| 248 | if ((oatIsDirty(cUnit, rlDest.lowReg) || |
| 249 | oatIsDirty(cUnit, rlDest.highReg)) && |
| 250 | (oatLiveOut(cUnit, rlDest.sRegLow) || |
| 251 | oatLiveOut(cUnit, oatSRegHi(rlDest.sRegLow)))) { |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 252 | defStart = cUnit->lastLIRInsn; |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 253 | DCHECK_EQ((SRegToVReg(cUnit, rlDest.sRegLow)+1), |
| 254 | SRegToVReg(cUnit, oatSRegHi(rlDest.sRegLow))); |
buzbee | f0504cd | 2012-11-13 16:31:10 -0800 | [diff] [blame] | 255 | storeBaseDispWide(cUnit, targetReg(kSp), oatSRegOffset(cUnit, rlDest.sRegLow), |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 256 | rlDest.lowReg, rlDest.highReg); |
| 257 | oatMarkClean(cUnit, rlDest); |
buzbee | cbd6d44 | 2012-11-17 14:11:25 -0800 | [diff] [blame] | 258 | defEnd = cUnit->lastLIRInsn; |
Bill Buzbee | a114add | 2012-05-03 15:00:40 -0700 | [diff] [blame] | 259 | oatMarkDefWide(cUnit, rlDest, defStart, defEnd); |
| 260 | } |
buzbee | 67bf885 | 2011-08-17 17:51:35 -0700 | [diff] [blame] | 261 | } |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 262 | |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 263 | /* Utilities to load the current Method* */ |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 264 | void loadCurrMethodDirect(CompilationUnit *cUnit, int rTgt) |
| 265 | { |
buzbee | ad8f15e | 2012-06-18 14:49:45 -0700 | [diff] [blame] | 266 | loadValueDirectFixed(cUnit, cUnit->methodLoc, rTgt); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 267 | } |
| 268 | |
buzbee | e196567 | 2012-03-11 18:39:19 -0700 | [diff] [blame] | 269 | RegLocation loadCurrMethod(CompilationUnit *cUnit) |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 270 | { |
buzbee | ad8f15e | 2012-06-18 14:49:45 -0700 | [diff] [blame] | 271 | return loadValue(cUnit, cUnit->methodLoc, kCoreReg); |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 272 | } |
| 273 | |
buzbee | 9c044ce | 2012-03-18 13:24:07 -0700 | [diff] [blame] | 274 | bool methodStarInReg(CompilationUnit* cUnit) |
| 275 | { |
buzbee | ad8f15e | 2012-06-18 14:49:45 -0700 | [diff] [blame] | 276 | return (cUnit->methodLoc.location == kLocPhysReg); |
buzbee | 9c044ce | 2012-03-18 13:24:07 -0700 | [diff] [blame] | 277 | } |
| 278 | |
buzbee | 31a4a6f | 2012-02-28 15:36:15 -0800 | [diff] [blame] | 279 | |
Elliott Hughes | 11d1b0c | 2012-01-23 16:57:47 -0800 | [diff] [blame] | 280 | } // namespace art |