Chromium Code Reviews| Index: src/deoptimizer.cc |
| =================================================================== |
| --- src/deoptimizer.cc (revision 15486) |
| +++ src/deoptimizer.cc (working copy) |
| @@ -897,6 +897,12 @@ |
| // function code and AST id of the bailout. |
| output_offset -= kPointerSize; |
| input_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
|
danno
2013/07/17 13:33:21
No platform-specific code should be here. Please f
|
| + // Set high 32-bit of PC 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| + input_offset -= kPointerSize; |
| +#endif |
| intptr_t value; |
| if (is_bottommost) { |
| value = input_->GetFrameSlot(input_offset); |
| @@ -916,6 +922,12 @@ |
| // pointer. |
| output_offset -= kPointerSize; |
| input_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of FP 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| + input_offset -= kPointerSize; |
| +#endif |
| if (is_bottommost) { |
| value = input_->GetFrameSlot(input_offset); |
| } else { |
| @@ -1045,6 +1057,11 @@ |
| // Read caller's PC from the previous frame. |
| output_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of PC 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| +#endif |
| intptr_t callers_pc = output_[frame_index - 1]->GetPc(); |
| output_frame->SetFrameSlot(output_offset, callers_pc); |
| if (trace_) { |
| @@ -1055,6 +1072,11 @@ |
| // Read caller's FP from the previous frame, and set this frame's FP. |
| output_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of FP 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| +#endif |
| intptr_t value = output_[frame_index - 1]->GetFp(); |
| output_frame->SetFrameSlot(output_offset, value); |
| intptr_t fp_value = top_address + output_offset; |
| @@ -1148,6 +1170,11 @@ |
| // Read caller's PC from the previous frame. |
| output_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of PC 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| +#endif |
| intptr_t callers_pc = output_[frame_index - 1]->GetPc(); |
| output_frame->SetFrameSlot(output_offset, callers_pc); |
| if (trace_) { |
| @@ -1158,6 +1185,11 @@ |
| // Read caller's FP from the previous frame, and set this frame's FP. |
| output_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of FP 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| +#endif |
| intptr_t value = output_[frame_index - 1]->GetFp(); |
| output_frame->SetFrameSlot(output_offset, value); |
| intptr_t fp_value = top_address + output_offset; |
| @@ -1260,7 +1292,12 @@ |
| // MacroAssembler::EnterFrame). For a setter stub frame we need one additional |
| // entry for the implicit return value, see |
| // StoreStubCompiler::CompileStoreViaSetter. |
| +#ifndef V8_TARGET_ARCH_X32 |
| unsigned fixed_frame_entries = 1 + 4 + (is_setter_stub_frame ? 1 : 0); |
| +#else |
| + unsigned fixed_frame_entries = 2 * (kHWRegSize/kPointerSize) + 3 + |
|
danno
2013/07/17 13:33:21
I think you can remove the special case here if yo
|
| + (is_setter_stub_frame ? 1 : 0); |
| +#endif |
| unsigned fixed_frame_size = fixed_frame_entries * kPointerSize; |
| unsigned output_frame_size = height_in_bytes + fixed_frame_size; |
| @@ -1283,6 +1320,11 @@ |
| // Read caller's PC from the previous frame. |
| output_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of PC 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
| + output_offset -= kPointerSize; |
| +#endif |
| intptr_t callers_pc = output_[frame_index - 1]->GetPc(); |
| output_frame->SetFrameSlot(output_offset, callers_pc); |
| if (trace_) { |
| @@ -1293,6 +1335,11 @@ |
| // Read caller's FP from the previous frame, and set this frame's FP. |
| output_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of FP 0. |
| + output_frame->SetFrameSlot(output_offset, 0); |
|
danno
2013/07/17 13:33:21
Similar to return address handling, you need somet
|
| + output_offset -= kPointerSize; |
| +#endif |
| intptr_t value = output_[frame_index - 1]->GetFp(); |
| output_frame->SetFrameSlot(output_offset, value); |
| intptr_t fp_value = top_address + output_offset; |
| @@ -1432,6 +1479,12 @@ |
| // Read caller's PC (JSFunction continuation) from the input frame. |
| unsigned input_frame_offset = input_frame_size - kPointerSize; |
| unsigned output_frame_offset = output_frame_size - kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + // Set high 32-bit of PC 0. |
| + output_frame->SetFrameSlot(output_frame_offset, 0); |
| + output_frame_offset -= kPointerSize; |
| + input_frame_offset -= kPointerSize; |
| +#endif |
| intptr_t value = input_->GetFrameSlot(input_frame_offset); |
| output_frame->SetFrameSlot(output_frame_offset, value); |
| if (trace_) { |
| @@ -1442,8 +1495,15 @@ |
| // Read caller's FP from the input frame, and set this frame's FP. |
| input_frame_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + input_frame_offset -= kPointerSize; |
| +#endif |
| value = input_->GetFrameSlot(input_frame_offset); |
| output_frame_offset -= kPointerSize; |
| +#if V8_TARGET_ARCH_X32 |
| + output_frame->SetFrameSlot(output_frame_offset, 0); |
| + output_frame_offset -= kPointerSize; |
| +#endif |
| output_frame->SetFrameSlot(output_frame_offset, value); |
| intptr_t frame_ptr = input_->GetRegister(fp_reg.code()); |
| output_frame->SetRegister(fp_reg.code(), frame_ptr); |