Bug 1071604 - Mechanisms for triggering the ARM simulator's REPL. r=mjrosenb

This commit is contained in:
Lars T Hansen 2014-09-24 13:52:11 +02:00
parent a674cd01fd
commit b9609d42c1
3 changed files with 16 additions and 0 deletions

View File

@ -3715,6 +3715,16 @@ MacroAssemblerARMCompat::breakpoint()
as_bkpt();
}
void
MacroAssemblerARMCompat::simulatorStop(const char* msg)
{
#if defined(JS_ARM_SIMULATOR)
JS_ASSERT(sizeof(char*) == 4);
writeInst(0xefffffff);
writeInst((int)msg);
#endif
}
void
MacroAssemblerARMCompat::ensureDouble(const ValueOperand &source, FloatRegister dest, Label *failure)
{

View File

@ -1451,6 +1451,11 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
// Conditional breakpoint.
void breakpoint(Condition cc);
// Trigger the simulator's interactive read-eval-print loop.
// The message will be printed at the stopping point.
// (On non-simulator builds, does nothing.)
void simulatorStop(const char* msg);
void compareDouble(FloatRegister lhs, FloatRegister rhs);
void branchDouble(DoubleCondition cond, FloatRegister lhs, FloatRegister rhs,
Label *label);

View File

@ -651,6 +651,7 @@ ReadLine(const char *prompt)
return result;
}
// Observe that llvm-mc may have a different name on your system. Make a symlink.
static void
DisassembleInstruction(uint32_t pc)
{