 Chromium Code Reviews
 Chromium Code Reviews Issue 18014003:
  Add X32 port into V8  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
    
  
    Issue 18014003:
  Add X32 port into V8  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/| Index: src/frames.cc | 
| =================================================================== | 
| --- src/frames.cc (revision 15486) | 
| +++ src/frames.cc (working copy) | 
| @@ -539,7 +539,11 @@ | 
| state->sp = sp; | 
| state->fp = fp; | 
| state->pc_address = ResolveReturnAddressLocation( | 
| +#ifndef V8_TARGET_ARCH_X32 | 
| reinterpret_cast<Address*>(sp - 1 * kPointerSize)); | 
| 
danno
2013/07/17 13:33:21
Use kPCOnStackSize to make fully cross-platform
 | 
| +#else | 
| + reinterpret_cast<Address*>(sp - 1 * kHWRegSize)); | 
| +#endif | 
| } | 
| @@ -1499,9 +1503,13 @@ | 
| FixedArray* array, | 
| int offset, | 
| int previous_handler_offset) const { | 
| +#ifndef V8_TARGET_ARCH_X32 | 
| STATIC_ASSERT(StackHandlerConstants::kSlotCount == 5); | 
| 
danno
2013/07/17 13:33:21
Compute using kPCOnStackSize to make fully cross-p
 | 
| +#else | 
| + STATIC_ASSERT(StackHandlerConstants::kSlotCount == 6); | 
| +#endif | 
| ASSERT_LE(0, offset); | 
| - ASSERT_GE(array->length(), offset + 5); | 
| + ASSERT_GE(array->length(), offset + StackHandlerConstants::kSlotCount); | 
| // Unwinding a stack handler into an array chains it in the opposite | 
| // direction, re-using the "next" slot as a "previous" link, so that stack | 
| // handlers can be later re-wound in the correct order. Decode the "state" | 
| @@ -1511,6 +1519,9 @@ | 
| array->set(offset + 2, Smi::FromInt(static_cast<int>(index()))); // state | 
| array->set(offset + 3, *context_address()); // context | 
| array->set(offset + 4, Smi::FromInt(static_cast<int>(kind()))); // fp | 
| +#if V8_TARGET_ARCH_X32 | 
| + array->set(offset + 5, Smi::FromInt(0)); // high-32 bit of fp | 
| +#endif | 
| *isolate->handler_address() = next()->address(); | 
| } | 
| @@ -1520,9 +1531,13 @@ | 
| FixedArray* array, | 
| int offset, | 
| Address fp) { | 
| +#ifndef V8_TARGET_ARCH_X32 | 
| STATIC_ASSERT(StackHandlerConstants::kSlotCount == 5); | 
| +#else | 
| + STATIC_ASSERT(StackHandlerConstants::kSlotCount == 6); | 
| +#endif | 
| ASSERT_LE(0, offset); | 
| - ASSERT_GE(array->length(), offset + 5); | 
| + ASSERT_GE(array->length(), offset + StackHandlerConstants::kSlotCount); | 
| Smi* prev_handler_offset = Smi::cast(array->get(offset)); | 
| Code* code = Code::cast(array->get(offset + 1)); | 
| Smi* smi_index = Smi::cast(array->get(offset + 2)); | 
| @@ -1539,6 +1554,9 @@ | 
| Memory::Object_at(address() + StackHandlerConstants::kContextOffset) = | 
| context; | 
| Memory::Address_at(address() + StackHandlerConstants::kFPOffset) = fp; | 
| +#if V8_TARGET_ARCH_X32 | 
| + Memory::Address_at(address() + StackHandlerConstants::kFPOffset + 4) = 0; | 
| +#endif | 
| *isolate->handler_address() = address(); |