[simulator] remove unused argument field for stop/breaks.
We used to embed a string address as description right after a stop instruction, which the simulator would read and print. We removed that a while ago to make the snapshot predictable. R=petermarshall@chromium.org BUG=v8:6071 Review-Url: https://codereview.chromium.org/2744503003 Cr-Commit-Position: refs/heads/master@{#43698}
This commit is contained in:
parent
21880a5357
commit
0ca72de24c
@ -2282,19 +2282,12 @@ void Assembler::stop(const char* msg, Condition cond, int32_t code) {
|
|||||||
#ifndef __arm__
|
#ifndef __arm__
|
||||||
DCHECK(code >= kDefaultStopCode);
|
DCHECK(code >= kDefaultStopCode);
|
||||||
{
|
{
|
||||||
// The Simulator will handle the stop instruction and get the message
|
|
||||||
// address. It expects to find the address just after the svc instruction.
|
|
||||||
BlockConstPoolScope block_const_pool(this);
|
BlockConstPoolScope block_const_pool(this);
|
||||||
if (code >= 0) {
|
if (code >= 0) {
|
||||||
svc(kStopCode + code, cond);
|
svc(kStopCode + code, cond);
|
||||||
} else {
|
} else {
|
||||||
svc(kStopCode + kMaxStopCode, cond);
|
svc(kStopCode + kMaxStopCode, cond);
|
||||||
}
|
}
|
||||||
// Do not embed the message string address! We used to do this, but that
|
|
||||||
// made snapshots created from position-independent executable builds
|
|
||||||
// non-deterministic.
|
|
||||||
// TODO(yangguo): remove this field entirely.
|
|
||||||
nop();
|
|
||||||
}
|
}
|
||||||
#else // def __arm__
|
#else // def __arm__
|
||||||
if (cond != al) {
|
if (cond != al) {
|
||||||
|
@ -1364,12 +1364,6 @@ int Decoder::DecodeType7(Instruction* instr) {
|
|||||||
if (instr->Bit(24) == 1) {
|
if (instr->Bit(24) == 1) {
|
||||||
if (instr->SvcValue() >= kStopCode) {
|
if (instr->SvcValue() >= kStopCode) {
|
||||||
Format(instr, "stop'cond 'svc");
|
Format(instr, "stop'cond 'svc");
|
||||||
out_buffer_pos_ += SNPrintF(
|
|
||||||
out_buffer_ + out_buffer_pos_, "\n %p %08x",
|
|
||||||
reinterpret_cast<void*>(instr + Instruction::kInstrSize),
|
|
||||||
*reinterpret_cast<uint32_t*>(instr + Instruction::kInstrSize));
|
|
||||||
// We have decoded 2 * Instruction::kInstrSize bytes.
|
|
||||||
return 2 * Instruction::kInstrSize;
|
|
||||||
} else {
|
} else {
|
||||||
Format(instr, "svc'cond 'svc");
|
Format(instr, "svc'cond 'svc");
|
||||||
}
|
}
|
||||||
|
@ -432,15 +432,12 @@ void ArmDebugger::Debug() {
|
|||||||
PrintF("INEXACT flag: %d;\n", sim_->inexact_vfp_flag_);
|
PrintF("INEXACT flag: %d;\n", sim_->inexact_vfp_flag_);
|
||||||
} else if (strcmp(cmd, "stop") == 0) {
|
} else if (strcmp(cmd, "stop") == 0) {
|
||||||
int32_t value;
|
int32_t value;
|
||||||
intptr_t stop_pc = sim_->get_pc() - 2 * Instruction::kInstrSize;
|
intptr_t stop_pc = sim_->get_pc() - Instruction::kInstrSize;
|
||||||
Instruction* stop_instr = reinterpret_cast<Instruction*>(stop_pc);
|
Instruction* stop_instr = reinterpret_cast<Instruction*>(stop_pc);
|
||||||
Instruction* msg_address =
|
|
||||||
reinterpret_cast<Instruction*>(stop_pc + Instruction::kInstrSize);
|
|
||||||
if ((argc == 2) && (strcmp(arg1, "unstop") == 0)) {
|
if ((argc == 2) && (strcmp(arg1, "unstop") == 0)) {
|
||||||
// Remove the current stop.
|
// Remove the current stop.
|
||||||
if (sim_->isStopInstruction(stop_instr)) {
|
if (sim_->isStopInstruction(stop_instr)) {
|
||||||
stop_instr->SetInstructionBits(kNopInstr);
|
stop_instr->SetInstructionBits(kNopInstr);
|
||||||
msg_address->SetInstructionBits(kNopInstr);
|
|
||||||
} else {
|
} else {
|
||||||
PrintF("Not at debugger stop.\n");
|
PrintF("Not at debugger stop.\n");
|
||||||
}
|
}
|
||||||
@ -5671,10 +5668,6 @@ void Simulator::InstructionDecode(Instruction* instr) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the instruction is a non taken conditional stop, we need to skip the
|
|
||||||
// inlined message address.
|
|
||||||
} else if (instr->IsStop()) {
|
|
||||||
set_pc(get_pc() + 2 * Instruction::kInstrSize);
|
|
||||||
}
|
}
|
||||||
if (!pc_modified_) {
|
if (!pc_modified_) {
|
||||||
set_register(pc, reinterpret_cast<int32_t>(instr)
|
set_register(pc, reinterpret_cast<int32_t>(instr)
|
||||||
|
@ -2020,14 +2020,7 @@ void Assembler::stop(const char* msg, uint32_t code) {
|
|||||||
break_(0x54321);
|
break_(0x54321);
|
||||||
#else // V8_HOST_ARCH_MIPS
|
#else // V8_HOST_ARCH_MIPS
|
||||||
BlockTrampolinePoolFor(2);
|
BlockTrampolinePoolFor(2);
|
||||||
// The Simulator will handle the stop instruction and get the message address.
|
|
||||||
// On MIPS stop() is just a special kind of break_().
|
|
||||||
break_(code, true);
|
break_(code, true);
|
||||||
// Do not embed the message string address! We used to do this, but that
|
|
||||||
// made snapshots created from position-independent executable builds
|
|
||||||
// non-deterministic.
|
|
||||||
// TODO(yangguo): remove this field entirely.
|
|
||||||
nop();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2272,14 +2272,7 @@ void Assembler::stop(const char* msg, uint32_t code) {
|
|||||||
break_(0x54321);
|
break_(0x54321);
|
||||||
#else // V8_HOST_ARCH_MIPS
|
#else // V8_HOST_ARCH_MIPS
|
||||||
BlockTrampolinePoolFor(3);
|
BlockTrampolinePoolFor(3);
|
||||||
// The Simulator will handle the stop instruction and get the message address.
|
|
||||||
// On MIPS stop() is just a special kind of break_().
|
|
||||||
break_(code, true);
|
break_(code, true);
|
||||||
// Do not embed the message string address! We used to do this, but that
|
|
||||||
// made snapshots created from position-independent executable builds
|
|
||||||
// non-deterministic.
|
|
||||||
// TODO(yangguo): remove this field entirely.
|
|
||||||
nop();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user