Lines Matching refs:skeleton

643   bool r8_form = entry->skeleton.r8_form;  in ComputeSize()
649 if (entry->skeleton.prefix1 > 0) { in ComputeSize()
651 if (entry->skeleton.prefix2 > 0) { in ComputeSize()
667 if (entry->skeleton.prefix1 != REX_W && entry->skeleton.prefix2 != REX_W in ComputeSize()
668 && entry->skeleton.prefix1 != REX && entry->skeleton.prefix2 != REX) { in ComputeSize()
674 if (entry->skeleton.opcode == 0x0F) { in ComputeSize()
676 if (entry->skeleton.extra_opcode1 == 0x38 || entry->skeleton.extra_opcode1 == 0x3A) { in ComputeSize()
685 || (cu_->target64 && entry->skeleton.prefix1 == THREAD_PREFIX)) { in ComputeSize()
705 size += entry->skeleton.immediate_bytes; in ComputeSize()
754 if (entry->skeleton.ax_opcode == 0) { in GetInsnSize()
780 return ((entry->skeleton.prefix1 != 0 || NeedsRex(lir->operands[0])) ? 1 : 0) + 1 + in GetInsnSize()
781 entry->skeleton.immediate_bytes; in GetInsnSize()
813 DCHECK_EQ(false, entry->skeleton.r8_form); in GetInsnSize()
816 DCHECK_EQ(false, entry->skeleton.r8_form); in GetInsnSize()
819 DCHECK_EQ(false, entry->skeleton.r8_form); in GetInsnSize()
890 if (entry->skeleton.r8_form) { in CheckValidByteRegister()
893 if (entry->skeleton.immediate_bytes != 1) { // Ignore ...I8 instructions. in CheckValidByteRegister()
902 CHECK(cu_->target64 || !entry->skeleton.r8_form) in CheckValidByteRegister()
917 bool w = (entry->skeleton.prefix1 == REX_W) || (entry->skeleton.prefix2 == REX_W); in EmitPrefix()
921 bool r8_form = entry->skeleton.r8_form; in EmitPrefix()
945 if (entry->skeleton.prefix1 != 0) { in EmitPrefix()
946 if (cu_->target64 && entry->skeleton.prefix1 == THREAD_PREFIX) { in EmitPrefix()
950 if (entry->skeleton.prefix1 == REX_W || entry->skeleton.prefix1 == REX) { in EmitPrefix()
952 rex |= entry->skeleton.prefix1; in EmitPrefix()
956 code_buffer_.push_back(entry->skeleton.prefix1); in EmitPrefix()
959 if (entry->skeleton.prefix2 != 0) { in EmitPrefix()
960 if (entry->skeleton.prefix2 == REX_W || entry->skeleton.prefix1 == REX) { in EmitPrefix()
962 rex |= entry->skeleton.prefix2; in EmitPrefix()
966 code_buffer_.push_back(entry->skeleton.prefix2); in EmitPrefix()
970 DCHECK_EQ(0, entry->skeleton.prefix2); in EmitPrefix()
979 code_buffer_.push_back(entry->skeleton.opcode); in EmitOpcode()
980 if (entry->skeleton.opcode == 0x0F) { in EmitOpcode()
981 code_buffer_.push_back(entry->skeleton.extra_opcode1); in EmitOpcode()
982 if (entry->skeleton.extra_opcode1 == 0x38 || entry->skeleton.extra_opcode1 == 0x3A) { in EmitOpcode()
983 code_buffer_.push_back(entry->skeleton.extra_opcode2); in EmitOpcode()
985 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitOpcode()
988 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitOpcode()
989 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitOpcode()
1063 switch (entry->skeleton.immediate_bytes) { in EmitImm()
1091 LOG(FATAL) << "Unexpected immediate bytes (" << entry->skeleton.immediate_bytes in EmitImm()
1098 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitNullary()
1100 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitNullary()
1101 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitNullary()
1102 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitNullary()
1106 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitOpRegOpcode()
1109 DCHECK(entry->skeleton.opcode != 0x0F || in EmitOpRegOpcode()
1110 (entry->skeleton.extra_opcode1 != 0x38 && entry->skeleton.extra_opcode1 != 0x3A)); in EmitOpRegOpcode()
1114 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitOpRegOpcode()
1115 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitOpRegOpcode()
1122 uint8_t modrm = (3 << 6) | (entry->skeleton.modrm_opcode << 3) | low_reg; in EmitOpReg()
1124 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitOpReg()
1125 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitOpReg()
1129 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitOpMem()
1131 code_buffer_.push_back(entry->skeleton.opcode); in EmitOpMem()
1132 DCHECK_NE(0x0F, entry->skeleton.opcode); in EmitOpMem()
1133 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitOpMem()
1134 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitOpMem()
1136 EmitModrmDisp(entry->skeleton.modrm_opcode, low_base, disp); in EmitOpMem()
1137 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitOpMem()
1138 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitOpMem()
1143 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitOpArray()
1147 EmitModrmSibDisp(entry->skeleton.modrm_opcode, low_base, low_index, scale, disp); in EmitOpArray()
1148 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitOpArray()
1149 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitOpArray()
1159 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitMemReg()
1160 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitMemReg()
1161 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitMemReg()
1178 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegArray()
1179 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitRegArray()
1180 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitRegArray()
1191 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitMemImm()
1194 EmitModrmDisp(entry->skeleton.modrm_opcode, low_base, disp); in EmitMemImm()
1195 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitMemImm()
1202 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitArrayImm()
1206 EmitModrmSibDisp(entry->skeleton.modrm_opcode, low_base, low_index, scale, disp); in EmitArrayImm()
1207 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitArrayImm()
1212 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitRegThread()
1213 DCHECK_NE(entry->skeleton.prefix1, 0); in EmitRegThread()
1221 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegThread()
1222 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitRegThread()
1223 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitRegThread()
1236 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegReg()
1237 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitRegReg()
1238 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitRegReg()
1243 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitRegRegImm()
1249 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegRegImm()
1250 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitRegRegImm()
1262 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegMemImm()
1263 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitRegMemImm()
1276 if (RegStorage::RegNum(raw_reg) == rs_rAX.GetRegNum() && entry->skeleton.ax_opcode != 0) { in EmitRegImm()
1277 code_buffer_.push_back(entry->skeleton.ax_opcode); in EmitRegImm()
1281 uint8_t modrm = (3 << 6) | (entry->skeleton.modrm_opcode << 3) | low_reg; in EmitRegImm()
1288 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitThreadImm()
1290 EmitModrmThread(entry->skeleton.modrm_opcode); in EmitThreadImm()
1296 DCHECK_EQ(entry->skeleton.ax_opcode, 0); in EmitThreadImm()
1300 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitMovRegImm()
1304 switch (entry->skeleton.immediate_bytes) { in EmitMovRegImm()
1323 << static_cast<uint32_t>(entry->skeleton.immediate_bytes); in EmitMovRegImm()
1331 code_buffer_.push_back(entry->skeleton.opcode); in EmitShiftRegImm()
1334 code_buffer_.push_back(entry->skeleton.ax_opcode); in EmitShiftRegImm()
1336 DCHECK_NE(0x0F, entry->skeleton.opcode); in EmitShiftRegImm()
1337 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitShiftRegImm()
1338 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitShiftRegImm()
1340 uint8_t modrm = (3 << 6) | (entry->skeleton.modrm_opcode << 3) | low_reg; in EmitShiftRegImm()
1343 DCHECK_EQ(entry->skeleton.immediate_bytes, 1); in EmitShiftRegImm()
1353 code_buffer_.push_back(entry->skeleton.opcode); in EmitShiftRegCl()
1354 DCHECK_NE(0x0F, entry->skeleton.opcode); in EmitShiftRegCl()
1355 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitShiftRegCl()
1356 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitShiftRegCl()
1358 uint8_t modrm = (3 << 6) | (entry->skeleton.modrm_opcode << 3) | low_reg; in EmitShiftRegCl()
1360 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitShiftRegCl()
1361 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitShiftRegCl()
1366 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitShiftMemCl()
1369 code_buffer_.push_back(entry->skeleton.opcode); in EmitShiftMemCl()
1370 DCHECK_NE(0x0F, entry->skeleton.opcode); in EmitShiftMemCl()
1371 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitShiftMemCl()
1372 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitShiftMemCl()
1374 EmitModrmDisp(entry->skeleton.modrm_opcode, low_base, displacement); in EmitShiftMemCl()
1375 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitShiftMemCl()
1376 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitShiftMemCl()
1380 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitShiftRegRegCl()
1387 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitShiftRegRegCl()
1388 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitShiftRegRegCl()
1389 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitShiftRegRegCl()
1394 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitShiftMemImm()
1397 code_buffer_.push_back(entry->skeleton.opcode); in EmitShiftMemImm()
1400 code_buffer_.push_back(entry->skeleton.ax_opcode); in EmitShiftMemImm()
1402 DCHECK_NE(0x0F, entry->skeleton.opcode); in EmitShiftMemImm()
1403 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitShiftMemImm()
1404 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitShiftMemImm()
1406 EmitModrmDisp(entry->skeleton.modrm_opcode, low_base, disp); in EmitShiftMemImm()
1408 DCHECK_EQ(entry->skeleton.immediate_bytes, 1); in EmitShiftMemImm()
1417 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitRegCond()
1418 DCHECK_EQ(0x0F, entry->skeleton.opcode); in EmitRegCond()
1420 DCHECK_EQ(0x90, entry->skeleton.extra_opcode1); in EmitRegCond()
1424 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitRegCond()
1426 uint8_t modrm = (3 << 6) | (entry->skeleton.modrm_opcode << 3) | low_reg; in EmitRegCond()
1428 DCHECK_EQ(entry->skeleton.immediate_bytes, 0); in EmitRegCond()
1433 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitMemCond()
1434 if (entry->skeleton.prefix1 != 0) { in EmitMemCond()
1435 code_buffer_.push_back(entry->skeleton.prefix1); in EmitMemCond()
1436 if (entry->skeleton.prefix2 != 0) { in EmitMemCond()
1437 code_buffer_.push_back(entry->skeleton.prefix2); in EmitMemCond()
1440 DCHECK_EQ(0, entry->skeleton.prefix2); in EmitMemCond()
1442 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitMemCond()
1443 DCHECK_EQ(0x0F, entry->skeleton.opcode); in EmitMemCond()
1445 DCHECK_EQ(0x90, entry->skeleton.extra_opcode1); in EmitMemCond()
1449 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitMemCond()
1451 EmitModrmDisp(entry->skeleton.modrm_opcode, low_base, disp); in EmitMemCond()
1452 DCHECK_EQ(entry->skeleton.immediate_bytes, 0); in EmitMemCond()
1458 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitRegRegCond()
1468 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitRegRegCond()
1469 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegRegCond()
1484 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitRegMemCond()
1494 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitRegMemCond()
1495 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitRegMemCond()
1519 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitJmp()
1521 code_buffer_.push_back(entry->skeleton.opcode); in EmitJmp()
1523 uint8_t modrm = (3 << 6) | (entry->skeleton.modrm_opcode << 3) | low_reg; in EmitJmp()
1547 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitCallMem()
1550 EmitModrmDisp(entry->skeleton.modrm_opcode, low_base, disp); in EmitCallMem()
1551 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitCallMem()
1552 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitCallMem()
1556 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitCallImmediate()
1558 DCHECK_EQ(4, entry->skeleton.immediate_bytes); in EmitCallImmediate()
1563 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitCallImmediate()
1567 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitCallThread()
1568 DCHECK_NE(entry->skeleton.prefix1, 0); in EmitCallThread()
1570 EmitModrmThread(entry->skeleton.modrm_opcode); in EmitCallThread()
1575 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitCallThread()
1576 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitCallThread()
1591 DCHECK_EQ(false, entry->skeleton.r8_form); in EmitPcRel()
1593 code_buffer_.push_back(entry->skeleton.opcode); in EmitPcRel()
1594 DCHECK_NE(0x0F, entry->skeleton.opcode); in EmitPcRel()
1595 DCHECK_EQ(0, entry->skeleton.extra_opcode1); in EmitPcRel()
1596 DCHECK_EQ(0, entry->skeleton.extra_opcode2); in EmitPcRel()
1605 DCHECK_EQ(0, entry->skeleton.immediate_bytes); in EmitPcRel()
1608 code_buffer_.push_back(entry->skeleton.opcode + low_reg); in EmitPcRel()
1614 DCHECK_EQ(0, entry->skeleton.modrm_opcode); in EmitPcRel()
1615 DCHECK_EQ(0, entry->skeleton.ax_opcode); in EmitPcRel()