Lines Matching defs:instr

70 static inline vixl::Register OutputRegister(HInstruction* instr) {
71 return RegisterFrom(instr->GetLocations()->Out(), instr->GetType());
74 static inline vixl::Register InputRegisterAt(HInstruction* instr, int input_index) {
75 return RegisterFrom(instr->GetLocations()->InAt(input_index),
76 instr->InputAt(input_index)->GetType());
94 static inline vixl::FPRegister OutputFPRegister(HInstruction* instr) {
95 return FPRegisterFrom(instr->GetLocations()->Out(), instr->GetType());
98 static inline vixl::FPRegister InputFPRegisterAt(HInstruction* instr, int input_index) {
99 return FPRegisterFrom(instr->GetLocations()->InAt(input_index),
100 instr->InputAt(input_index)->GetType());
108 static inline vixl::CPURegister OutputCPURegister(HInstruction* instr) {
109 return Primitive::IsFloatingPointType(instr->GetType())
110 ? static_cast<vixl::CPURegister>(OutputFPRegister(instr))
111 : static_cast<vixl::CPURegister>(OutputRegister(instr));
114 static inline vixl::CPURegister InputCPURegisterAt(HInstruction* instr, int index) {
115 return Primitive::IsFloatingPointType(instr->InputAt(index)->GetType())
116 ? static_cast<vixl::CPURegister>(InputFPRegisterAt(instr, index))
117 : static_cast<vixl::CPURegister>(InputRegisterAt(instr, index));
121 HConstant* instr = location.GetConstant();
122 if (instr->IsIntConstant()) {
123 return instr->AsIntConstant()->GetValue();
124 } else if (instr->IsNullConstant()) {
127 DCHECK(instr->IsLongConstant()) << instr->DebugName();
128 return instr->AsLongConstant()->GetValue();
140 static inline vixl::Operand InputOperandAt(HInstruction* instr, int input_index) {
141 return OperandFrom(instr->GetLocations()->InAt(input_index),
142 instr->InputAt(input_index)->GetType());
196 static bool CanEncodeConstantAsImmediate(HConstant* constant, HInstruction* instr) {
207 if (instr->IsRor()) {
213 if (instr->IsAnd() || instr->IsOr() || instr->IsXor()) {
216 } else if (instr->IsNeg()) {
220 DCHECK(instr->IsAdd() ||
221 instr->IsArm64IntermediateAddress() ||
222 instr->IsBoundsCheck() ||
223 instr->IsCompare() ||
224 instr->IsCondition() ||
225 instr->IsSub())
226 << instr->DebugName();
235 HInstruction* instr) {
237 && CanEncodeConstantAsImmediate(constant->AsConstant(), instr)) {
308 static inline bool HasShifterOperand(HInstruction* instr) {
311 bool res = instr->IsAdd() || instr->IsAnd() || instr->IsNeg() ||
312 instr->IsOr() || instr->IsSub() || instr->IsXor();