Lines Matching refs:std

52   typedef std::string (*TestFn)(AssemblerTest* assembler_test, Ass* assembler);
54 void DriverFn(TestFn f, std::string test_name) { in DriverFn()
59 void DriverStr(std::string assembly_string, std::string test_name) { in DriverStr()
63 std::string RepeatR(void (Ass::*f)(Reg), std::string fmt) { in RepeatR()
70 std::string Repeatr(void (Ass::*f)(Reg), std::string fmt) { in Repeatr()
77 std::string RepeatRR(void (Ass::*f)(Reg, Reg), std::string fmt) { in RepeatRR()
86 std::string Repeatrr(void (Ass::*f)(Reg, Reg), std::string fmt) { in Repeatrr()
95 std::string Repeatrb(void (Ass::*f)(Reg, Reg), std::string fmt) { in Repeatrb()
104 std::string RepeatRr(void (Ass::*f)(Reg, Reg), std::string fmt) { in RepeatRr()
113 std::string RepeatRI(void (Ass::*f)(Reg, const Imm&), size_t imm_bytes, std::string fmt) { in RepeatRI()
117 std::string Repeatri(void (Ass::*f)(Reg, const Imm&), size_t imm_bytes, std::string fmt) { in Repeatri()
121 std::string RepeatFF(void (Ass::*f)(FPReg, FPReg), std::string fmt) { in RepeatFF()
130std::string RepeatFFI(void (Ass::*f)(FPReg, FPReg, const Imm&), size_t imm_bytes, std::string fmt)… in RepeatFFI()
140 std::string RepeatFR(void (Ass::*f)(FPReg, Reg), std::string fmt) { in RepeatFR()
149 std::string RepeatFr(void (Ass::*f)(FPReg, Reg), std::string fmt) { in RepeatFr()
158 std::string RepeatRF(void (Ass::*f)(Reg, FPReg), std::string fmt) { in RepeatRF()
167 std::string RepeatrF(void (Ass::*f)(Reg, FPReg), std::string fmt) { in RepeatrF()
176 std::string RepeatI(void (Ass::*f)(const Imm&), size_t imm_bytes, std::string fmt,
178 std::string str;
179 std::vector<int64_t> imms = CreateImmediateValues(imm_bytes, as_uint);
186 std::string base = fmt;
189 if (imm_index != std::string::npos) {
190 std::ostringstream sreg;
192 std::string imm_string = sreg.str();
213 virtual std::vector<Reg*> GetRegisters() = 0;
215 virtual std::vector<FPReg*> GetFPRegisters() { in GetFPRegisters()
221 virtual std::string GetSecondaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { in GetSecondaryRegisterName()
227 virtual std::string GetTertiaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { in GetTertiaryRegisterName()
233 virtual std::string GetQuaternaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { in GetQuaternaryRegisterName()
238 std::string GetRegisterName(const Reg& reg) { in GetRegisterName()
268 virtual std::string GetArchitectureString() = 0;
271 virtual std::string GetAssemblerCmdName() { in GetAssemblerCmdName()
276 virtual std::string GetAssemblerParameters() { in GetAssemblerParameters()
281 virtual std::string GetObjdumpCmdName() { in GetObjdumpCmdName()
286 virtual std::string GetObjdumpParameters() { in GetObjdumpParameters()
291 virtual std::string GetDisassembleCmdName() { in GetDisassembleCmdName()
297 virtual std::string GetDisassembleParameters() = 0;
300 virtual std::vector<int64_t> CreateImmediateValues(size_t imm_bytes, bool as_uint = false) {
301 std::vector<int64_t> res;
346 std::string RepeatTemplatedRegister(void (Ass::*f)(RegType), in RepeatTemplatedRegister()
347 const std::vector<RegType*> registers, in RepeatTemplatedRegister()
348 std::string (AssemblerTest::*GetName)(const RegType&), in RepeatTemplatedRegister()
349 std::string fmt) { in RepeatTemplatedRegister()
350 std::string str; in RepeatTemplatedRegister()
353 std::string base = fmt; in RepeatTemplatedRegister()
355 std::string reg_string = (this->*GetName)(*reg); in RepeatTemplatedRegister()
357 if ((reg_index = base.find(REG_TOKEN)) != std::string::npos) { in RepeatTemplatedRegister()
372 std::string RepeatTemplatedRegisters(void (Ass::*f)(Reg1, Reg2), in RepeatTemplatedRegisters()
373 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegisters()
374 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegisters()
375 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegisters()
376 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegisters()
377 std::string fmt) { in RepeatTemplatedRegisters()
380 std::string str; in RepeatTemplatedRegisters()
384 std::string base = fmt; in RepeatTemplatedRegisters()
386 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegisters()
388 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
392 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegisters()
394 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegisters()
410 std::string RepeatTemplatedRegistersImm(void (Ass::*f)(Reg1, Reg2, const Imm&), in RepeatTemplatedRegistersImm()
411 const std::vector<Reg1*> reg1_registers, in RepeatTemplatedRegistersImm()
412 const std::vector<Reg2*> reg2_registers, in RepeatTemplatedRegistersImm()
413 std::string (AssemblerTest::*GetName1)(const Reg1&), in RepeatTemplatedRegistersImm()
414 std::string (AssemblerTest::*GetName2)(const Reg2&), in RepeatTemplatedRegistersImm()
416 std::string fmt) { in RepeatTemplatedRegistersImm()
417 std::vector<int64_t> imms = CreateImmediateValues(imm_bytes); in RepeatTemplatedRegistersImm()
420 std::string str; in RepeatTemplatedRegistersImm()
426 std::string base = fmt; in RepeatTemplatedRegistersImm()
428 std::string reg1_string = (this->*GetName1)(*reg1); in RepeatTemplatedRegistersImm()
430 while ((reg1_index = base.find(REG1_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImm()
434 std::string reg2_string = (this->*GetName2)(*reg2); in RepeatTemplatedRegistersImm()
436 while ((reg2_index = base.find(REG2_TOKEN)) != std::string::npos) { in RepeatTemplatedRegistersImm()
441 if (imm_index != std::string::npos) { in RepeatTemplatedRegistersImm()
442 std::ostringstream sreg; in RepeatTemplatedRegistersImm()
444 std::string imm_string = sreg.str(); in RepeatTemplatedRegistersImm()
461 std::string GetRegName(const Reg& reg) { in GetRegName()
462 std::ostringstream sreg; in GetRegName()
483 std::string GetFPRegName(const FPReg& reg) { in GetFPRegName()
484 std::ostringstream sreg; in GetFPRegName()
507 std::string RepeatRegisterImm(void (Ass::*f)(Reg, const Imm&), size_t imm_bytes, in RepeatRegisterImm()
508 std::string fmt) { in RepeatRegisterImm()
509 const std::vector<Reg*> registers = GetRegisters(); in RepeatRegisterImm()
510 std::string str; in RepeatRegisterImm()
511 std::vector<int64_t> imms = CreateImmediateValues(imm_bytes); in RepeatRegisterImm()
519 std::string base = fmt; in RepeatRegisterImm()
521 std::string reg_string = GetRegName<kRegView>(*reg); in RepeatRegisterImm()
523 while ((reg_index = base.find(REG_TOKEN)) != std::string::npos) { in RepeatRegisterImm()
528 if (imm_index != std::string::npos) { in RepeatRegisterImm()
529 std::ostringstream sreg; in RepeatRegisterImm()
531 std::string imm_string = sreg.str(); in RepeatRegisterImm()
546 void DriverWrapper(std::string assembly_text, std::string test_name) { in DriverWrapper()
548 std::unique_ptr<std::vector<uint8_t>> data(new std::vector<uint8_t>(cs)); in DriverWrapper()
556 std::unique_ptr<Ass> assembler_;
557 std::unique_ptr<AssemblerTestInfrastructure> test_helper_;