Ignore:
Timestamp:
Feb 12, 2009, 8:22:02 PM (16 years ago)
Author:
[email protected]
Message:

2009-02-12 Gavin Barraclough <[email protected]>

Reviewed by Sam Weinig.

Remove (/reduce) use of hard-wired register names from the JIT.
Currently there is no abstraction of registers used in the JIT,
which has a number of negative consequences. Hard-wiring x86
register names makes the JIT less portable to other platforms,
and prevents us from performing dynamic register allocation to
attempt to maintain more temporary values in machine registers.
(The latter will be more important on x86-64, where we have more
registers to make use of).

Also, remove MacroAssembler::mod32. This was not providing a
useful abstraction, and was not in keeping with the rest of the
MacroAssembler interface, in having specific register requirements.

  • assembler/MacroAssemblerX86Common.h:
  • jit/JIT.cpp: (JSC::JIT::compileOpStrictEq): (JSC::JIT::emitSlowScriptCheck): (JSC::JIT::privateCompileMainPass): (JSC::JIT::privateCompileSlowCases): (JSC::JIT::privateCompile): (JSC::JIT::privateCompileCTIMachineTrampolines):
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArith_op_lshift): (JSC::JIT::compileFastArithSlow_op_lshift): (JSC::JIT::compileFastArith_op_rshift): (JSC::JIT::compileFastArithSlow_op_rshift): (JSC::JIT::compileFastArith_op_bitand): (JSC::JIT::compileFastArithSlow_op_bitand): (JSC::JIT::compileFastArith_op_mod): (JSC::JIT::compileFastArithSlow_op_mod): (JSC::JIT::compileFastArith_op_post_inc): (JSC::JIT::compileFastArithSlow_op_post_inc): (JSC::JIT::compileFastArith_op_post_dec): (JSC::JIT::compileFastArithSlow_op_post_dec): (JSC::JIT::compileFastArith_op_pre_inc): (JSC::JIT::compileFastArithSlow_op_pre_inc): (JSC::JIT::compileFastArith_op_pre_dec): (JSC::JIT::compileFastArithSlow_op_pre_dec): (JSC::JIT::compileFastArith_op_add): (JSC::JIT::compileFastArith_op_mul): (JSC::JIT::compileFastArith_op_sub): (JSC::JIT::compileBinaryArithOp):
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallInitializeCallFrame): (JSC::JIT::compileOpCallSetupArgs): (JSC::JIT::compileOpCallEvalSetupArgs): (JSC::JIT::compileOpConstructSetupArgs): (JSC::JIT::compileOpCall): (JSC::JIT::compileOpCallSlowCase):
  • jit/JITInlineMethods.h: (JSC::JIT::emitGetVirtualRegister): (JSC::JIT::emitPutVirtualRegister): (JSC::JIT::emitNakedCall): (JSC::JIT::restoreArgumentReference): (JSC::JIT::restoreArgumentReferenceForTrampoline):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compilePutByIdHotPath): (JSC::JIT::compileGetByIdSlowCase): (JSC::JIT::compilePutByIdSlowCase): (JSC::JIT::privateCompilePutByIdTransition): (JSC::JIT::privateCompilePatchGetArrayLength): (JSC::JIT::privateCompileGetByIdSelf): (JSC::JIT::privateCompileGetByIdProto): (JSC::JIT::privateCompileGetByIdSelfList): (JSC::JIT::privateCompileGetByIdProtoList): (JSC::JIT::privateCompileGetByIdChainList): (JSC::JIT::privateCompileGetByIdChain): (JSC::JIT::privateCompilePutByIdReplace):
File:
1 edited

Legend:

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

    r40846 r40963  
    5454    // to jump back to if one of these trampolies finds a match.
    5555
    56     emitGetVirtualRegister(baseVReg, X86::eax);
    57 
    58     emitPutJITStubArg(X86::eax, 1);
     56    emitGetVirtualRegister(baseVReg, regT0);
     57
     58    emitPutJITStubArg(regT0, 1);
    5959    emitPutJITStubArgConstant(ident, 2);
    6060    emitCTICall(Interpreter::cti_op_get_by_id_generic);
     
    7474    // such that the Structure & offset are always at the same distance from this.
    7575
    76     emitGetVirtualRegisters(baseVReg, X86::eax, valueVReg, X86::edx);
     76    emitGetVirtualRegisters(baseVReg, regT0, valueVReg, regT1);
    7777
    7878    emitPutJITStubArgConstant(ident, 2);
    79     emitPutJITStubArg(X86::eax, 1);
    80     emitPutJITStubArg(X86::edx, 3);
     79    emitPutJITStubArg(regT0, 1);
     80    emitPutJITStubArg(regT1, 3);
    8181    emitCTICall(Interpreter::cti_op_put_by_id_generic);
    8282}
     
    9696    // to jump back to if one of these trampolies finds a match.
    9797
    98     emitGetVirtualRegister(baseVReg, X86::eax);
    99 
    100     emitJumpSlowCaseIfNotJSCell(X86::eax, baseVReg);
     98    emitGetVirtualRegister(baseVReg, regT0);
     99
     100    emitJumpSlowCaseIfNotJSCell(regT0, baseVReg);
    101101
    102102    Label hotPathBegin(this);
     
    104104
    105105    DataLabelPtr structureToCompare;
    106     Jump structureCheck = branchPtrWithPatch(NotEqual, Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
     106    Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
    107107    addSlowCase(structureCheck);
    108108    ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure);
    109109    ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase);
    110110
    111     loadPtr(Address(X86::eax, FIELD_OFFSET(JSObject, m_propertyStorage)), X86::eax);
    112     DataLabel32 displacementLabel = loadPtrWithAddressOffsetPatch(Address(X86::eax, patchGetByIdDefaultOffset), X86::eax);
     111    loadPtr(Address(regT0, FIELD_OFFSET(JSObject, m_propertyStorage)), regT0);
     112    DataLabel32 displacementLabel = loadPtrWithAddressOffsetPatch(Address(regT0, patchGetByIdDefaultOffset), regT0);
    113113    ASSERT(differenceBetween(hotPathBegin, displacementLabel) == patchOffsetGetByIdPropertyMapOffset);
    114114
     
    133133    Label coldPathBegin(this);
    134134#endif
    135     emitPutJITStubArg(X86::eax, 1);
     135    emitPutJITStubArg(regT0, 1);
    136136    emitPutJITStubArgConstant(ident, 2);
    137137    Call call = emitCTICall(Interpreter::cti_op_get_by_id);
     
    150150    // such that the Structure & offset are always at the same distance from this.
    151151
    152     emitGetVirtualRegisters(baseVReg, X86::eax, valueVReg, X86::edx);
     152    emitGetVirtualRegisters(baseVReg, regT0, valueVReg, regT1);
    153153
    154154    // Jump to a slow case if either the base object is an immediate, or if the Structure does not match.
    155     emitJumpSlowCaseIfNotJSCell(X86::eax, baseVReg);
     155    emitJumpSlowCaseIfNotJSCell(regT0, baseVReg);
    156156
    157157    Label hotPathBegin(this);
     
    160160    // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over.
    161161    DataLabelPtr structureToCompare;
    162     addSlowCase(branchPtrWithPatch(NotEqual, Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
     162    addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
    163163    ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure);
    164164
    165165    // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used.
    166     loadPtr(Address(X86::eax, FIELD_OFFSET(JSObject, m_propertyStorage)), X86::eax);
    167     DataLabel32 displacementLabel = storePtrWithAddressOffsetPatch(X86::edx, Address(X86::eax, patchGetByIdDefaultOffset));
     166    loadPtr(Address(regT0, FIELD_OFFSET(JSObject, m_propertyStorage)), regT0);
     167    DataLabel32 displacementLabel = storePtrWithAddressOffsetPatch(regT1, Address(regT0, patchGetByIdDefaultOffset));
    168168    ASSERT(differenceBetween(hotPathBegin, displacementLabel) == patchOffsetPutByIdPropertyMapOffset);
    169169}
     
    175175
    176176    emitPutJITStubArgConstant(ident, 2);
    177     emitPutJITStubArg(X86::eax, 1);
    178     emitPutJITStubArg(X86::edx, 3);
     177    emitPutJITStubArg(regT0, 1);
     178    emitPutJITStubArg(regT1, 3);
    179179    Call call = emitCTICall(Interpreter::cti_op_put_by_id);
    180180
     
    198198    JumpList failureCases;
    199199    // Check eax is an object of the right Structure.
    200     failureCases.append(emitJumpIfNotJSCell(X86::eax));
    201     failureCases.append(branchPtr(NotEqual, Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(oldStructure)));
     200    failureCases.append(emitJumpIfNotJSCell(regT0));
     201    failureCases.append(branchPtr(NotEqual, Address(regT0, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(oldStructure)));
    202202    JumpList successCases;
    203203
    204204    //  ecx = baseObject
    205     loadPtr(Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), X86::ecx);
     205    loadPtr(Address(regT0, FIELD_OFFSET(JSCell, m_structure)), regT2);
    206206    // proto(ecx) = baseObject->structure()->prototype()
    207     failureCases.append(branch32(NotEqual, Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));
    208 
    209     loadPtr(Address(X86::ecx, FIELD_OFFSET(Structure, m_prototype)), X86::ecx);
     207    failureCases.append(branch32(NotEqual, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));
     208
     209    loadPtr(Address(regT2, FIELD_OFFSET(Structure, m_prototype)), regT2);
    210210   
    211211    // ecx = baseObject->m_structure
    212212    for (RefPtr<Structure>* it = chain->head(); *it; ++it) {
    213213        // null check the prototype
    214         successCases.append(branchPtr(Equal, X86::ecx, ImmPtr(JSValuePtr::encode(jsNull()))));
     214        successCases.append(branchPtr(Equal, regT2, ImmPtr(JSValuePtr::encode(jsNull()))));
    215215
    216216        // Check the structure id
    217         failureCases.append(branchPtr(NotEqual, Address(X86::ecx, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(it->get())));
     217        failureCases.append(branchPtr(NotEqual, Address(regT2, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(it->get())));
    218218       
    219         loadPtr(Address(X86::ecx, FIELD_OFFSET(JSCell, m_structure)), X86::ecx);
    220         failureCases.append(branch32(NotEqual, Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));
    221         loadPtr(Address(X86::ecx, FIELD_OFFSET(Structure, m_prototype)), X86::ecx);
     219        loadPtr(Address(regT2, FIELD_OFFSET(JSCell, m_structure)), regT2);
     220        failureCases.append(branch32(NotEqual, Address(regT2, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));
     221        loadPtr(Address(regT2, FIELD_OFFSET(Structure, m_prototype)), regT2);
    222222    }
    223223
     
    230230        pop(X86::ebx);
    231231#if PLATFORM(X86_64)
    232         move(Imm32(newStructure->propertyStorageCapacity()), X86::edx);
     232        move(Imm32(newStructure->propertyStorageCapacity()), regT1);
    233233        move(Imm32(oldStructure->propertyStorageCapacity()), X86::esi);
    234         move(X86::eax, X86::edi);
     234        move(regT0, X86::edi);
    235235        callTarget = call();
    236236#else
    237237        push(Imm32(newStructure->propertyStorageCapacity()));
    238238        push(Imm32(oldStructure->propertyStorageCapacity()));
    239         push(X86::eax);
     239        push(regT0);
    240240        callTarget = call();
    241241        addPtr(Imm32(3 * sizeof(void*)), X86::esp);
    242242#endif
    243         emitGetJITStubArg(3, X86::edx);
     243        emitGetJITStubArg(3, regT1);
    244244        push(X86::ebx);
    245245    }
     
    249249    sub32(Imm32(1), AbsoluteAddress(oldStructure->addressOfCount()));
    250250    add32(Imm32(1), AbsoluteAddress(newStructure->addressOfCount()));
    251     storePtr(ImmPtr(newStructure), Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)));
     251    storePtr(ImmPtr(newStructure), Address(regT0, FIELD_OFFSET(JSCell, m_structure)));
    252252
    253253    // write the value
    254     loadPtr(Address(X86::eax, FIELD_OFFSET(JSObject, m_propertyStorage)), X86::eax);
    255     storePtr(X86::edx, Address(X86::eax, cachedOffset * sizeof(JSValuePtr)));
     254    loadPtr(Address(regT0, FIELD_OFFSET(JSObject, m_propertyStorage)), regT0);
     255    storePtr(regT1, Address(regT0, cachedOffset * sizeof(JSValuePtr)));
    256256
    257257    ret();
     
    310310
    311311    // Check eax is an array
    312     Jump failureCases1 = branchPtr(NotEqual, Address(X86::eax), ImmPtr(m_interpreter->m_jsArrayVptr));
     312    Jump failureCases1 = branchPtr(NotEqual, Address(regT0), ImmPtr(m_interpreter->m_jsArrayVptr));
    313313
    314314    // Checks out okay! - get the length from the storage
    315     loadPtr(Address(X86::eax, FIELD_OFFSET(JSArray, m_storage)), X86::ecx);
    316     load32(Address(X86::ecx, FIELD_OFFSET(ArrayStorage, m_length)), X86::ecx);
    317 
    318     Jump failureCases2 = branch32(Above, X86::ecx, Imm32(JSImmediate::maxImmediateInt));
    319 
    320     emitFastArithIntToImmNoCheck(X86::ecx, X86::eax);
     315    loadPtr(Address(regT0, FIELD_OFFSET(JSArray, m_storage)), regT2);
     316    load32(Address(regT2, FIELD_OFFSET(ArrayStorage, m_length)), regT2);
     317
     318    Jump failureCases2 = branch32(Above, regT2, Imm32(JSImmediate::maxImmediateInt));
     319
     320    emitFastArithIntToImmNoCheck(regT2, regT0);
    321321    Jump success = jump();
    322322
     
    344344{
    345345    // Check eax is an object of the right Structure.
    346     Jump failureCases1 = emitJumpIfNotJSCell(X86::eax);
    347     Jump failureCases2 = checkStructure(X86::eax, structure);
     346    Jump failureCases1 = emitJumpIfNotJSCell(regT0);
     347    Jump failureCases2 = checkStructure(regT0, structure);
    348348
    349349    // Checks out okay! - getDirectOffset
    350     loadPtr(Address(X86::eax, FIELD_OFFSET(JSObject, m_propertyStorage)), X86::eax);
    351     loadPtr(Address(X86::eax, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     350    loadPtr(Address(regT0, FIELD_OFFSET(JSObject, m_propertyStorage)), regT0);
     351    loadPtr(Address(regT0, cachedOffset * sizeof(JSValuePtr)), regT0);
    352352    ret();
    353353
     
    373373    JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame));
    374374    PropertyStorage* protoPropertyStorage = &protoObject->m_propertyStorage;
    375     loadPtr(static_cast<void*>(protoPropertyStorage), X86::edx);
    376 
    377     // Check eax is an object of the right Structure.
    378     Jump failureCases1 = checkStructure(X86::eax, structure);
     375    loadPtr(static_cast<void*>(protoPropertyStorage), regT1);
     376
     377    // Check eax is an object of the right Structure.
     378    Jump failureCases1 = checkStructure(regT0, structure);
    379379
    380380    // Check the prototype object's Structure had not changed.
    381381    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    382382#if PLATFORM(X86_64)
    383     move(ImmPtr(prototypeStructure), X86::ebx);
    384     Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx);
     383    move(ImmPtr(prototypeStructure), regT3);
     384    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
    385385#else
    386386    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
     
    388388
    389389    // Checks out okay! - getDirectOffset
    390     loadPtr(Address(X86::edx, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     390    loadPtr(Address(regT1, cachedOffset * sizeof(JSValuePtr)), regT0);
    391391
    392392    Jump success = jump();
     
    415415    JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame));
    416416    PropertyStorage* protoPropertyStorage = &protoObject->m_propertyStorage;
    417     loadPtr(protoPropertyStorage, X86::edx);
    418 
    419     // Check eax is an object of the right Structure.
    420     Jump failureCases1 = emitJumpIfNotJSCell(X86::eax);
    421     Jump failureCases2 = checkStructure(X86::eax, structure);
     417    loadPtr(protoPropertyStorage, regT1);
     418
     419    // Check eax is an object of the right Structure.
     420    Jump failureCases1 = emitJumpIfNotJSCell(regT0);
     421    Jump failureCases2 = checkStructure(regT0, structure);
    422422
    423423    // Check the prototype object's Structure had not changed.
     
    426426
    427427    // Checks out okay! - getDirectOffset
    428     loadPtr(Address(X86::edx, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     428    loadPtr(Address(regT1, cachedOffset * sizeof(JSValuePtr)), regT0);
    429429
    430430    ret();
     
    446446void JIT::privateCompileGetByIdSelfList(StructureStubInfo* stubInfo, PolymorphicAccessStructureList* polymorphicStructures, int currentIndex, Structure* structure, size_t cachedOffset)
    447447{
    448     Jump failureCase = checkStructure(X86::eax, structure);
    449     loadPtr(Address(X86::eax, FIELD_OFFSET(JSObject, m_propertyStorage)), X86::eax);
    450     loadPtr(Address(X86::eax, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     448    Jump failureCase = checkStructure(regT0, structure);
     449    loadPtr(Address(regT0, FIELD_OFFSET(JSObject, m_propertyStorage)), regT0);
     450    loadPtr(Address(regT0, cachedOffset * sizeof(JSValuePtr)), regT0);
    451451    Jump success = jump();
    452452
     
    481481    JSObject* protoObject = asObject(structure->prototypeForLookup(callFrame));
    482482    PropertyStorage* protoPropertyStorage = &protoObject->m_propertyStorage;
    483     loadPtr(protoPropertyStorage, X86::edx);
    484 
    485     // Check eax is an object of the right Structure.
    486     Jump failureCases1 = checkStructure(X86::eax, structure);
     483    loadPtr(protoPropertyStorage, regT1);
     484
     485    // Check eax is an object of the right Structure.
     486    Jump failureCases1 = checkStructure(regT0, structure);
    487487
    488488    // Check the prototype object's Structure had not changed.
    489489    Structure** prototypeStructureAddress = &(protoObject->m_structure);
    490490#if PLATFORM(X86_64)
    491     move(ImmPtr(prototypeStructure), X86::ebx);
    492     Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx);
     491    move(ImmPtr(prototypeStructure), regT3);
     492    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3);
    493493#else
    494494    Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));
     
    496496
    497497    // Checks out okay! - getDirectOffset
    498     loadPtr(Address(X86::edx, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     498    loadPtr(Address(regT1, cachedOffset * sizeof(JSValuePtr)), regT0);
    499499
    500500    Jump success = jump();
     
    529529
    530530    // Check eax is an object of the right Structure.
    531     Jump baseObjectCheck = checkStructure(X86::eax, structure);
     531    Jump baseObjectCheck = checkStructure(regT0, structure);
    532532    bucketsOfFail.append(baseObjectCheck);
    533533
     
    542542        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    543543#if PLATFORM(X86_64)
    544         move(ImmPtr(currStructure), X86::ebx);
    545         bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx));
     544        move(ImmPtr(currStructure), regT3);
     545        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
    546546#else
    547547        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure)));
     
    551551
    552552    PropertyStorage* protoPropertyStorage = &protoObject->m_propertyStorage;
    553     loadPtr(protoPropertyStorage, X86::edx);
    554     loadPtr(Address(X86::edx, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     553    loadPtr(protoPropertyStorage, regT1);
     554    loadPtr(Address(regT1, cachedOffset * sizeof(JSValuePtr)), regT0);
    555555    Jump success = jump();
    556556
     
    590590
    591591    // Check eax is an object of the right Structure.
    592     bucketsOfFail.append(checkStructure(X86::eax, structure));
     592    bucketsOfFail.append(checkStructure(regT0, structure));
    593593
    594594    Structure* currStructure = structure;
     
    602602        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    603603#if PLATFORM(X86_64)
    604         move(ImmPtr(currStructure), X86::ebx);
    605         bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx));
     604        move(ImmPtr(currStructure), regT3);
     605        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), regT3));
    606606#else
    607607        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure)));
     
    611611
    612612    PropertyStorage* protoPropertyStorage = &protoObject->m_propertyStorage;
    613     loadPtr(protoPropertyStorage, X86::edx);
    614     loadPtr(Address(X86::edx, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     613    loadPtr(protoPropertyStorage, regT1);
     614    loadPtr(Address(regT1, cachedOffset * sizeof(JSValuePtr)), regT0);
    615615    Jump success = jump();
    616616
     
    637637
    638638    // Check eax is an object of the right Structure.
    639     bucketsOfFail.append(emitJumpIfNotJSCell(X86::eax));
    640     bucketsOfFail.append(checkStructure(X86::eax, structure));
     639    bucketsOfFail.append(emitJumpIfNotJSCell(regT0));
     640    bucketsOfFail.append(checkStructure(regT0, structure));
    641641
    642642    Structure* currStructure = structure;
     
    650650        Structure** prototypeStructureAddress = &(protoObject->m_structure);
    651651#if PLATFORM(X86_64)
    652         move(ImmPtr(currStructure), X86::ebx);
    653         bucketsOfFail.append(branchPtr(NotEqual, X86::ebx, AbsoluteAddress(prototypeStructureAddress)));
     652        move(ImmPtr(currStructure), regT3);
     653        bucketsOfFail.append(branchPtr(NotEqual, regT3, AbsoluteAddress(prototypeStructureAddress)));
    654654#else
    655655        bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure)));
     
    659659
    660660    PropertyStorage* protoPropertyStorage = &protoObject->m_propertyStorage;
    661     loadPtr(protoPropertyStorage, X86::edx);
    662     loadPtr(Address(X86::edx, cachedOffset * sizeof(JSValuePtr)), X86::eax);
     661    loadPtr(protoPropertyStorage, regT1);
     662    loadPtr(Address(regT1, cachedOffset * sizeof(JSValuePtr)), regT0);
    663663    ret();
    664664
     
    676676{
    677677    // Check eax is an object of the right Structure.
    678     Jump failureCases1 = emitJumpIfNotJSCell(X86::eax);
    679     Jump failureCases2 = checkStructure(X86::eax, structure);
     678    Jump failureCases1 = emitJumpIfNotJSCell(regT0);
     679    Jump failureCases2 = checkStructure(regT0, structure);
    680680
    681681    // checks out okay! - putDirectOffset
    682     loadPtr(Address(X86::eax, FIELD_OFFSET(JSObject, m_propertyStorage)), X86::eax);
    683     storePtr(X86::edx, Address(X86::eax, cachedOffset * sizeof(JSValuePtr)));
     682    loadPtr(Address(regT0, FIELD_OFFSET(JSObject, m_propertyStorage)), regT0);
     683    storePtr(regT1, Address(regT0, cachedOffset * sizeof(JSValuePtr)));
    684684    ret();
    685685
Note: See TracChangeset for help on using the changeset viewer.