• Home
  • Raw
  • Download

Lines Matching refs:instr

145   Instr* instr = reinterpret_cast<Instr*>(instructions);  in PatchCode()  local
147 *(pc + i) = *(instr + i); in PatchCode()
377 Condition Assembler::GetCondition(Instr instr) { in GetCondition() argument
378 return Instruction::ConditionField(instr); in GetCondition()
382 bool Assembler::IsBranch(Instr instr) { in IsBranch() argument
383 return (instr & (B27 | B25)) == (B27 | B25); in IsBranch()
387 int Assembler::GetBranchOffset(Instr instr) { in GetBranchOffset() argument
388 ASSERT(IsBranch(instr)); in GetBranchOffset()
391 return ((instr & kImm24Mask) << 8) >> 6; in GetBranchOffset()
395 bool Assembler::IsLdrRegisterImmediate(Instr instr) { in IsLdrRegisterImmediate() argument
396 return (instr & (B27 | B26 | B25 | B22 | B20)) == (B26 | B20); in IsLdrRegisterImmediate()
400 int Assembler::GetLdrRegisterImmediateOffset(Instr instr) { in GetLdrRegisterImmediateOffset() argument
401 ASSERT(IsLdrRegisterImmediate(instr)); in GetLdrRegisterImmediateOffset()
402 bool positive = (instr & B23) == B23; in GetLdrRegisterImmediateOffset()
403 int offset = instr & kOff12Mask; // Zero extended offset. in GetLdrRegisterImmediateOffset()
408 Instr Assembler::SetLdrRegisterImmediateOffset(Instr instr, int offset) { in SetLdrRegisterImmediateOffset() argument
409 ASSERT(IsLdrRegisterImmediate(instr)); in SetLdrRegisterImmediateOffset()
414 instr = (instr & ~B23) | (positive ? B23 : 0); in SetLdrRegisterImmediateOffset()
416 return (instr & ~kOff12Mask) | offset; in SetLdrRegisterImmediateOffset()
420 bool Assembler::IsStrRegisterImmediate(Instr instr) { in IsStrRegisterImmediate() argument
421 return (instr & (B27 | B26 | B25 | B22 | B20)) == B26; in IsStrRegisterImmediate()
425 Instr Assembler::SetStrRegisterImmediateOffset(Instr instr, int offset) { in SetStrRegisterImmediateOffset() argument
426 ASSERT(IsStrRegisterImmediate(instr)); in SetStrRegisterImmediateOffset()
431 instr = (instr & ~B23) | (positive ? B23 : 0); in SetStrRegisterImmediateOffset()
433 return (instr & ~kOff12Mask) | offset; in SetStrRegisterImmediateOffset()
437 bool Assembler::IsAddRegisterImmediate(Instr instr) { in IsAddRegisterImmediate() argument
438 return (instr & (B27 | B26 | B25 | B24 | B23 | B22 | B21)) == (B25 | B23); in IsAddRegisterImmediate()
442 Instr Assembler::SetAddRegisterImmediateOffset(Instr instr, int offset) { in SetAddRegisterImmediateOffset() argument
443 ASSERT(IsAddRegisterImmediate(instr)); in SetAddRegisterImmediateOffset()
447 return (instr & ~kOff12Mask) | offset; in SetAddRegisterImmediateOffset()
451 Register Assembler::GetRd(Instr instr) { in GetRd() argument
453 reg.code_ = Instruction::RdValue(instr); in GetRd()
458 Register Assembler::GetRn(Instr instr) { in GetRn() argument
460 reg.code_ = Instruction::RnValue(instr); in GetRn()
465 Register Assembler::GetRm(Instr instr) { in GetRm() argument
467 reg.code_ = Instruction::RmValue(instr); in GetRm()
472 bool Assembler::IsPush(Instr instr) { in IsPush() argument
473 return ((instr & ~kRdMask) == kPushRegPattern); in IsPush()
477 bool Assembler::IsPop(Instr instr) { in IsPop() argument
478 return ((instr & ~kRdMask) == kPopRegPattern); in IsPop()
482 bool Assembler::IsStrRegFpOffset(Instr instr) { in IsStrRegFpOffset() argument
483 return ((instr & kLdrStrInstrTypeMask) == kStrRegFpOffsetPattern); in IsStrRegFpOffset()
487 bool Assembler::IsLdrRegFpOffset(Instr instr) { in IsLdrRegFpOffset() argument
488 return ((instr & kLdrStrInstrTypeMask) == kLdrRegFpOffsetPattern); in IsLdrRegFpOffset()
492 bool Assembler::IsStrRegFpNegOffset(Instr instr) { in IsStrRegFpNegOffset() argument
493 return ((instr & kLdrStrInstrTypeMask) == kStrRegFpNegOffsetPattern); in IsStrRegFpNegOffset()
497 bool Assembler::IsLdrRegFpNegOffset(Instr instr) { in IsLdrRegFpNegOffset() argument
498 return ((instr & kLdrStrInstrTypeMask) == kLdrRegFpNegOffsetPattern); in IsLdrRegFpNegOffset()
502 bool Assembler::IsLdrPcImmediateOffset(Instr instr) { in IsLdrPcImmediateOffset() argument
505 return (instr & (kLdrPCMask & ~kCondMask)) == 0x051f0000; in IsLdrPcImmediateOffset()
509 bool Assembler::IsTstImmediate(Instr instr) { in IsTstImmediate() argument
510 return (instr & (B27 | B26 | I | kOpCodeMask | S | kRdMask)) == in IsTstImmediate()
515 bool Assembler::IsCmpRegister(Instr instr) { in IsCmpRegister() argument
516 return (instr & (B27 | B26 | I | kOpCodeMask | S | kRdMask | B4)) == in IsCmpRegister()
521 bool Assembler::IsCmpImmediate(Instr instr) { in IsCmpImmediate() argument
522 return (instr & (B27 | B26 | I | kOpCodeMask | S | kRdMask)) == in IsCmpImmediate()
527 Register Assembler::GetCmpImmediateRegister(Instr instr) { in GetCmpImmediateRegister() argument
528 ASSERT(IsCmpImmediate(instr)); in GetCmpImmediateRegister()
529 return GetRn(instr); in GetCmpImmediateRegister()
533 int Assembler::GetCmpImmediateRawImmediate(Instr instr) { in GetCmpImmediateRawImmediate() argument
534 ASSERT(IsCmpImmediate(instr)); in GetCmpImmediateRawImmediate()
535 return instr & kOff12Mask; in GetCmpImmediateRawImmediate()
554 Instr instr = instr_at(pos); in target_at() local
555 if ((instr & ~kImm24Mask) == 0) { in target_at()
557 return instr - (Code::kHeaderSize - kHeapObjectTag); in target_at()
559 ASSERT((instr & 7*B25) == 5*B25); // b, bl, or blx imm24 in target_at()
560 int imm26 = ((instr & kImm24Mask) << 8) >> 6; in target_at()
561 if ((Instruction::ConditionField(instr) == kSpecialCondition) && in target_at()
562 ((instr & B24) != 0)) { in target_at()
571 Instr instr = instr_at(pos); in target_at_put() local
572 if ((instr & ~kImm24Mask) == 0) { in target_at_put()
580 ASSERT((instr & 7*B25) == 5*B25); // b, bl, or blx imm24 in target_at_put()
581 if (Instruction::ConditionField(instr) == kSpecialCondition) { in target_at_put()
584 instr = (instr & ~(B24 | kImm24Mask)) | ((imm26 & 2) >> 1)*B24; in target_at_put()
587 instr &= ~kImm24Mask; in target_at_put()
591 instr_at_put(pos, instr | (imm24 & kImm24Mask)); in target_at_put()
605 Instr instr = instr_at(l.pos()); in print() local
606 if ((instr & ~kImm24Mask) == 0) { in print()
609 ASSERT((instr & 7*B25) == 5*B25); // b, bl, or blx in print()
610 Condition cond = Instruction::ConditionField(instr); in print()
617 if ((instr & B24) != 0) in print()
721 Instr* instr) { in fits_shifter() argument
733 if (instr != NULL) { in fits_shifter()
734 if ((*instr & kMovMvnMask) == kMovMvnPattern) { in fits_shifter()
736 *instr ^= kMovMvnFlip; in fits_shifter()
738 } else if ((*instr & kMovLeaveCCMask) == kMovLeaveCCPattern) { in fits_shifter()
741 *instr ^= kMovwLeaveCCFlip; in fits_shifter()
742 *instr |= EncodeMovwImmediate(imm32); in fits_shifter()
748 } else if ((*instr & kCmpCmnMask) == kCmpCmnPattern) { in fits_shifter()
750 *instr ^= kCmpCmnFlip; in fits_shifter()
754 Instr alu_insn = (*instr & kALUMask); in fits_shifter()
758 *instr ^= kAddSubFlip; in fits_shifter()
764 *instr ^= kAndBicFlip; in fits_shifter()
793 bool Operand::is_single_instruction(Instr instr) const { in is_single_instruction()
797 !fits_shifter(imm32_, &dummy1, &dummy2, &instr)) { in is_single_instruction()
801 if ((instr & ~kCondMask) == 13*B21) { // mov, S not set in is_single_instruction()
826 void Assembler::addrmod1(Instr instr, in addrmod1() argument
831 ASSERT((instr & ~(kCondMask | kOpCodeMask | S)) == 0); in addrmod1()
837 !fits_shifter(x.imm32_, &rotate_imm, &immed_8, &instr)) { in addrmod1()
843 Condition cond = Instruction::ConditionField(instr); in addrmod1()
844 if ((instr & ~kCondMask) == 13*B21) { // mov, S not set in addrmod1()
858 (instr & kMovMvnMask) != kMovMvnPattern) { in addrmod1()
864 addrmod1(instr, rn, rd, Operand(ip)); in addrmod1()
868 instr |= I | rotate_imm*B8 | immed_8; in addrmod1()
871 instr |= x.shift_imm_*B7 | x.shift_op_ | x.rm_.code(); in addrmod1()
875 instr |= x.rs_.code()*B8 | x.shift_op_ | B4 | x.rm_.code(); in addrmod1()
877 emit(instr | rn.code()*B16 | rd.code()*B12); in addrmod1()
885 void Assembler::addrmod2(Instr instr, Register rd, const MemOperand& x) { in addrmod2() argument
886 ASSERT((instr & ~(kCondMask | B | L)) == B26); in addrmod2()
898 ASSERT(!x.rn_.is(ip) && ((instr & L) == L || !rd.is(ip))); in addrmod2()
899 mov(ip, Operand(x.offset_), LeaveCC, Instruction::ConditionField(instr)); in addrmod2()
900 addrmod2(instr, rd, MemOperand(x.rn_, ip, x.am_)); in addrmod2()
904 instr |= offset_12; in addrmod2()
910 instr |= B25 | x.shift_imm_*B7 | x.shift_op_ | x.rm_.code(); in addrmod2()
913 emit(instr | am | x.rn_.code()*B16 | rd.code()*B12); in addrmod2()
917 void Assembler::addrmod3(Instr instr, Register rd, const MemOperand& x) { in addrmod3() argument
918 ASSERT((instr & ~(kCondMask | L | S6 | H)) == (B4 | B7)); in addrmod3()
931 ASSERT(!x.rn_.is(ip) && ((instr & L) == L || !rd.is(ip))); in addrmod3()
932 mov(ip, Operand(x.offset_), LeaveCC, Instruction::ConditionField(instr)); in addrmod3()
933 addrmod3(instr, rd, MemOperand(x.rn_, ip, x.am_)); in addrmod3()
937 instr |= B | (offset_8 >> 4)*B8 | (offset_8 & 0xf); in addrmod3()
941 ASSERT(!x.rn_.is(ip) && ((instr & L) == L || !rd.is(ip))); in addrmod3()
943 Instruction::ConditionField(instr)); in addrmod3()
944 addrmod3(instr, rd, MemOperand(x.rn_, ip, x.am_)); in addrmod3()
949 instr |= x.rm_.code(); in addrmod3()
952 emit(instr | am | x.rn_.code()*B16 | rd.code()*B12); in addrmod3()
956 void Assembler::addrmod4(Instr instr, Register rn, RegList rl) { in addrmod4() argument
957 ASSERT((instr & ~(kCondMask | P | U | W | L)) == B27); in addrmod4()
960 emit(instr | rn.code()*B16 | rl); in addrmod4()
964 void Assembler::addrmod5(Instr instr, CRegister crd, const MemOperand& x) { in addrmod5() argument
967 (instr & ~(kCondMask | kCoprocessorMask | P | U | N | W | L))); in addrmod5()
985 emit(instr | am | x.rn_.code()*B16 | crd.code()*B12 | offset_8); in addrmod5()
1377 Instr instr; in msr() local
1390 instr = I | rotate_imm*B8 | immed_8; in msr()
1393 instr = src.rm_.code(); in msr()
1395 emit(cond | instr | B24 | B21 | fields | 15*B12); in msr()
2401 bool Assembler::IsNop(Instr instr, int type) { in IsNop() argument
2404 return instr == (al | 13*B21 | type*B12 | type); in IsNop()
2632 Instr instr = instr_at(rinfo.pc()); in CheckConstPool() local
2634 ASSERT(IsLdrPcImmediateOffset(instr) && in CheckConstPool()
2635 GetLdrRegisterImmediateOffset(instr) == 0); in CheckConstPool()
2644 instr_at_put(rinfo.pc(), SetLdrRegisterImmediateOffset(instr, delta)); in CheckConstPool()