Ignore:
Timestamp:
Aug 13, 2010, 3:14:36 AM (15 years ago)
Author:
[email protected]
Message:

Avoid increasing required alignment of target type warning on ARM
https://bugs.webkit.org/show_bug.cgi?id=38045

Reviewed by Gavin Barraclough.

The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
increases required alignment of target type warnings.
Casting the type of [pointer to Type2] object to void* bypasses the
warning.

(JSC::ARMAssembler::executableCopy):

(JSC::AssemblerBuffer::putShortUnchecked):
(JSC::AssemblerBuffer::putIntUnchecked):
(JSC::AssemblerBuffer::putInt64Unchecked):

(JSC::RegisterFile::RegisterFile):
(JSC::RegisterFile::grow):

(jsRegExpCompile):

(JSC::JSArray::putSlowCase):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::increaseVectorPrefixLength):
(JSC::JSArray::shiftCount):
(JSC::JSArray::unshiftCount):

(WTF::PageHeapAllocator::New):
(WTF::TCMalloc_Central_FreeList::Populate):

  • wtf/MD5.cpp:

(WTF::reverseBytes):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):

(isPointerTypeAlignmentOkay):
(reinterpret_cast_ptr):

(WTF::VectorBuffer::inlineBuffer):

(WTF::String::String):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r65104 r65311  
    968968};
    969969
    970 #define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame)
     970#define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast_ptr<JITStackFrame*>(STUB_ARGS); StackHack stackHack(stackFrame)
    971971#define STUB_SET_RETURN_ADDRESS(returnAddress) stackHack.savedReturnAddress = ReturnAddressPtr(returnAddress)
    972972#define STUB_RETURN_ADDRESS stackHack.savedReturnAddress
     
    974974#else
    975975
    976 #define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast<JITStackFrame*>(STUB_ARGS)
     976#define STUB_INIT_STACK_FRAME(stackFrame) JITStackFrame& stackFrame = *reinterpret_cast_ptr<JITStackFrame*>(STUB_ARGS)
    977977#define STUB_SET_RETURN_ADDRESS(returnAddress) *stackFrame.returnAddressSlot() = ReturnAddressPtr(returnAddress)
    978978#define STUB_RETURN_ADDRESS *stackFrame.returnAddressSlot()
Note: See TracChangeset for help on using the changeset viewer.