Lines Matching refs:std
55 typedef std::string (*TestFn)(AssemblerTest* assembler_test, Ass* assembler);
57 void DriverFn(TestFn f, const std::string& test_name) { in DriverFn()
62 void DriverStr(const std::string& assembly_string, const std::string& test_name) { in DriverStr()
66 std::string RepeatR(void (Ass::*f)(Reg), const std::string& fmt) { in RepeatR()
73 std::string Repeatr(void (Ass::*f)(Reg), const std::string& fmt) { in Repeatr()
80 std::string RepeatRR(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRR()
89 std::string RepeatRRNoDupes(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRRNoDupes()
98 std::string Repeatrr(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatrr()
107 std::string RepeatRRR(void (Ass::*f)(Reg, Reg, Reg), const std::string& fmt) { in RepeatRRR()
118 std::string Repeatrb(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in Repeatrb()
127 std::string RepeatRr(void (Ass::*f)(Reg, Reg), const std::string& fmt) { in RepeatRr()
136 std::string RepeatRI(void (Ass::*f)(Reg, const Imm&), size_t imm_bytes, const std::string& fmt) { in RepeatRI()
140 std::string Repeatri(void (Ass::*f)(Reg, const Imm&), size_t imm_bytes, const std::string& fmt) { in Repeatri()
145 std::string RepeatTemplatedRegistersImmBits(void (Ass::*f)(Reg1, Reg2, ImmType),
147 const std::vector<Reg1*> reg1_registers,
148 const std::vector<Reg2*> reg2_registers,
149 std::string (AssemblerTest::*GetName1)(const Reg1&),
150 std::string (AssemblerTest::*GetName2)(const Reg2&),
151 const std::string& fmt,
154 std::string str;
155 std::vector<int64_t> imms = CreateImmediateValuesBits(abs(imm_bits), (imm_bits > 0));
162 std::string base = fmt;
164 std::string reg1_string = (this->*GetName1)(*reg1);
166 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) {
170 std::string reg2_string = (this->*GetName2)(*reg2);
172 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) {
177 if (imm_index != std::string::npos) {
178 std::ostringstream sreg;
180 std::string imm_string = sreg.str();
197 std::string RepeatTemplatedRegistersImmBits(void (Ass::*f)(Reg1, Reg2, Reg3, ImmType), in RepeatTemplatedRegistersImmBits()
199 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegistersImmBits()
200 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegistersImmBits()
201 const std::vector<Reg3*> reg3_registers, in RepeatTemplatedRegistersImmBits()
202 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegistersImmBits()
203 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegistersImmBits()
204 std::string (AssemblerTest::*GetName3)(const Reg3&), in RepeatTemplatedRegistersImmBits()
205 std::string fmt, in RepeatTemplatedRegistersImmBits()
207 std::string str; in RepeatTemplatedRegistersImmBits()
208 std::vector<int64_t> imms = CreateImmediateValuesBits(abs(imm_bits), (imm_bits > 0)); in RepeatTemplatedRegistersImmBits()
216 std::string base = fmt; in RepeatTemplatedRegistersImmBits()
218 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegistersImmBits()
220 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImmBits()
224 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegistersImmBits()
226 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImmBits()
230 std::string reg3_string = (this->*GetName3)(*reg3); in RepeatTemplatedRegistersImmBits()
232 while ((reg3_index = base.find(REG3_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImmBits()
237 if (imm_index != std::string::npos) { in RepeatTemplatedRegistersImmBits()
238 std::ostringstream sreg; in RepeatTemplatedRegistersImmBits()
240 std::string imm_string = sreg.str(); in RepeatTemplatedRegistersImmBits()
258 std::string RepeatTemplatedImmBitsRegisters(void (Ass::*f)(ImmType, Reg1, Reg2), in RepeatTemplatedImmBitsRegisters()
259 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedImmBitsRegisters()
260 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedImmBitsRegisters()
261 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedImmBitsRegisters()
262 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedImmBitsRegisters()
264 const std::string& fmt) { in RepeatTemplatedImmBitsRegisters()
265 std::vector<int64_t> imms = CreateImmediateValuesBits(abs(imm_bits), (imm_bits > 0)); in RepeatTemplatedImmBitsRegisters()
269 std::string str; in RepeatTemplatedImmBitsRegisters()
275 std::string base = fmt; in RepeatTemplatedImmBitsRegisters()
277 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedImmBitsRegisters()
279 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedImmBitsRegisters()
283 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedImmBitsRegisters()
285 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedImmBitsRegisters()
290 if (imm_index != std::string::npos) { in RepeatTemplatedImmBitsRegisters()
291 std::ostringstream sreg; in RepeatTemplatedImmBitsRegisters()
293 std::string imm_string = sreg.str(); in RepeatTemplatedImmBitsRegisters()
310 std::string RepeatTemplatedRegisterImmBits(void (Ass::*f)(RegType, ImmType), in RepeatTemplatedRegisterImmBits()
312 const std::vector<RegType*> registers, in RepeatTemplatedRegisterImmBits()
313 std::string (AssemblerTest::*GetName)(const RegType&), in RepeatTemplatedRegisterImmBits()
314 const std::string& fmt, in RepeatTemplatedRegisterImmBits()
316 std::string str; in RepeatTemplatedRegisterImmBits()
317 std::vector<int64_t> imms = CreateImmediateValuesBits(abs(imm_bits), (imm_bits > 0)); in RepeatTemplatedRegisterImmBits()
323 std::string base = fmt; in RepeatTemplatedRegisterImmBits()
325 std::string reg_string = (this->*GetName)(*reg); in RepeatTemplatedRegisterImmBits()
327 while ((reg_index = base.find(REG_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisterImmBits()
332 if (imm_index != std::string::npos) { in RepeatTemplatedRegisterImmBits()
333 std::ostringstream sreg; in RepeatTemplatedRegisterImmBits()
335 std::string imm_string = sreg.str(); in RepeatTemplatedRegisterImmBits()
351 std::string RepeatRRIb(void (Ass::*f)(Reg, Reg, ImmType),
353 const std::string& fmt,
366 std::string RepeatRRRIb(void (Ass::*f)(Reg, Reg, Reg, ImmType),
368 const std::string& fmt,
383 std::string RepeatRIb(void (Ass::*f)(Reg, ImmType), int imm_bits, std::string fmt, int bias = 0) {
393 std::string RepeatFRIb(void (Ass::*f)(FPReg, Reg, ImmType),
395 const std::string& fmt,
407 std::string RepeatFF(void (Ass::*f)(FPReg, FPReg), const std::string& fmt) { in RepeatFF()
416 std::string RepeatFFF(void (Ass::*f)(FPReg, FPReg, FPReg), const std::string& fmt) { in RepeatFFF()
427 std::string RepeatFFR(void (Ass::*f)(FPReg, FPReg, Reg), const std::string& fmt) { in RepeatFFR()
439 std::string RepeatFFI(void (Ass::*f)(FPReg, FPReg, const Imm&), in RepeatFFI()
441 const std::string& fmt) { in RepeatFFI()
452 std::string RepeatFFIb(void (Ass::*f)(FPReg, FPReg, ImmType), in RepeatFFIb()
454 const std::string& fmt) { in RepeatFFIb()
465 std::string RepeatIbFF(void (Ass::*f)(ImmType, FPReg, FPReg), in RepeatIbFF()
467 const std::string& fmt) { in RepeatIbFF()
477 std::string RepeatFR(void (Ass::*f)(FPReg, Reg), const std::string& fmt) { in RepeatFR()
486 std::string RepeatFr(void (Ass::*f)(FPReg, Reg), const std::string& fmt) { in RepeatFr()
495 std::string RepeatRF(void (Ass::*f)(Reg, FPReg), const std::string& fmt) { in RepeatRF()
504 std::string RepeatrF(void (Ass::*f)(Reg, FPReg), const std::string& fmt) { in RepeatrF()
513 std::string RepeatI(void (Ass::*f)(const Imm&),
515 const std::string& fmt,
517 std::string str;
518 std::vector<int64_t> imms = CreateImmediateValues(imm_bytes, as_uint);
525 std::string base = fmt;
528 if (imm_index != std::string::npos) {
529 std::ostringstream sreg;
531 std::string imm_string = sreg.str();
545 std::string RepeatVV(void (Ass::*f)(VecReg, VecReg), const std::string& fmt) { in RepeatVV()
554 std::string RepeatVVV(void (Ass::*f)(VecReg, VecReg, VecReg), const std::string& fmt) { in RepeatVVV()
565 std::string RepeatVR(void (Ass::*f)(VecReg, Reg), const std::string& fmt) { in RepeatVR()
576 std::string RepeatVIb(void (Ass::*f)(VecReg, ImmType),
578 std::string fmt,
589 std::string RepeatVRIb(void (Ass::*f)(VecReg, Reg, ImmType),
591 const std::string& fmt,
607 std::string RepeatVVIb(void (Ass::*f)(VecReg, VecReg, ImmType),
609 const std::string& fmt,
628 virtual std::vector<Reg*> GetRegisters() = 0;
630 virtual std::vector<FPReg*> GetFPRegisters() { in GetFPRegisters()
635 virtual std::vector<VecReg*> GetVectorRegisters() { in GetVectorRegisters()
641 virtual std::string GetSecondaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { in GetSecondaryRegisterName()
647 virtual std::string GetTertiaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { in GetTertiaryRegisterName()
653 virtual std::string GetQuaternaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { in GetQuaternaryRegisterName()
658 std::string GetRegisterName(const Reg& reg) { in GetRegisterName()
696 virtual std::string GetArchitectureString() = 0;
699 virtual std::string GetAssemblerCmdName() { in GetAssemblerCmdName()
704 virtual std::string GetAssemblerParameters() { in GetAssemblerParameters()
709 virtual std::string GetObjdumpCmdName() { in GetObjdumpCmdName()
714 virtual std::string GetObjdumpParameters() { in GetObjdumpParameters()
719 virtual std::string GetDisassembleCmdName() { in GetDisassembleCmdName()
725 virtual std::string GetDisassembleParameters() = 0;
728 virtual std::vector<int64_t> CreateImmediateValues(size_t imm_bytes, bool as_uint = false) {
729 std::vector<int64_t> res;
773 virtual std::vector<int64_t> CreateImmediateValuesBits(const int imm_bits, bool as_uint = false) {
776 std::vector<int64_t> res;
831 std::string RepeatTemplatedRegister(void (Ass::*f)(RegType), in RepeatTemplatedRegister()
832 const std::vector<RegType*> registers, in RepeatTemplatedRegister()
833 std::string (AssemblerTest::*GetName)(const RegType&), in RepeatTemplatedRegister()
834 const std::string& fmt) { in RepeatTemplatedRegister()
835 std::string str; in RepeatTemplatedRegister()
838 std::string base = fmt; in RepeatTemplatedRegister()
840 std::string reg_string = (this->*GetName)(*reg); in RepeatTemplatedRegister()
842 if ((reg_index = base.find(REG_TOKEN)) != std::string::npos) { in RepeatTemplatedRegister()
857 std::string RepeatTemplatedRegisters(void (Ass::*f)(Reg1, Reg2), in RepeatTemplatedRegisters()
858 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegisters()
859 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegisters()
860 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegisters()
861 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegisters()
862 const std::string& fmt) { in RepeatTemplatedRegisters()
865 std::string str; in RepeatTemplatedRegisters()
869 std::string base = fmt; in RepeatTemplatedRegisters()
871 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegisters()
873 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
877 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegisters()
879 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
895 std::string RepeatTemplatedRegistersNoDupes(void (Ass::*f)(Reg1, Reg2), in RepeatTemplatedRegistersNoDupes()
896 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegistersNoDupes()
897 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegistersNoDupes()
898 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegistersNoDupes()
899 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegistersNoDupes()
900 const std::string& fmt) { in RepeatTemplatedRegistersNoDupes()
903 std::string str; in RepeatTemplatedRegistersNoDupes()
908 std::string base = fmt; in RepeatTemplatedRegistersNoDupes()
910 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegistersNoDupes()
912 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersNoDupes()
916 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegistersNoDupes()
918 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersNoDupes()
934 std::string RepeatTemplatedRegisters(void (Ass::*f)(Reg1, Reg2, Reg3), in RepeatTemplatedRegisters()
935 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegisters()
936 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegisters()
937 const std::vector<Reg3*> reg3_registers, in RepeatTemplatedRegisters()
938 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegisters()
939 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegisters()
940 std::string (AssemblerTest::*GetName3)(const Reg3&), in RepeatTemplatedRegisters()
941 const std::string& fmt) { in RepeatTemplatedRegisters()
942 std::string str; in RepeatTemplatedRegisters()
947 std::string base = fmt; in RepeatTemplatedRegisters()
949 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegisters()
951 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
955 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegisters()
957 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
961 std::string reg3_string = (this->*GetName3)(*reg3); in RepeatTemplatedRegisters()
963 while ((reg3_index = base.find(REG3_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
980 std::string RepeatTemplatedRegistersImm(void (Ass::*f)(Reg1, Reg2, const Imm&), in RepeatTemplatedRegistersImm()
981 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegistersImm()
982 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegistersImm()
983 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegistersImm()
984 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegistersImm()
986 const std::string& fmt) { in RepeatTemplatedRegistersImm()
987 std::vector<int64_t> imms = CreateImmediateValues(imm_bytes); in RepeatTemplatedRegistersImm()
990 std::string str; in RepeatTemplatedRegistersImm()
996 std::string base = fmt; in RepeatTemplatedRegistersImm()
998 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegistersImm()
1000 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImm()
1004 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegistersImm()
1006 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImm()
1011 if (imm_index != std::string::npos) { in RepeatTemplatedRegistersImm()
1012 std::ostringstream sreg; in RepeatTemplatedRegistersImm()
1014 std::string imm_string = sreg.str(); in RepeatTemplatedRegistersImm()
1031 std::string GetRegName(const Reg& reg) { in GetRegName()
1032 std::ostringstream sreg; in GetRegName()
1053 std::string GetFPRegName(const FPReg& reg) { in GetFPRegName()
1054 std::ostringstream sreg; in GetFPRegName()
1059 std::string GetVecRegName(const VecReg& reg) { in GetVecRegName()
1060 std::ostringstream sreg; in GetVecRegName()
1084 std::string RepeatRegisterImm(void (Ass::*f)(Reg, const Imm&), in RepeatRegisterImm()
1086 const std::string& fmt) { in RepeatRegisterImm()
1087 const std::vector<Reg*> registers = GetRegisters(); in RepeatRegisterImm()
1088 std::string str; in RepeatRegisterImm()
1089 std::vector<int64_t> imms = CreateImmediateValues(imm_bytes); in RepeatRegisterImm()
1097 std::string base = fmt; in RepeatRegisterImm()
1099 std::string reg_string = GetRegName<kRegView>(*reg); in RepeatRegisterImm()
1101 while ((reg_index = base.find(REG_TOKEN)) != std::string::npos) { in RepeatRegisterImm()
1106 if (imm_index != std::string::npos) { in RepeatRegisterImm()
1107 std::ostringstream sreg; in RepeatRegisterImm()
1109 std::string imm_string = sreg.str(); in RepeatRegisterImm()
1125 virtual void Pad(std::vector<uint8_t>& data ATTRIBUTE_UNUSED) { in Pad()
1128 void DriverWrapper(const std::string& assembly_text, const std::string& test_name) { in DriverWrapper()
1131 std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>(cs)); in DriverWrapper()
1141 std::unique_ptr<ArenaAllocator> arena_;
1142 std::unique_ptr<Ass> assembler_;
1143 std::unique_ptr<AssemblerTestInfrastructure> test_helper_;