PPC: Changes to allow AIX to compile with gcc 4.8.3

We were able to remove most of our changes needed to compile
on AIX with an earlier compiler level.  These changes are the
remaining ones.

The changes in heap/heap.cc are needed because otherwise the
compiler complains that result is potentially used before
it is initialized.

The changes in heap/mark-compact.cc are required because
AIX supports the full 64 bit address range so the check
being guarded is invalid.

The changes in build/toolchain.gypi and
test/cctest/cctest/gyp are aix only and are adjust the
compile/link options to allow the AIX build to succeed.

	modified:   build/toolchain.gypi
	modified:   src/heap/heap.cc
	modified:   src/heap/mark-compact.cc
	modified:   test/cctest/cctest.gyp

R=danno@chromium.org, svenpanne@chromium.org

BUG=

Review URL: https://codereview.chromium.org/1013833002

Cr-Commit-Position: refs/heads/master@{#27255}
This commit is contained in:
michael_dawson 2015-03-18 01:43:21 -07:00 committed by Commit bot
parent a7bb84a452
commit 8685219066
4 changed files with 13 additions and 3 deletions

View File

@ -1144,6 +1144,11 @@
}],
['OS=="aix"', {
'ldflags': [ '-Wl,-bbigtoc' ],
'conditions': [
['v8_target_arch=="ppc64"', {
'cflags': [ '-maix64 -mcmodel=large' ],
}],
],
}],
['OS=="android"', {
'variables': {

View File

@ -2899,7 +2899,7 @@ AllocationResult Heap::AllocatePropertyCell() {
AllocationResult Heap::AllocateWeakCell(HeapObject* value) {
int size = WeakCell::kSize;
STATIC_ASSERT(WeakCell::kSize <= Page::kMaxRegularHeapObjectSize);
HeapObject* result;
HeapObject* result = NULL;
{
AllocationResult allocation =
AllocateRaw(size, OLD_POINTER_SPACE, OLD_POINTER_SPACE);
@ -4474,7 +4474,7 @@ AllocationResult Heap::AllocateExtendedConstantPoolArray(
AllocationResult Heap::AllocateEmptyConstantPoolArray() {
ConstantPoolArray::NumberOfEntries small(0, 0, 0, 0);
int size = ConstantPoolArray::SizeFor(small);
HeapObject* result;
HeapObject* result = NULL;
{
AllocationResult allocation =
AllocateRaw(size, OLD_DATA_SPACE, OLD_DATA_SPACE);
@ -4490,7 +4490,7 @@ AllocationResult Heap::AllocateSymbol() {
// Statically ensure that it is safe to allocate symbols in paged spaces.
STATIC_ASSERT(Symbol::kSize <= Page::kMaxRegularHeapObjectSize);
HeapObject* result;
HeapObject* result = NULL;
AllocationResult allocation =
AllocateRaw(Symbol::kSize, OLD_POINTER_SPACE, OLD_POINTER_SPACE);
if (!allocation.To(&result)) return allocation;

View File

@ -2877,11 +2877,13 @@ class PointersUpdatingVisitor : public ObjectVisitor {
// TODO(ishell): remove, once crbug/454297 is caught.
#if V8_TARGET_ARCH_64_BIT
#ifndef V8_OS_AIX // no point checking on AIX as full 64 range is supported
const uintptr_t kBoundary = V8_UINT64_C(1) << 48;
STATIC_ASSERT(kBoundary > 0);
if (reinterpret_cast<uintptr_t>(heap_obj->address()) >= kBoundary) {
CheckLayoutDescriptorAndDie(heap, slot);
}
#endif
#endif
MapWord map_word = heap_obj->map_word();
if (map_word.IsForwardingAddress()) {

View File

@ -272,6 +272,9 @@
},
},
}],
['OS=="aix"', {
'ldflags': [ '-Wl,-bbigtoc' ],
}],
['component=="shared_library"', {
# cctest can't be built against a shared library, so we need to
# depend on the underlying static target in that case.