Revision: 24914
Author: [email protected]
Date: Mon Oct 27 18:24:05 2014 UTC
Log: Make NextCodeLink pointer 8-byte aligned after GC pointer
updating uses atomics.
After r24737 pointer updating is done by atomic operations which strictly
require target address to be 8-byte alignment on MIPS64.
The alignment is broken on 64-bit arches because InstructionSize is first
field
and has Int size.
Order of fields in object layout are changed to make kNextCodeLinkOffset
divisible by 8. The size of code object header remains the same.
TEST=cctest/test-debug/* on MIPS64
BUG=
[email protected], [email protected]
Review URL: https://codereview.chromium.org/682673002
https://code.google.com/p/v8/source/detail?r=24914
Modified:
/branches/bleeding_edge/src/mips64/builtins-mips64.cc
/branches/bleeding_edge/src/mips64/macro-assembler-mips64.cc
/branches/bleeding_edge/src/objects.h
=======================================
--- /branches/bleeding_edge/src/mips64/builtins-mips64.cc Thu Sep 25
07:16:15 2014 UTC
+++ /branches/bleeding_edge/src/mips64/builtins-mips64.cc Mon Oct 27
18:24:05 2014 UTC
@@ -1044,7 +1044,7 @@
// Load deoptimization data from the code object.
// <deopt_data> = <code>[#deoptimization_data_offset]
- __ Uld(a1, MemOperand(v0, Code::kDeoptimizationDataOffset -
kHeapObjectTag));
+ __ ld(a1, MemOperand(v0, Code::kDeoptimizationDataOffset -
kHeapObjectTag));
// Load the OSR entrypoint offset from the deoptimization data.
// <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
=======================================
--- /branches/bleeding_edge/src/mips64/macro-assembler-mips64.cc Mon Oct 13
14:41:33 2014 UTC
+++ /branches/bleeding_edge/src/mips64/macro-assembler-mips64.cc Mon Oct 27
18:24:05 2014 UTC
@@ -3091,7 +3091,7 @@
// Compute the handler entry address and jump to it. The handler table
is
// a fixed array of (smi-tagged) code offsets.
// v0 = exception, a1 = code object, a2 = state.
- Uld(a3, FieldMemOperand(a1, Code::kHandlerTableOffset));
+ ld(a3, FieldMemOperand(a1, Code::kHandlerTableOffset));
Daddu(a3, a3, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
dsrl(a2, a2, StackHandler::kKindWidth); // Handler index.
dsll(a2, a2, kPointerSizeLog2);
=======================================
--- /branches/bleeding_edge/src/objects.h Mon Oct 27 16:34:28 2014 UTC
+++ /branches/bleeding_edge/src/objects.h Mon Oct 27 18:24:05 2014 UTC
@@ -5380,8 +5380,7 @@
static const int kMaxLoopNestingMarker = 6;
// Layout description.
- static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
- static const int kRelocationInfoOffset = kInstructionSizeOffset +
kIntSize;
+ static const int kRelocationInfoOffset = HeapObject::kHeaderSize;
static const int kHandlerTableOffset = kRelocationInfoOffset +
kPointerSize;
static const int kDeoptimizationDataOffset =
kHandlerTableOffset + kPointerSize;
@@ -5390,8 +5389,8 @@
kDeoptimizationDataOffset + kPointerSize;
static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset +
kPointerSize;
static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize;
- static const int kICAgeOffset =
- kGCMetadataOffset + kPointerSize;
+ static const int kInstructionSizeOffset = kGCMetadataOffset +
kPointerSize;
+ static const int kICAgeOffset = kInstructionSizeOffset + kIntSize;
static const int kFlagsOffset = kICAgeOffset + kIntSize;
static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize;
static const int kKindSpecificFlags2Offset =
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.