+2009-05-10 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ - fixed REGRESSION(r43432): Many JavaScriptCore tests crash in 64-bit
+ https://bugs.webkit.org/show_bug.cgi?id=25680
+
+ Accound for the 64-bit instruction prefix when rewriting mov to lea on 64-bit.
+
+ * jit/JIT.h:
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::patchGetByIdSelf):
+ (JSC::JIT::patchPutByIdReplace):
+
2009-05-10 Darin Adler <darin@apple.com>
Reviewed by Cameron Zwarich.
static const int patchOffsetPutByIdStructure = 10;
static const int patchOffsetPutByIdExternalLoad = 20;
static const int patchLengthPutByIdExternalLoad = 4;
+ static const int patchLengthPutByIdExternalLoadPrefix = 1;
static const int patchOffsetPutByIdPropertyMapOffset = 31;
// These architecture specific value are used to enable patching - see comment on op_get_by_id.
static const int patchOffsetGetByIdStructure = 10;
static const int patchOffsetGetByIdBranchToSlowCase = 20;
static const int patchOffsetGetByIdExternalLoad = 20;
static const int patchLengthGetByIdExternalLoad = 4;
+ static const int patchLengthGetByIdExternalLoadPrefix = 1;
static const int patchOffsetGetByIdPropertyMapOffset = 31;
static const int patchOffsetGetByIdPutResult = 31;
#if ENABLE(OPCODE_SAMPLING)
static const int patchOffsetPutByIdStructure = 7;
static const int patchOffsetPutByIdExternalLoad = 13;
static const int patchLengthPutByIdExternalLoad = 3;
+ static const int patchLengthPutByIdExternalLoadPrefix = 0;
static const int patchOffsetPutByIdPropertyMapOffset = 22;
// These architecture specific value are used to enable patching - see comment on op_get_by_id.
static const int patchOffsetGetByIdStructure = 7;
static const int patchOffsetGetByIdBranchToSlowCase = 13;
static const int patchOffsetGetByIdExternalLoad = 13;
static const int patchLengthGetByIdExternalLoad = 3;
+ static const int patchLengthGetByIdExternalLoadPrefix = 0;
static const int patchOffsetGetByIdPropertyMapOffset = 22;
static const int patchOffsetGetByIdPutResult = 22;
#if ENABLE(OPCODE_SAMPLING)
// If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load
// and makes the subsequent load's offset automatically correct
if (structure->isUsingInlineStorage())
- stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad).patchLoadToLEA();
+ stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad + patchLengthGetByIdExternalLoadPrefix).patchLoadToLEA();
// Patch the offset into the propoerty map to load from, then patch the Structure to look for.
stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetGetByIdStructure).repatch(structure);
// If we're patching to use inline storage, convert the initial load to a lea; this avoids the extra load
// and makes the subsequent load's offset automatically correct
if (structure->isUsingInlineStorage())
- stubInfo->hotPathBegin.instructionAtOffset(patchOffsetGetByIdExternalLoad).patchLoadToLEA();
+ stubInfo->hotPathBegin.instructionAtOffset(patchOffsetPutByIdExternalLoad + patchLengthPutByIdExternalLoadPrefix).patchLoadToLEA();
// Patch the offset into the propoerty map to load from, then patch the Structure to look for.
stubInfo->hotPathBegin.dataLabelPtrAtOffset(patchOffsetPutByIdStructure).repatch(structure);