blob: e1eba44138922ab37a54f5ffc4554cbba9353fba [file] [log] [blame]
buzbee67bf8852011-08-17 17:51:35 -07001/*
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
17#include "../../CompilerInternals.h"
18#include "ArmLIR.h"
buzbee67bc2362011-10-11 18:08:40 -070019#include "../Ralloc.h"
buzbee67bf8852011-08-17 17:51:35 -070020
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070021#include <string>
22
Elliott Hughes11d1b0c2012-01-23 16:57:47 -080023namespace art {
24
buzbee31a4a6f2012-02-28 15:36:15 -080025ArmConditionCode oatArmConditionEncoding(ConditionCode code)
26{
27 ArmConditionCode res;
28 switch(code) {
29 case kCondEq: res = kArmCondEq; break;
30 case kCondNe: res = kArmCondNe; break;
31 case kCondCs: res = kArmCondCs; break;
32 case kCondCc: res = kArmCondCc; break;
33 case kCondMi: res = kArmCondMi; break;
34 case kCondPl: res = kArmCondPl; break;
35 case kCondVs: res = kArmCondVs; break;
36 case kCondVc: res = kArmCondVc; break;
37 case kCondHi: res = kArmCondHi; break;
38 case kCondLs: res = kArmCondLs; break;
39 case kCondGe: res = kArmCondGe; break;
40 case kCondLt: res = kArmCondLt; break;
41 case kCondGt: res = kArmCondGt; break;
42 case kCondLe: res = kArmCondLe; break;
43 case kCondAl: res = kArmCondAl; break;
44 case kCondNv: res = kArmCondNv; break;
45 default:
46 LOG(FATAL) << "Bad condition code" << (int)code;
47 res = (ArmConditionCode)0; // Quiet gcc
48 }
49 return res;
50}
51
buzbee67bf8852011-08-17 17:51:35 -070052static const char* coreRegNames[16] = {
53 "r0",
54 "r1",
55 "r2",
56 "r3",
57 "r4",
58 "r5",
59 "r6",
60 "r7",
61 "r8",
62 "rSELF",
63 "r10",
64 "r11",
65 "r12",
66 "sp",
67 "lr",
68 "pc",
69};
70
71
72static const char* shiftNames[4] = {
73 "lsl",
74 "lsr",
75 "asr",
76 "ror"};
77
78/* Decode and print a ARM register name */
buzbee31a4a6f2012-02-28 15:36:15 -080079char* decodeRegList(int opcode, int vector, char* buf)
buzbee67bf8852011-08-17 17:51:35 -070080{
81 int i;
82 bool printed = false;
83 buf[0] = 0;
84 for (i = 0; i < 16; i++, vector >>= 1) {
85 if (vector & 0x1) {
86 int regId = i;
87 if (opcode == kThumbPush && i == 8) {
88 regId = r14lr;
89 } else if (opcode == kThumbPop && i == 8) {
90 regId = r15pc;
91 }
92 if (printed) {
93 sprintf(buf + strlen(buf), ", r%d", regId);
94 } else {
95 printed = true;
96 sprintf(buf, "r%d", regId);
97 }
98 }
99 }
100 return buf;
101}
102
buzbee31a4a6f2012-02-28 15:36:15 -0800103char* decodeFPCSRegList(int count, int base, char* buf)
buzbee67bf8852011-08-17 17:51:35 -0700104{
105 sprintf(buf, "s%d", base);
106 for (int i = 1; i < count; i++) {
107 sprintf(buf + strlen(buf), ", s%d",base + i);
108 }
109 return buf;
110}
111
buzbee31a4a6f2012-02-28 15:36:15 -0800112int expandImmediate(int value)
buzbee67bf8852011-08-17 17:51:35 -0700113{
114 int mode = (value & 0xf00) >> 8;
115 u4 bits = value & 0xff;
116 switch(mode) {
117 case 0:
118 return bits;
119 case 1:
120 return (bits << 16) | bits;
121 case 2:
122 return (bits << 24) | (bits << 8);
123 case 3:
124 return (bits << 24) | (bits << 16) | (bits << 8) | bits;
125 default:
126 break;
127 }
128 bits = (bits | 0x80) << 24;
129 return bits >> (((value & 0xf80) >> 7) - 8);
130}
131
132const char* ccNames[] = {"eq","ne","cs","cc","mi","pl","vs","vc",
133 "hi","ls","ge","lt","gt","le","al","nv"};
134/*
135 * Interpret a format string and build a string no longer than size
136 * See format key in Assemble.c.
137 */
buzbee31a4a6f2012-02-28 15:36:15 -0800138std::string buildInsnString(const char* fmt, LIR* lir,
139 unsigned char* baseAddr)
buzbee67bf8852011-08-17 17:51:35 -0700140{
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700141 std::string buf;
buzbee67bf8852011-08-17 17:51:35 -0700142 int i;
buzbee67bf8852011-08-17 17:51:35 -0700143 const char* fmtEnd = &fmt[strlen(fmt)];
144 char tbuf[256];
145 const char* name;
146 char nc;
147 while (fmt < fmtEnd) {
148 int operand;
149 if (*fmt == '!') {
150 fmt++;
buzbeeed3e9302011-09-23 17:34:19 -0700151 DCHECK_LT(fmt, fmtEnd);
buzbee67bf8852011-08-17 17:51:35 -0700152 nc = *fmt++;
153 if (nc=='!') {
154 strcpy(tbuf, "!");
155 } else {
buzbeeed3e9302011-09-23 17:34:19 -0700156 DCHECK_LT(fmt, fmtEnd);
Elliott Hughesf5a7a472011-10-07 14:31:02 -0700157 DCHECK_LT((unsigned)(nc-'0'), 4U);
buzbee67bf8852011-08-17 17:51:35 -0700158 operand = lir->operands[nc-'0'];
159 switch(*fmt++) {
160 case 'H':
161 if (operand != 0) {
162 sprintf(tbuf, ", %s %d",shiftNames[operand & 0x3],
163 operand >> 2);
164 } else {
165 strcpy(tbuf,"");
166 }
167 break;
168 case 'B':
169 switch (operand) {
170 case kSY:
171 name = "sy";
172 break;
173 case kST:
174 name = "st";
175 break;
176 case kISH:
177 name = "ish";
178 break;
179 case kISHST:
180 name = "ishst";
181 break;
182 case kNSH:
183 name = "nsh";
184 break;
185 case kNSHST:
186 name = "shst";
187 break;
188 default:
189 name = "DecodeError2";
190 break;
191 }
192 strcpy(tbuf, name);
193 break;
194 case 'b':
195 strcpy(tbuf,"0000");
196 for (i=3; i>= 0; i--) {
197 tbuf[i] += operand & 1;
198 operand >>= 1;
199 }
200 break;
201 case 'n':
202 operand = ~expandImmediate(operand);
203 sprintf(tbuf,"%d [%#x]", operand, operand);
204 break;
205 case 'm':
206 operand = expandImmediate(operand);
207 sprintf(tbuf,"%d [%#x]", operand, operand);
208 break;
209 case 's':
210 sprintf(tbuf,"s%d",operand & FP_REG_MASK);
211 break;
212 case 'S':
213 sprintf(tbuf,"d%d",(operand & FP_REG_MASK) >> 1);
214 break;
215 case 'h':
216 sprintf(tbuf,"%04x", operand);
217 break;
218 case 'M':
219 case 'd':
220 sprintf(tbuf,"%d", operand);
221 break;
222 case 'C':
223 sprintf(tbuf,"%s",coreRegNames[operand]);
224 break;
225 case 'E':
226 sprintf(tbuf,"%d", operand*4);
227 break;
228 case 'F':
229 sprintf(tbuf,"%d", operand*2);
230 break;
231 case 'c':
232 strcpy(tbuf, ccNames[operand]);
233 break;
234 case 't':
235 sprintf(tbuf,"0x%08x (L%p)",
buzbee31a4a6f2012-02-28 15:36:15 -0800236 (int) baseAddr + lir->offset + 4 +
buzbee67bf8852011-08-17 17:51:35 -0700237 (operand << 1),
buzbee31a4a6f2012-02-28 15:36:15 -0800238 lir->target);
buzbee67bf8852011-08-17 17:51:35 -0700239 break;
240 case 'u': {
241 int offset_1 = lir->operands[0];
242 int offset_2 = NEXT_LIR(lir)->operands[0];
243 intptr_t target =
buzbee31a4a6f2012-02-28 15:36:15 -0800244 ((((intptr_t) baseAddr + lir->offset + 4) &
buzbee67bf8852011-08-17 17:51:35 -0700245 ~3) + (offset_1 << 21 >> 9) + (offset_2 << 1)) &
246 0xfffffffc;
247 sprintf(tbuf, "%p", (void *) target);
248 break;
249 }
250
251 /* Nothing to print for BLX_2 */
252 case 'v':
253 strcpy(tbuf, "see above");
254 break;
255 case 'R':
256 decodeRegList(lir->opcode, operand, tbuf);
257 break;
258 case 'P':
259 decodeFPCSRegList(operand, 16, tbuf);
260 break;
261 case 'Q':
262 decodeFPCSRegList(operand, 0, tbuf);
263 break;
264 default:
265 strcpy(tbuf,"DecodeError1");
266 break;
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700267 }
268 buf += tbuf;
buzbee67bf8852011-08-17 17:51:35 -0700269 }
270 } else {
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700271 buf += *fmt++;
buzbee67bf8852011-08-17 17:51:35 -0700272 }
buzbee67bf8852011-08-17 17:51:35 -0700273 }
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700274 return buf;
buzbee67bf8852011-08-17 17:51:35 -0700275}
276
277void oatDumpResourceMask(LIR* lir, u8 mask, const char* prefix)
278{
279 char buf[256];
280 buf[0] = 0;
buzbee31a4a6f2012-02-28 15:36:15 -0800281 LIR* armLIR = (LIR*) lir;
buzbee67bf8852011-08-17 17:51:35 -0700282
283 if (mask == ENCODE_ALL) {
284 strcpy(buf, "all");
285 } else {
286 char num[8];
287 int i;
288
289 for (i = 0; i < kRegEnd; i++) {
290 if (mask & (1ULL << i)) {
291 sprintf(num, "%d ", i);
292 strcat(buf, num);
293 }
294 }
295
296 if (mask & ENCODE_CCODE) {
297 strcat(buf, "cc ");
298 }
299 if (mask & ENCODE_FP_STATUS) {
300 strcat(buf, "fpcc ");
301 }
302
303 /* Memory bits */
304 if (armLIR && (mask & ENCODE_DALVIK_REG)) {
305 sprintf(buf + strlen(buf), "dr%d%s", armLIR->aliasInfo & 0xffff,
306 (armLIR->aliasInfo & 0x80000000) ? "(+1)" : "");
307 }
308 if (mask & ENCODE_LITERAL) {
309 strcat(buf, "lit ");
310 }
311
312 if (mask & ENCODE_HEAP_REF) {
313 strcat(buf, "heap ");
314 }
315 if (mask & ENCODE_MUST_NOT_ALIAS) {
316 strcat(buf, "noalias ");
317 }
318 }
319 if (buf[0]) {
320 LOG(INFO) << prefix << ": " << buf;
321 }
322}
323
324/*
325 * Debugging macros
326 */
327#define DUMP_RESOURCE_MASK(X)
328#define DUMP_SSA_REP(X)
329
330/* Pretty-print a LIR instruction */
331void oatDumpLIRInsn(CompilationUnit* cUnit, LIR* arg, unsigned char* baseAddr)
332{
buzbee31a4a6f2012-02-28 15:36:15 -0800333 LIR* lir = (LIR*) arg;
334 int offset = lir->offset;
buzbee67bf8852011-08-17 17:51:35 -0700335 int dest = lir->operands[0];
336 const bool dumpNop = false;
337
338 /* Handle pseudo-ops individually, and all regular insns as a group */
339 switch(lir->opcode) {
buzbee31a4a6f2012-02-28 15:36:15 -0800340 case kPseudoMethodEntry:
buzbee67bf8852011-08-17 17:51:35 -0700341 LOG(INFO) << "-------- method entry " <<
Elliott Hughes11d1b0c2012-01-23 16:57:47 -0800342 PrettyMethod(cUnit->method_idx, *cUnit->dex_file);
buzbee67bf8852011-08-17 17:51:35 -0700343 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800344 case kPseudoMethodExit:
buzbee67bf8852011-08-17 17:51:35 -0700345 LOG(INFO) << "-------- Method_Exit";
346 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800347 case kPseudoBarrier:
buzbee67bf8852011-08-17 17:51:35 -0700348 LOG(INFO) << "-------- BARRIER";
349 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800350 case kPseudoExtended:
buzbee67bf8852011-08-17 17:51:35 -0700351 LOG(INFO) << "-------- " << (char* ) dest;
352 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800353 case kPseudoSSARep:
buzbee67bf8852011-08-17 17:51:35 -0700354 DUMP_SSA_REP(LOG(INFO) << "-------- kMirOpPhi: " << (char* ) dest);
355 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800356 case kPseudoEntryBlock:
buzbee67bf8852011-08-17 17:51:35 -0700357 LOG(INFO) << "-------- entry offset: 0x" << std::hex << dest;
358 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800359 case kPseudoDalvikByteCodeBoundary:
buzbee67bf8852011-08-17 17:51:35 -0700360 LOG(INFO) << "-------- dalvik offset: 0x" << std::hex <<
buzbee31a4a6f2012-02-28 15:36:15 -0800361 lir->dalvikOffset << " @ " << (char* )lir->operands[0];
buzbee67bf8852011-08-17 17:51:35 -0700362 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800363 case kPseudoExitBlock:
buzbee67bf8852011-08-17 17:51:35 -0700364 LOG(INFO) << "-------- exit offset: 0x" << std::hex << dest;
365 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800366 case kPseudoPseudoAlign4:
buzbee67bf8852011-08-17 17:51:35 -0700367 LOG(INFO) << (intptr_t)baseAddr + offset << " (0x" << std::hex <<
368 offset << "): .align4";
369 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800370 case kPseudoEHBlockLabel:
buzbee67bf8852011-08-17 17:51:35 -0700371 LOG(INFO) << "Exception_Handling:";
372 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800373 case kPseudoTargetLabel:
374 case kPseudoNormalBlockLabel:
buzbee67bf8852011-08-17 17:51:35 -0700375 LOG(INFO) << "L" << (intptr_t)lir << ":";
376 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800377 case kPseudoThrowTarget:
buzbee5ade1d22011-09-09 14:44:52 -0700378 LOG(INFO) << "LT" << (intptr_t)lir << ":";
379 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800380 case kPseudoSuspendTarget:
buzbeec1f45042011-09-21 16:03:19 -0700381 LOG(INFO) << "LS" << (intptr_t)lir << ":";
382 break;
buzbee31a4a6f2012-02-28 15:36:15 -0800383 case kPseudoCaseLabel:
buzbee67bf8852011-08-17 17:51:35 -0700384 LOG(INFO) << "LC" << (intptr_t)lir << ": Case target 0x" <<
385 std::hex << lir->operands[0] << "|" << std::dec <<
386 lir->operands[0];
387 break;
388 default:
389 if (lir->flags.isNop && !dumpNop) {
390 break;
buzbee3ea4ec52011-08-22 17:37:19 -0700391 } else {
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700392 std::string op_name(buildInsnString(EncodingMap[lir->opcode].name, lir, baseAddr));
393 std::string op_operands(buildInsnString(EncodingMap[lir->opcode].fmt, lir, baseAddr));
buzbeee3acd072012-02-25 17:03:10 -0800394 LOG(INFO) << StringPrintf("%p (%04x): %-9s%s%s", baseAddr + offset, offset,
395 op_name.c_str(), op_operands.c_str(), lir->flags.isNop ? "(nop)" : "");
buzbee67bf8852011-08-17 17:51:35 -0700396 }
buzbee67bf8852011-08-17 17:51:35 -0700397 break;
398 }
399
400 if (lir->useMask && (!lir->flags.isNop || dumpNop)) {
401 DUMP_RESOURCE_MASK(oatDumpResourceMask((LIR* ) lir,
402 lir->useMask, "use"));
403 }
404 if (lir->defMask && (!lir->flags.isNop || dumpNop)) {
405 DUMP_RESOURCE_MASK(oatDumpResourceMask((LIR* ) lir,
406 lir->defMask, "def"));
407 }
408}
409
buzbee67bc2362011-10-11 18:08:40 -0700410void oatDumpPromotionMap(CompilationUnit *cUnit)
411{
Ian Rogersa3760aa2011-11-14 14:32:37 -0800412 for (int i = 0; i < cUnit->numDalvikRegisters; i++) {
buzbee67bc2362011-10-11 18:08:40 -0700413 PromotionMap vRegMap = cUnit->promotionMap[i];
414 char buf[100];
415 if (vRegMap.fpLocation == kLocPhysReg) {
416 snprintf(buf, 100, " : s%d", vRegMap.fpReg & FP_REG_MASK);
417 } else {
418 buf[0] = 0;
419 }
420 char buf2[100];
421 snprintf(buf2, 100, "V[%02d] -> %s%d%s", i,
422 vRegMap.coreLocation == kLocPhysReg ?
423 "r" : "SP+", vRegMap.coreLocation == kLocPhysReg ?
424 vRegMap.coreReg : oatSRegOffset(cUnit, i), buf);
425 LOG(INFO) << buf2;
426 }
427}
428
429void oatDumpFullPromotionMap(CompilationUnit *cUnit)
430{
Ian Rogersa3760aa2011-11-14 14:32:37 -0800431 for (int i = 0; i < cUnit->numDalvikRegisters; i++) {
buzbee67bc2362011-10-11 18:08:40 -0700432 PromotionMap vRegMap = cUnit->promotionMap[i];
433 LOG(INFO) << i << " -> " << "CL:" << (int)vRegMap.coreLocation <<
434 ", CR:" << (int)vRegMap.coreReg << ", FL:" <<
435 (int)vRegMap.fpLocation << ", FR:" << (int)vRegMap.fpReg <<
436 ", - " << (int)vRegMap.firstInPair;
437 }
438}
439
buzbee67bf8852011-08-17 17:51:35 -0700440/* Dump instructions and constant pool contents */
441void oatCodegenDump(CompilationUnit* cUnit)
442{
buzbee67bf8852011-08-17 17:51:35 -0700443 LOG(INFO) << "/*";
Ian Rogersa3760aa2011-11-14 14:32:37 -0800444 LOG(INFO) << "Dumping LIR insns for "
Elliott Hughes11d1b0c2012-01-23 16:57:47 -0800445 << PrettyMethod(cUnit->method_idx, *cUnit->dex_file);
buzbee67bf8852011-08-17 17:51:35 -0700446 LIR* lirInsn;
buzbee31a4a6f2012-02-28 15:36:15 -0800447 LIR* armLIR;
buzbee67bf8852011-08-17 17:51:35 -0700448 int insnsSize = cUnit->insnsSize;
449
450 LOG(INFO) << "Regs (excluding ins) : " << cUnit->numRegs;
451 LOG(INFO) << "Ins : " << cUnit->numIns;
452 LOG(INFO) << "Outs : " << cUnit->numOuts;
buzbeebbaf8942011-10-02 13:08:29 -0700453 LOG(INFO) << "CoreSpills : " << cUnit->numCoreSpills;
454 LOG(INFO) << "FPSpills : " << cUnit->numFPSpills;
buzbee67bf8852011-08-17 17:51:35 -0700455 LOG(INFO) << "Padding : " << cUnit->numPadding;
456 LOG(INFO) << "Frame size : " << cUnit->frameSize;
457 LOG(INFO) << "Start of ins : " << cUnit->insOffset;
458 LOG(INFO) << "Start of regs : " << cUnit->regsOffset;
459 LOG(INFO) << "code size is " << cUnit->totalSize <<
460 " bytes, Dalvik size is " << insnsSize * 2;
461 LOG(INFO) << "expansion factor: " <<
462 (float)cUnit->totalSize / (float)(insnsSize * 2);
buzbee67bc2362011-10-11 18:08:40 -0700463 oatDumpPromotionMap(cUnit);
buzbee67bf8852011-08-17 17:51:35 -0700464 for (lirInsn = cUnit->firstLIRInsn; lirInsn; lirInsn = lirInsn->next) {
buzbeec143c552011-08-20 17:38:58 -0700465 oatDumpLIRInsn(cUnit, lirInsn, 0);
buzbee67bf8852011-08-17 17:51:35 -0700466 }
467 for (lirInsn = cUnit->classPointerList; lirInsn; lirInsn = lirInsn->next) {
buzbee31a4a6f2012-02-28 15:36:15 -0800468 armLIR = (LIR*) lirInsn;
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700469 LOG(INFO) << StringPrintf("%x (%04x): .class (%s)",
buzbee31a4a6f2012-02-28 15:36:15 -0800470 armLIR->offset, armLIR->offset,
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700471 ((CallsiteInfo *) armLIR->operands[0])->classDescriptor);
buzbee67bf8852011-08-17 17:51:35 -0700472 }
473 for (lirInsn = cUnit->literalList; lirInsn; lirInsn = lirInsn->next) {
buzbee31a4a6f2012-02-28 15:36:15 -0800474 armLIR = (LIR*) lirInsn;
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700475 LOG(INFO) << StringPrintf("%x (%04x): .word (%#x)",
buzbee31a4a6f2012-02-28 15:36:15 -0800476 armLIR->offset, armLIR->offset, armLIR->operands[0]);
buzbee67bf8852011-08-17 17:51:35 -0700477 }
478
Elliott Hughes11d1b0c2012-01-23 16:57:47 -0800479 const DexFile::MethodId& method_id =
Ian Rogersa3760aa2011-11-14 14:32:37 -0800480 cUnit->dex_file->GetMethodId(cUnit->method_idx);
Elliott Hughes95572412011-12-13 18:14:20 -0800481 std::string signature(cUnit->dex_file->GetMethodSignature(method_id));
482 std::string name(cUnit->dex_file->GetMethodName(method_id));
483 std::string descriptor(cUnit->dex_file->GetMethodDeclaringClassDescriptor(method_id));
buzbeec143c552011-08-20 17:38:58 -0700484
buzbee67bf8852011-08-17 17:51:35 -0700485 // Dump mapping table
buzbee4ef76522011-09-08 10:00:32 -0700486 if (cUnit->mappingTable.size() > 0) {
Shih-wei Liaoc44c8222012-01-14 10:22:14 -0800487 std::string line(StringPrintf("\n MappingTable %s%s_%s_mappingTable[%zu] = {",
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700488 descriptor.c_str(), name.c_str(), signature.c_str(), cUnit->mappingTable.size()));
489 std::replace(line.begin(), line.end(), ';', '_');
490 LOG(INFO) << line;
buzbee4ef76522011-09-08 10:00:32 -0700491 for (uint32_t i = 0; i < cUnit->mappingTable.size(); i+=2) {
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700492 line = StringPrintf(" {0x%08x, 0x%04x},",
buzbee4ef76522011-09-08 10:00:32 -0700493 cUnit->mappingTable[i], cUnit->mappingTable[i+1]);
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700494 LOG(INFO) << line;
buzbee67bf8852011-08-17 17:51:35 -0700495 }
496 LOG(INFO) <<" };\n\n";
497 }
buzbee67bf8852011-08-17 17:51:35 -0700498}
Elliott Hughes11d1b0c2012-01-23 16:57:47 -0800499
500} // namespace art