• Home
  • Raw
  • Download

Lines Matching refs:lir

1006   LIR* lir;  in AssembleInstructions()  local
1009 for (lir = first_lir_insn_; lir != NULL; lir = NEXT_LIR(lir)) { in AssembleInstructions()
1010 if (lir->opcode < 0) { in AssembleInstructions()
1012 if ((lir->opcode == kPseudoPseudoAlign4) && (lir->operands[0] == 1)) { in AssembleInstructions()
1019 if (lir->flags.is_nop) { in AssembleInstructions()
1034 if (lir->flags.pcRelFixup) { in AssembleInstructions()
1035 if (lir->opcode == kThumbLdrPcRel || in AssembleInstructions()
1036 lir->opcode == kThumb2LdrPcRel12 || in AssembleInstructions()
1037 lir->opcode == kThumbAddPcRel || in AssembleInstructions()
1038 lir->opcode == kThumb2LdrdPcRel8 || in AssembleInstructions()
1039 ((lir->opcode == kThumb2Vldrd) && (lir->operands[1] == r15pc)) || in AssembleInstructions()
1040 ((lir->opcode == kThumb2Vldrs) && (lir->operands[1] == r15pc))) { in AssembleInstructions()
1047 LIR *lir_target = lir->target; in AssembleInstructions()
1048 uintptr_t pc = (lir->offset + 4) & ~3; in AssembleInstructions()
1055 if (((lir->opcode == kThumbAddPcRel) && (delta > 1020)) || in AssembleInstructions()
1056 ((lir->opcode == kThumbLdrPcRel) && (delta > 1020))) { in AssembleInstructions()
1061 if (((lir->opcode == kThumb2LdrPcRel12) && (delta > 4091)) || in AssembleInstructions()
1062 ((lir->opcode == kThumb2LdrdPcRel8) && (delta > 1020)) || in AssembleInstructions()
1063 ((lir->opcode == kThumb2Vldrs) && (delta > 1020)) || in AssembleInstructions()
1064 ((lir->opcode == kThumb2Vldrd) && (delta > 1020))) { in AssembleInstructions()
1070 int base_reg = ((lir->opcode == kThumb2LdrdPcRel8) || (lir->opcode == kThumb2LdrPcRel12)) in AssembleInstructions()
1071 ? lir->operands[0] : rARM_LR; in AssembleInstructions()
1074 LIR* new_adr = RawLIR(lir->dalvik_offset, kThumb2Adr, in AssembleInstructions()
1075 base_reg, 0, 0, 0, 0, lir->target); in AssembleInstructions()
1076 InsertLIRBefore(lir, new_adr); in AssembleInstructions()
1079 if (lir->opcode == kThumb2LdrPcRel12) { in AssembleInstructions()
1080 lir->opcode = kThumb2LdrRRI12; in AssembleInstructions()
1081 } else if (lir->opcode == kThumb2LdrdPcRel8) { in AssembleInstructions()
1082 lir->opcode = kThumb2LdrdI8; in AssembleInstructions()
1085 if (lir->opcode == kThumb2LdrdI8) { in AssembleInstructions()
1086 lir->operands[3] = 0; in AssembleInstructions()
1087 lir->operands[2] = base_reg; in AssembleInstructions()
1089 lir->operands[2] = 0; in AssembleInstructions()
1090 lir->operands[1] = base_reg; in AssembleInstructions()
1092 SetupResourceMasks(lir); in AssembleInstructions()
1095 if ((lir->opcode == kThumb2Vldrs) || in AssembleInstructions()
1096 (lir->opcode == kThumb2Vldrd) || in AssembleInstructions()
1097 (lir->opcode == kThumb2LdrdPcRel8)) { in AssembleInstructions()
1098 lir->operands[2] = delta >> 2; in AssembleInstructions()
1100 lir->operands[1] = (lir->opcode == kThumb2LdrPcRel12) ? delta : in AssembleInstructions()
1104 } else if (lir->opcode == kThumb2Cbnz || lir->opcode == kThumb2Cbz) { in AssembleInstructions()
1105 LIR *target_lir = lir->target; in AssembleInstructions()
1106 uintptr_t pc = lir->offset + 4; in AssembleInstructions()
1115 RawLIR(lir->dalvik_offset, kThumbBCond, 0, in AssembleInstructions()
1116 (lir->opcode == kThumb2Cbz) ? kArmCondEq : kArmCondNe, in AssembleInstructions()
1117 0, 0, 0, lir->target); in AssembleInstructions()
1118 InsertLIRAfter(lir, new_inst); in AssembleInstructions()
1120 lir->opcode = kThumbCmpRI8; in AssembleInstructions()
1122 lir->operands[1] = 0; in AssembleInstructions()
1123 lir->target = 0; in AssembleInstructions()
1124 SetupResourceMasks(lir); in AssembleInstructions()
1127 lir->operands[1] = delta >> 1; in AssembleInstructions()
1129 } else if (lir->opcode == kThumb2Push || lir->opcode == kThumb2Pop) { in AssembleInstructions()
1130 if (__builtin_popcount(lir->operands[0]) == 1) { in AssembleInstructions()
1137 lir->opcode = (lir->opcode == kThumb2Push) ? kThumb2Push1 : in AssembleInstructions()
1140 while (lir->operands[0]) { in AssembleInstructions()
1141 if (lir->operands[0] & 0x1) { in AssembleInstructions()
1145 lir->operands[0] >>= 1; in AssembleInstructions()
1148 lir->operands[0] = reg; in AssembleInstructions()
1149 SetupResourceMasks(lir); in AssembleInstructions()
1152 } else if (lir->opcode == kThumbBCond || lir->opcode == kThumb2BCond) { in AssembleInstructions()
1153 LIR *target_lir = lir->target; in AssembleInstructions()
1156 uintptr_t pc = lir->offset + 4; in AssembleInstructions()
1159 if ((lir->opcode == kThumbBCond) && (delta > 254 || delta < -256)) { in AssembleInstructions()
1160 lir->opcode = kThumb2BCond; in AssembleInstructions()
1161 SetupResourceMasks(lir); in AssembleInstructions()
1164 lir->operands[0] = delta >> 1; in AssembleInstructions()
1165 } else if (lir->opcode == kThumb2BUncond) { in AssembleInstructions()
1166 LIR *target_lir = lir->target; in AssembleInstructions()
1167 uintptr_t pc = lir->offset + 4; in AssembleInstructions()
1170 lir->operands[0] = delta >> 1; in AssembleInstructions()
1172 lir->operands[0] == 0) { // Useless branch in AssembleInstructions()
1173 lir->flags.is_nop = true; in AssembleInstructions()
1176 } else if (lir->opcode == kThumbBUncond) { in AssembleInstructions()
1177 LIR *target_lir = lir->target; in AssembleInstructions()
1178 uintptr_t pc = lir->offset + 4; in AssembleInstructions()
1183 lir->opcode = kThumb2BUncond; in AssembleInstructions()
1184 lir->operands[0] = 0; in AssembleInstructions()
1185 SetupResourceMasks(lir); in AssembleInstructions()
1188 lir->operands[0] = delta >> 1; in AssembleInstructions()
1190 lir->operands[0] == -1) { // Useless branch in AssembleInstructions()
1191 lir->flags.is_nop = true; in AssembleInstructions()
1195 } else if (lir->opcode == kThumbBlx1) { in AssembleInstructions()
1196 DCHECK(NEXT_LIR(lir)->opcode == kThumbBlx2); in AssembleInstructions()
1198 uintptr_t cur_pc = (start_addr + lir->offset + 4) & ~3; in AssembleInstructions()
1199 uintptr_t target = lir->operands[1]; in AssembleInstructions()
1208 lir->operands[0] = (delta >> 12) & 0x7ff; in AssembleInstructions()
1209 NEXT_LIR(lir)->operands[0] = (delta>> 1) & 0x7ff; in AssembleInstructions()
1210 } else if (lir->opcode == kThumbBl1) { in AssembleInstructions()
1211 DCHECK(NEXT_LIR(lir)->opcode == kThumbBl2); in AssembleInstructions()
1213 uintptr_t cur_pc = start_addr + lir->offset + 4; in AssembleInstructions()
1214 uintptr_t target = lir->operands[1]; in AssembleInstructions()
1219 lir->operands[0] = (delta >> 12) & 0x7ff; in AssembleInstructions()
1220 NEXT_LIR(lir)->operands[0] = (delta>> 1) & 0x7ff; in AssembleInstructions()
1221 } else if (lir->opcode == kThumb2Adr) { in AssembleInstructions()
1222 SwitchTable *tab_rec = reinterpret_cast<SwitchTable*>(lir->operands[2]); in AssembleInstructions()
1223 LIR* target = lir->target; in AssembleInstructions()
1226 int disp = target_disp - ((lir->offset + 4) & ~3); in AssembleInstructions()
1228 lir->operands[1] = disp; in AssembleInstructions()
1233 RawLIR(lir->dalvik_offset, kThumb2MovImm16LST, in AssembleInstructions()
1234 lir->operands[0], 0, reinterpret_cast<uintptr_t>(lir), in AssembleInstructions()
1235 reinterpret_cast<uintptr_t>(tab_rec), 0, lir->target); in AssembleInstructions()
1236 InsertLIRBefore(lir, new_mov16L); in AssembleInstructions()
1238 RawLIR(lir->dalvik_offset, kThumb2MovImm16HST, in AssembleInstructions()
1239 lir->operands[0], 0, reinterpret_cast<uintptr_t>(lir), in AssembleInstructions()
1240 reinterpret_cast<uintptr_t>(tab_rec), 0, lir->target); in AssembleInstructions()
1241 InsertLIRBefore(lir, new_mov16H); in AssembleInstructions()
1242 if (ARM_LOWREG(lir->operands[0])) { in AssembleInstructions()
1243 lir->opcode = kThumbAddRRLH; in AssembleInstructions()
1245 lir->opcode = kThumbAddRRHH; in AssembleInstructions()
1247 lir->operands[1] = rARM_PC; in AssembleInstructions()
1248 SetupResourceMasks(lir); in AssembleInstructions()
1251 } else if (lir->opcode == kThumb2MovImm16LST) { in AssembleInstructions()
1253 LIR *addPCInst = reinterpret_cast<LIR*>(lir->operands[2]); in AssembleInstructions()
1254 SwitchTable *tab_rec = reinterpret_cast<SwitchTable*>(lir->operands[3]); in AssembleInstructions()
1256 LIR* target = lir->target; in AssembleInstructions()
1258 lir->operands[1] = (target_disp - (addPCInst->offset + 4)) & 0xffff; in AssembleInstructions()
1259 } else if (lir->opcode == kThumb2MovImm16HST) { in AssembleInstructions()
1261 LIR *addPCInst = reinterpret_cast<LIR*>(lir->operands[2]); in AssembleInstructions()
1262 SwitchTable *tab_rec = reinterpret_cast<SwitchTable*>(lir->operands[3]); in AssembleInstructions()
1264 LIR* target = lir->target; in AssembleInstructions()
1266 lir->operands[1] = in AssembleInstructions()
1278 const ArmEncodingMap *encoder = &EncodingMap[lir->opcode]; in AssembleInstructions()
1284 operand = lir->operands[i]; in AssembleInstructions()
1390 int ArmMir2Lir::GetInsnSize(LIR* lir) { in GetInsnSize() argument
1391 return EncodingMap[lir->opcode].size; in GetInsnSize()