Chromium Code Reviews| 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 745ac5084166e80b649898fbd5f163ac57ce0af4..7f3fa5277e022fe961318dc13a92d1ea28299133 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 { |
|
titzer
2016/11/30 17:31:12
We should probably refactor this method to take th
Eric Holk
2016/11/30 20:16:19
Done.
|
| - // 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) { |