Lines Matching full:instruction
74 void Stop(Instruction* instr);
94 bool SetBreakpoint(Instruction* breakpc);
95 bool DeleteBreakpoint(Instruction* breakpc);
120 void MipsDebugger::Stop(Instruction* instr) {
139 // Overwrite the instruction and address with nops.
144 sim_->set_pc(sim_->get_pc() + 3 * Instruction::kInstructionSize);
150 #define UNSUPPORTED() printf("Unsupported instruction.\n");
155 void MipsDebugger::Stop(Instruction* instr) {
160 Instruction::kInstrSize);
167 sim_->set_pc(sim_->get_pc() + 3 * Instruction::kInstrSize);
229 bool MipsDebugger::SetBreakpoint(Instruction* breakpc) {
238 // Not setting the breakpoint instruction in the code itself. It will be set
244 bool MipsDebugger::DeleteBreakpoint(Instruction* breakpc) {
410 Instruction* instr = reinterpret_cast<Instruction*>(sim_->get_pc());
414 reinterpret_cast<Instruction*>(sim_->get_pc()));
418 sim_->set_pc(sim_->get_pc() + Instruction::kInstrSize);
421 // Execute the one instruction we broke at with breakpoints disabled.
422 sim_->InstructionDecode(reinterpret_cast<Instruction*>(sim_->get_pc()));
550 end = cur + (10 * Instruction::kInstrSize);
559 end = cur + (10 * Instruction::kInstrSize);
567 end = cur + (value * Instruction::kInstrSize);
575 end = cur + (value2 * Instruction::kInstrSize);
583 cur += Instruction::kInstrSize;
593 if (!SetBreakpoint(reinterpret_cast<Instruction*>(value))) {
611 2 * Instruction::kInstrSize;
612 Instruction* stop_instr = reinterpret_cast<Instruction*>(stop_pc);
613 Instruction* msg_address =
614 reinterpret_cast<Instruction*>(stop_pc +
615 Instruction::kInstrSize);
684 end = cur + (10 * Instruction::kInstrSize);
690 end = cur + (10 * Instruction::kInstrSize);
697 end = cur + (value2 * Instruction::kInstrSize);
705 cur += Instruction::kInstrSize;
711 PrintF(" step one instruction (alias 'si')\n");
752 PrintF(" ignore the stop instruction at the current location\n");
849 Instruction* instr) {
862 Instruction::kInstrSize));
931 // reference to a swi (software-interrupt) instruction that is handled by
933 // offset from the swi instruction so the simulator knows what to call.
946 Instruction::kInstrSize);
967 static Redirection* FromSwiInstruction(Instruction* swi_instruction) {
976 reinterpret_cast<Instruction*>(reinterpret_cast<void*>(reg)));
1076 return registers_[reg] + ((reg == pc) ? Instruction::kPCReadOffset : 0);
1334 int32_t Simulator::ReadW(int64_t addr, Instruction* instr) {
1354 uint32_t Simulator::ReadWU(int64_t addr, Instruction* instr) {
1374 void Simulator::WriteW(int64_t addr, int value, Instruction* instr) {
1394 int64_t Simulator::Read2W(int64_t addr, Instruction* instr) {
1414 void Simulator::Write2W(int64_t addr, int64_t value, Instruction* instr) {
1434 double Simulator::ReadD(int64_t addr, Instruction* instr) {
1447 void Simulator::WriteD(int64_t addr, double value, Instruction* instr) {
1460 uint16_t Simulator::ReadHU(int64_t addr, Instruction* instr) {
1474 int16_t Simulator::ReadH(int64_t addr, Instruction* instr) {
1488 void Simulator::WriteH(int64_t addr, uint16_t value, Instruction* instr) {
1503 void Simulator::WriteH(int64_t addr, int16_t value, Instruction* instr) {
1554 void Simulator::Format(Instruction* instr, const char* format) {
1555 PrintF("Simulator found unsupported instruction:\n 0x%08lx: %s\n",
1599 void Simulator::SoftwareInterrupt(Instruction* instr) {
1601 // the break_ instruction, or several variants of traps. All
1838 void Simulator::HandleStop(uint64_t code, Instruction* instr) {
1845 set_pc(get_pc() + 2 * Instruction::kInstrSize);
1850 bool Simulator::IsStopInstruction(Instruction* instr) {
1924 // Handle execution based on instruction types.
1926 void Simulator::ConfigureTypeRegister(Instruction* instr,
1939 // Instruction fields.
2008 // bits instruction. RS field is always equal to 0.
2012 // is special case of SRL instruction, added in MIPS32 Release 2.
2041 // bits instruction. SA field is always equal to 0.
2045 // This is special case od SRLV instruction, added in MIPS32
2054 // bits instruction. SA field is always equal to 0.
2058 // This is special case od SRLV instruction, added in MIPS32
2228 case INS: { // Mips32r2 instruction.
2238 case EXT: { // Mips32r2 instruction.
2258 void Simulator::DecodeTypeRegister(Instruction* instr) {
2259 // Instruction fields.
2294 // Set up the variables if needed before executing the instruction.
2469 case ROUND_L_D: { // Mips64r2 instruction.
2479 case TRUNC_L_D: { // Mips64r2 instruction.
2488 case FLOOR_L_D: { // Mips64r2 instruction.
2497 case CEIL_L_D: { // Mips64r2 instruction.
2531 case CVT_D_L: // Mips32r2 instruction.
2614 Instruction* branch_delay_instr = reinterpret_cast<Instruction*>(
2615 current_pc+Instruction::kInstrSize);
2622 Instruction* branch_delay_instr = reinterpret_cast<Instruction*>(
2623 current_pc+Instruction::kInstrSize);
2626 current_pc + 2 * Instruction::kInstrSize);
2806 void Simulator::DecodeTypeImmediate(Instruction* instr) {
2807 // Instruction fields.
2858 next_pc = current_pc + (imm16 << 2) + Instruction::kInstrSize;
2868 next_pc = current_pc + (imm16 << 2) + Instruction::kInstrSize;
2878 next_pc = current_pc + (imm16 << 2) + Instruction::kInstrSize;
2914 next_pc = current_pc + (imm16 << 2) + Instruction::kInstrSize;
3091 next_pc = current_pc + (imm16 << 2) + Instruction::kInstrSize;
3093 set_register(31, current_pc + 2* Instruction::kInstrSize);
3096 next_pc = current_pc + 2 * Instruction::kInstrSize;
3167 Instruction* branch_delay_instr =
3168 reinterpret_cast<Instruction*>(current_pc+Instruction::kInstrSize);
3180 void Simulator::DecodeTypeJump(Instruction* instr) {
3191 Instruction* branch_delay_instr =
3192 reinterpret_cast<Instruction*>(current_pc + Instruction::kInstrSize);
3198 set_register(31, current_pc + 2 * Instruction::kInstrSize);
3205 // Executes the current instruction.
3206 void Simulator::InstructionDecode(Instruction* instr) {
3223 case Instruction::kRegisterType:
3226 case Instruction::kImmediateType:
3229 case Instruction::kJumpType:
3243 Instruction::kInstrSize);
3255 // should be stopping at a particular executed instruction.
3257 Instruction* instr = reinterpret_cast<Instruction*>(program_counter);
3266 Instruction* instr = reinterpret_cast<Instruction*>(program_counter);