• Home
  • Raw
  • Download

Lines Matching refs:arm

43 class AssemblerArm32Test : public AssemblerArmTest<arm::Arm32Assembler,
44 arm::Register, arm::SRegister,
45 uint32_t, arm::ShifterOperand, arm::Condition> {
69 new arm::Register(arm::R0), in SetUpHelpers()
70 new arm::Register(arm::R1), in SetUpHelpers()
71 new arm::Register(arm::R4), in SetUpHelpers()
72 new arm::Register(arm::R8), in SetUpHelpers()
73 new arm::Register(arm::R11), in SetUpHelpers()
74 new arm::Register(arm::R12), in SetUpHelpers()
75 new arm::Register(arm::R13), in SetUpHelpers()
76 new arm::Register(arm::R14), in SetUpHelpers()
77 new arm::Register(arm::R15) in SetUpHelpers()
82 new arm::Register(arm::R0), in SetUpHelpers()
83 new arm::Register(arm::R1), in SetUpHelpers()
84 new arm::Register(arm::R2), in SetUpHelpers()
85 new arm::Register(arm::R3), in SetUpHelpers()
86 new arm::Register(arm::R4), in SetUpHelpers()
87 new arm::Register(arm::R5), in SetUpHelpers()
88 new arm::Register(arm::R6), in SetUpHelpers()
89 new arm::Register(arm::R7), in SetUpHelpers()
90 new arm::Register(arm::R8), in SetUpHelpers()
91 new arm::Register(arm::R9), in SetUpHelpers()
92 new arm::Register(arm::R10), in SetUpHelpers()
93 new arm::Register(arm::R11), in SetUpHelpers()
94 new arm::Register(arm::R12), in SetUpHelpers()
95 new arm::Register(arm::R13), in SetUpHelpers()
96 new arm::Register(arm::R14), in SetUpHelpers()
97 new arm::Register(arm::R15) in SetUpHelpers()
103 conditions_.push_back(arm::Condition::EQ); in SetUpHelpers()
104 conditions_.push_back(arm::Condition::NE); in SetUpHelpers()
105 conditions_.push_back(arm::Condition::CS); in SetUpHelpers()
106 conditions_.push_back(arm::Condition::CC); in SetUpHelpers()
107 conditions_.push_back(arm::Condition::MI); in SetUpHelpers()
108 conditions_.push_back(arm::Condition::PL); in SetUpHelpers()
109 conditions_.push_back(arm::Condition::VS); in SetUpHelpers()
110 conditions_.push_back(arm::Condition::VC); in SetUpHelpers()
111 conditions_.push_back(arm::Condition::HI); in SetUpHelpers()
112 conditions_.push_back(arm::Condition::LS); in SetUpHelpers()
113 conditions_.push_back(arm::Condition::GE); in SetUpHelpers()
114 conditions_.push_back(arm::Condition::LT); in SetUpHelpers()
115 conditions_.push_back(arm::Condition::GT); in SetUpHelpers()
116 conditions_.push_back(arm::Condition::LE); in SetUpHelpers()
117 conditions_.push_back(arm::Condition::AL); in SetUpHelpers()
119 conditions_.push_back(arm::Condition::EQ); in SetUpHelpers()
120 conditions_.push_back(arm::Condition::NE); in SetUpHelpers()
121 conditions_.push_back(arm::Condition::CC); in SetUpHelpers()
122 conditions_.push_back(arm::Condition::VC); in SetUpHelpers()
123 conditions_.push_back(arm::Condition::HI); in SetUpHelpers()
124 conditions_.push_back(arm::Condition::LT); in SetUpHelpers()
125 conditions_.push_back(arm::Condition::AL); in SetUpHelpers()
128 shifter_operands_.push_back(arm::ShifterOperand(0)); in SetUpHelpers()
129 shifter_operands_.push_back(arm::ShifterOperand(1)); in SetUpHelpers()
130 shifter_operands_.push_back(arm::ShifterOperand(2)); in SetUpHelpers()
131 shifter_operands_.push_back(arm::ShifterOperand(3)); in SetUpHelpers()
132 shifter_operands_.push_back(arm::ShifterOperand(4)); in SetUpHelpers()
133 shifter_operands_.push_back(arm::ShifterOperand(5)); in SetUpHelpers()
134 shifter_operands_.push_back(arm::ShifterOperand(127)); in SetUpHelpers()
135 shifter_operands_.push_back(arm::ShifterOperand(128)); in SetUpHelpers()
136 shifter_operands_.push_back(arm::ShifterOperand(254)); in SetUpHelpers()
137 shifter_operands_.push_back(arm::ShifterOperand(255)); in SetUpHelpers()
140 shifter_operands_.push_back(arm::ShifterOperand(arm::R0)); in SetUpHelpers()
141 shifter_operands_.push_back(arm::ShifterOperand(arm::R1)); in SetUpHelpers()
142 shifter_operands_.push_back(arm::ShifterOperand(arm::R2)); in SetUpHelpers()
143 shifter_operands_.push_back(arm::ShifterOperand(arm::R3)); in SetUpHelpers()
144 shifter_operands_.push_back(arm::ShifterOperand(arm::R4)); in SetUpHelpers()
145 shifter_operands_.push_back(arm::ShifterOperand(arm::R5)); in SetUpHelpers()
146 shifter_operands_.push_back(arm::ShifterOperand(arm::R6)); in SetUpHelpers()
147 shifter_operands_.push_back(arm::ShifterOperand(arm::R7)); in SetUpHelpers()
148 shifter_operands_.push_back(arm::ShifterOperand(arm::R8)); in SetUpHelpers()
149 shifter_operands_.push_back(arm::ShifterOperand(arm::R9)); in SetUpHelpers()
150 shifter_operands_.push_back(arm::ShifterOperand(arm::R10)); in SetUpHelpers()
151 shifter_operands_.push_back(arm::ShifterOperand(arm::R11)); in SetUpHelpers()
152 shifter_operands_.push_back(arm::ShifterOperand(arm::R12)); in SetUpHelpers()
153 shifter_operands_.push_back(arm::ShifterOperand(arm::R13)); in SetUpHelpers()
155 shifter_operands_.push_back(arm::ShifterOperand(arm::R0)); in SetUpHelpers()
156 shifter_operands_.push_back(arm::ShifterOperand(arm::R1)); in SetUpHelpers()
157 shifter_operands_.push_back(arm::ShifterOperand(arm::R4)); in SetUpHelpers()
158 shifter_operands_.push_back(arm::ShifterOperand(arm::R8)); in SetUpHelpers()
159 shifter_operands_.push_back(arm::ShifterOperand(arm::R11)); in SetUpHelpers()
160 shifter_operands_.push_back(arm::ShifterOperand(arm::R12)); in SetUpHelpers()
161 shifter_operands_.push_back(arm::ShifterOperand(arm::R13)); in SetUpHelpers()
164 std::vector<arm::Shift> shifts { in SetUpHelpers()
165 arm::Shift::LSL, arm::Shift::LSR, arm::Shift::ASR, arm::Shift::ROR, arm::Shift::RRX in SetUpHelpers()
169 for (arm::Shift shift : shifts) { in SetUpHelpers()
170 for (arm::Register* reg : registers_) { // Note: this will pick up the sparse set. in SetUpHelpers()
171 if (*reg == arm::R15) { // Skip PC. in SetUpHelpers()
174 if (shift != arm::Shift::RRX) { in SetUpHelpers()
177 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, imm)); in SetUpHelpers()
180 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 1)); in SetUpHelpers()
181 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 2)); in SetUpHelpers()
182 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 3)); in SetUpHelpers()
183 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 7)); in SetUpHelpers()
184 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 15)); in SetUpHelpers()
185 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 16)); in SetUpHelpers()
186 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 30)); in SetUpHelpers()
187 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 31)); in SetUpHelpers()
191 shifter_operands_.push_back(arm::ShifterOperand(*reg, shift, 0)); in SetUpHelpers()
197 std::vector<arm::ShifterOperand> CreateRegisterShifts(std::vector<arm::Register*>& base_regs, in CreateRegisterShifts()
199 std::vector<arm::ShifterOperand> res; in CreateRegisterShifts()
200 static constexpr arm::Shift kShifts[] = { arm::Shift::LSL, arm::Shift::LSR, arm::Shift::ASR, in CreateRegisterShifts()
201 arm::Shift::ROR }; in CreateRegisterShifts()
203 for (arm::Shift shift : kShifts) { in CreateRegisterShifts()
204 for (arm::Register* reg : base_regs) { in CreateRegisterShifts()
206 res.push_back(arm::ShifterOperand(*reg, shift, shift_min)); in CreateRegisterShifts()
208 res.push_back(arm::ShifterOperand(*reg, shift, shift_max)); in CreateRegisterShifts()
210 res.push_back(arm::ShifterOperand(*reg, shift, middle)); in CreateRegisterShifts()
211 res.push_back(arm::ShifterOperand(*reg, shift, middle - 1)); in CreateRegisterShifts()
212 res.push_back(arm::ShifterOperand(*reg, shift, middle + 1)); in CreateRegisterShifts()
225 std::vector<arm::Register*> GetRegisters() OVERRIDE { in GetRegisters()
233 std::vector<arm::Condition>& GetConditions() OVERRIDE { in GetConditions()
237 std::string GetConditionString(arm::Condition c) OVERRIDE { in GetConditionString()
243 arm::Register GetPCRegister() OVERRIDE { in GetPCRegister()
244 return arm::R15; in GetPCRegister()
247 std::vector<arm::ShifterOperand>& GetShiftOperands() OVERRIDE { in GetShiftOperands()
251 std::string GetShiftString(arm::ShifterOperand sop) OVERRIDE { in GetShiftString()
255 if (sop.GetShift() == arm::Shift::RRX) { in GetShiftString()
296 void TemplateHelper(std::function<void(arm::Register)> f, int depth ATTRIBUTE_UNUSED, in TemplateHelper()
299 std::vector<arm::Register*> registers = without_pc ? GetRegistersWithoutPC() : GetRegisters(); in TemplateHelper()
315 void TemplateHelper(std::function<void(const arm::ShifterOperand&)> f, int depth ATTRIBUTE_UNUSED, in TemplateHelper()
317 for (const arm::ShifterOperand& shift : GetShiftOperands()) { in TemplateHelper()
330 void TemplateHelper(std::function<void(arm::Condition)> f, int depth ATTRIBUTE_UNUSED, in TemplateHelper()
332 for (arm::Condition c : GetConditions()) { in TemplateHelper()
345 void TemplateHelper(std::function<void(arm::Register, Args...)> f, int depth, bool without_pc, in TemplateHelper()
347 std::vector<arm::Register*> registers = without_pc ? GetRegistersWithoutPC() : GetRegisters(); in TemplateHelper()
366 void TemplateHelper(std::function<void(const arm::ShifterOperand&, Args...)> f, int depth, in TemplateHelper()
368 for (const arm::ShifterOperand& shift : GetShiftOperands()) { in TemplateHelper()
384 void TemplateHelper(std::function<void(arm::Condition, Args...)> f, int depth, bool without_pc, in TemplateHelper()
386 for (arm::Condition c : GetConditions()) { in TemplateHelper()
401 std::function<void(T1, T2)> GetBoundFunction2(void (arm::Arm32Assembler::*f)(T1, T2)) { in GetBoundFunction2()
406 std::function<void(T1, T2, T3)> GetBoundFunction3(void (arm::Arm32Assembler::*f)(T1, T2, T3)) { in GetBoundFunction3()
412 void (arm::Arm32Assembler::*f)(T1, T2, T3, T4)) { in GetBoundFunction4()
418 void (arm::Arm32Assembler::*f)(T1, T2, T3, T4, T5)) { in GetBoundFunction5()
438 void T2Helper(void (arm::Arm32Assembler::*f)(Args...), bool without_pc, std::string fmt, in T2Helper()
444 void T3Helper(void (arm::Arm32Assembler::*f)(Args...), bool without_pc, std::string fmt, in T3Helper()
450 void T4Helper(void (arm::Arm32Assembler::*f)(Args...), bool without_pc, std::string fmt, in T4Helper()
456 void T5Helper(void (arm::Arm32Assembler::*f)(Args...), bool without_pc, std::string fmt, in T5Helper()
465 if (std::is_same<T, arm::Register>::value) { in CountHelper()
471 } else if (std::is_same<T, const arm::ShifterOperand&>::value) { in CountHelper()
473 } else if (std::is_same<T, arm::Condition>::value) { in CountHelper()
484 if (std::is_same<T1, arm::Register>::value) { in CountHelper()
489 } else if (std::is_same<T1, const arm::ShifterOperand&>::value) { in CountHelper()
491 } else if (std::is_same<T1, arm::Condition>::value) { in CountHelper()
505 std::vector<arm::Register*> registers_;
506 std::vector<arm::Condition> conditions_;
507 std::vector<arm::ShifterOperand> shifter_operands_;
535 DriverStr(RepeatRRiiC(&arm::Arm32Assembler::sbfx, immediates, in TEST_F()
559 DriverStr(RepeatRRiiC(&arm::Arm32Assembler::ubfx, immediates, in TEST_F()
564 T4Helper(&arm::Arm32Assembler::mul, true, "mul{cond} {reg1}, {reg2}, {reg3}", "mul"); in TEST_F()
568 T5Helper(&arm::Arm32Assembler::mla, true, "mla{cond} {reg1}, {reg2}, {reg3}, {reg4}", "mul"); in TEST_F()
579 T4Helper(&arm::Arm32Assembler::sdiv, true, "sdiv{cond} {reg1}, {reg2}, {reg3}", "sdiv"); in TEST_F()
583 T4Helper(&arm::Arm32Assembler::udiv, true, "udiv{cond} {reg1}, {reg2}, {reg3}", "udiv"); in TEST_F()
587 T4Helper(&arm::Arm32Assembler::and_, true, "and{cond} {reg1}, {reg2}, {shift}", "and"); in TEST_F()
591 T4Helper(&arm::Arm32Assembler::eor, true, "eor{cond} {reg1}, {reg2}, {shift}", "eor"); in TEST_F()
595 T4Helper(&arm::Arm32Assembler::orr, true, "orr{cond} {reg1}, {reg2}, {shift}", "orr"); in TEST_F()
599 T4Helper(&arm::Arm32Assembler::orrs, true, "orr{cond}s {reg1}, {reg2}, {shift}", "orrs"); in TEST_F()
603 T4Helper(&arm::Arm32Assembler::bic, true, "bic{cond} {reg1}, {reg2}, {shift}", "bic"); in TEST_F()
607 T3Helper(&arm::Arm32Assembler::mov, true, "mov{cond} {reg1}, {shift}", "mov"); in TEST_F()
611 T3Helper(&arm::Arm32Assembler::movs, true, "mov{cond}s {reg1}, {shift}", "movs"); in TEST_F()
615 T3Helper(&arm::Arm32Assembler::mvn, true, "mvn{cond} {reg1}, {shift}", "mvn"); in TEST_F()
619 T3Helper(&arm::Arm32Assembler::mvns, true, "mvn{cond}s {reg1}, {shift}", "mvns"); in TEST_F()
623 T4Helper(&arm::Arm32Assembler::add, false, "add{cond} {reg1}, {reg2}, {shift}", "add"); in TEST_F()
627 T4Helper(&arm::Arm32Assembler::adds, false, "add{cond}s {reg1}, {reg2}, {shift}", "adds"); in TEST_F()
631 T4Helper(&arm::Arm32Assembler::adc, false, "adc{cond} {reg1}, {reg2}, {shift}", "adc"); in TEST_F()
635 T4Helper(&arm::Arm32Assembler::sub, false, "sub{cond} {reg1}, {reg2}, {shift}", "sub"); in TEST_F()
639 T4Helper(&arm::Arm32Assembler::subs, false, "sub{cond}s {reg1}, {reg2}, {shift}", "subs"); in TEST_F()
643 T4Helper(&arm::Arm32Assembler::sbc, false, "sbc{cond} {reg1}, {reg2}, {shift}", "sbc"); in TEST_F()
647 T4Helper(&arm::Arm32Assembler::rsb, true, "rsb{cond} {reg1}, {reg2}, {shift}", "rsb"); in TEST_F()
651 T4Helper(&arm::Arm32Assembler::rsbs, true, "rsb{cond}s {reg1}, {reg2}, {shift}", "rsbs"); in TEST_F()
655 T4Helper(&arm::Arm32Assembler::rsc, true, "rsc{cond} {reg1}, {reg2}, {shift}", "rsc"); in TEST_F()
665 T3Helper(&arm::Arm32Assembler::clz, true, "clz{cond} {reg1}, {reg2}", "clz"); in TEST_F()
669 T3Helper(&arm::Arm32Assembler::tst, true, "tst{cond} {reg1}, {shift}", "tst"); in TEST_F()
673 T3Helper(&arm::Arm32Assembler::teq, true, "teq{cond} {reg1}, {shift}", "teq"); in TEST_F()
677 T3Helper(&arm::Arm32Assembler::cmp, true, "cmp{cond} {reg1}, {shift}", "cmp"); in TEST_F()
681 T3Helper(&arm::Arm32Assembler::cmn, true, "cmn{cond} {reg1}, {shift}", "cmn"); in TEST_F()
685 T2Helper(&arm::Arm32Assembler::blx, true, "blx{cond} {reg1}", "blx"); in TEST_F()
689 T2Helper(&arm::Arm32Assembler::bx, true, "bx{cond} {reg1}", "bx"); in TEST_F()
701 GetAssembler()->ldrexd(arm::R0, arm::R1, arm::R0); in TEST_F()
702 GetAssembler()->ldrexd(arm::R0, arm::R1, arm::R1); in TEST_F()
703 GetAssembler()->ldrexd(arm::R0, arm::R1, arm::R2); in TEST_F()
713 GetAssembler()->strexd(arm::R9, arm::R0, arm::R1, arm::R0); in TEST_F()
714 GetAssembler()->strexd(arm::R9, arm::R0, arm::R1, arm::R1); in TEST_F()
715 GetAssembler()->strexd(arm::R9, arm::R0, arm::R1, arm::R2); in TEST_F()