| Index: src/compiler/x64/code-generator-x64.cc
|
| diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
|
| index 7c090aa2b062aa5b60a80314d813db310833a8a1..9e8794e81955c54c41294f6688a7ba75ed51e1bc 100644
|
| --- a/src/compiler/x64/code-generator-x64.cc
|
| +++ b/src/compiler/x64/code-generator-x64.cc
|
| @@ -270,18 +270,19 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
|
|
|
| class WasmOutOfLineTrap final : public OutOfLineCode {
|
| public:
|
| - WasmOutOfLineTrap(CodeGenerator* gen, Address pc, bool frame_elided,
|
| + WasmOutOfLineTrap(CodeGenerator* gen, int pc, bool frame_elided,
|
| Register context, int32_t position)
|
| : OutOfLineCode(gen),
|
| + gen_(gen),
|
| pc_(pc),
|
| frame_elided_(frame_elided),
|
| context_(context),
|
| position_(position) {}
|
|
|
| void Generate() final {
|
| - // TODO(eholk): record pc_ and the current pc in a table so that
|
| - // the signal handler can find it.
|
| - USE(pc_);
|
| + int current_pc = __ pc_offset();
|
| +
|
| + gen_->AddProtectedInstruction(pc_, current_pc);
|
|
|
| if (frame_elided_) {
|
| __ EnterFrame(StackFrame::WASM);
|
| @@ -296,7 +297,8 @@ class WasmOutOfLineTrap final : public OutOfLineCode {
|
| }
|
|
|
| private:
|
| - Address pc_;
|
| + CodeGenerator* gen_;
|
| + int pc_;
|
| bool frame_elided_;
|
| Register context_;
|
| int32_t position_;
|
| @@ -1897,7 +1899,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
|
| __ movl(i.OutputRegister(), i.InputOperand(0));
|
| }
|
| } else {
|
| - Address pc = __ pc();
|
| + int pc = __ pc_offset();
|
| __ movl(i.OutputRegister(), i.MemoryOperand());
|
|
|
| if (arch_opcode == kX64TrapMovl) {
|
|
|