Home | History | Annotate | Download | only in optimizing

Lines Matching full:vixl

24 #include "vixl/a64/disasm-a64.h"
25 #include "vixl/a64/macro-assembler-a64.h"
31 // Convenience helpers to ease conversion to and from VIXL operands.
37 return vixl::kSPRegInternalCode;
40 return vixl::kZeroRegCode;
46 if (code == vixl::kSPRegInternalCode) {
49 if (code == vixl::kZeroRegCode) {
55 static inline vixl::Register XRegisterFrom(Location location) {
57 return vixl::Register::XRegFromCode(VIXLRegCodeFromART(location.reg()));
60 static inline vixl::Register WRegisterFrom(Location location) {
62 return vixl::Register::WRegFromCode(VIXLRegCodeFromART(location.reg()));
65 static inline vixl::Register RegisterFrom(Location location, Primitive::Type type) {
70 static inline vixl::Register OutputRegister(HInstruction* instr) {
74 static inline vixl::Register InputRegisterAt(HInstruction* instr, int input_index) {
79 static inline vixl::FPRegister DRegisterFrom(Location location) {
81 return vixl::FPRegister::DRegFromCode(location.reg());
84 static inline vixl::FPRegister SRegisterFrom(Location location) {
86 return vixl::FPRegister::SRegFromCode(location.reg());
89 static inline vixl::FPRegister FPRegisterFrom(Location location, Primitive::Type type) {
94 static inline vixl::FPRegister OutputFPRegister(HInstruction* instr) {
98 static inline vixl::FPRegister InputFPRegisterAt(HInstruction* instr, int input_index) {
103 static inline vixl::CPURegister CPURegisterFrom(Location location, Primitive::Type type) {
104 return Primitive::IsFloatingPointType(type) ? vixl::CPURegister(FPRegisterFrom(location, type))
105 : vixl::CPURegister(RegisterFrom(location, type));
108 static inline vixl::CPURegister OutputCPURegister(HInstruction* instr) {
110 ? static_cast<vixl::CPURegister>(OutputFPRegister(instr))
111 : static_cast<vixl::CPURegister>(OutputRegister(instr));
114 static inline vixl::CPURegister InputCPURegisterAt(HInstruction* instr, int index) {
116 ? static_cast<vixl::CPURegister>(InputFPRegisterAt(instr, index))
117 : static_cast<vixl::CPURegister>(InputRegisterAt(instr, index));
132 static inline vixl::Operand OperandFrom(Location location, Primitive::Type type) {
134 return vixl::Operand(RegisterFrom(location, type));
136 return vixl::Operand(Int64ConstantFrom(location));
140 static inline vixl::Operand InputOperandAt(HInstruction* instr, int input_index) {
145 static inline vixl::MemOperand StackOperandFrom(Location location) {
146 return vixl::MemOperand(vixl::sp, location.GetStackIndex());
149 static inline vixl::MemOperand HeapOperand(const vixl::Register& base, size_t offset = 0) {
152 return vixl::MemOperand(base.X(), offset);
155 static inline vixl::MemOperand HeapOperand(const vixl::Register& base,
156 const vixl::Register& regoffset,
157 vixl::Shift shift = vixl::LSL,
161 return vixl::MemOperand(base.X(), regoffset, shift, shift_amount);
164 static inline vixl::MemOperand HeapOperand(const vixl::Register& base, Offset offset) {
168 static inline vixl::MemOperand HeapOperandFrom(Location location, Offset offset) {
172 static inline Location LocationFrom(const vixl::Register& reg) {
176 static inline Location LocationFrom(const vixl::FPRegister& fpreg) {
180 static inline vixl::Operand OperandFromMemOperand(const vixl::MemOperand& mem_op) {
182 return vixl::Operand(mem_op.offset());
185 if (mem_op.extend() != vixl::NO_EXTEND) {
186 return vixl::Operand(mem_op.regoffset(), mem_op.extend(), mem_op.shift_amount());
187 } else if (mem_op.shift() != vixl::NO_SHIFT) {
188 return vixl::Operand(mem_op.regoffset(), mem_op.shift(), mem_op.shift_amount());
200 // For single uses we let VIXL handle the constant generation since it will
215 return vixl::Assembler::IsImmLogical(value, vixl::kXRegSize);
218 return vixl::Assembler::IsImmMovn(value, vixl::kXRegSize);
228 // If `value` does not fit but `-value` does, VIXL will automatically use
230 return vixl::Assembler::IsImmAddSub(value) || vixl::Assembler::IsImmAddSub(-value);
244 // Check if registers in art register set have the same register code in vixl. If the register
245 // codes are same, we can initialize vixl register list simply by the register masks. Currently,
246 // only SP/WSP and ZXR/WZR codes are different between art and vixl.
266 static inline vixl::Shift ShiftFromOpKind(HArm64DataProcWithShifterOp::OpKind op_kind) {
268 case HArm64DataProcWithShifterOp::kASR: return vixl::ASR;
269 case HArm64DataProcWithShifterOp::kLSL: return vixl::LSL;
270 case HArm64DataProcWithShifterOp::kLSR: return vixl::LSR;
274 return vixl::NO_SHIFT;
278 static inline vixl::Extend ExtendFromOpKind(HArm64DataProcWithShifterOp::OpKind op_kind) {
280 case HArm64DataProcWithShifterOp::kUXTB: return vixl::UXTB;
281 case HArm64DataProcWithShifterOp::kUXTH: return vixl::UXTH;
282 case HArm64DataProcWithShifterOp::kUXTW: return vixl::UXTW;
283 case HArm64DataProcWithShifterOp::kSXTB: return vixl::SXTB;
284 case HArm64DataProcWithShifterOp::kSXTH: return vixl::SXTH;
285 case HArm64DataProcWithShifterOp::kSXTW: return vixl::SXTW;
289 return vixl::NO_EXTEND;