Changeset 109834 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Mar 5, 2012, 6:40:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r109824 r109834 1 2012-03-05 Oliver Hunt <[email protected]> 2 3 Add basic support for constant blinding to the JIT 4 https://bugs.webkit.org/show_bug.cgi?id=80354 5 6 Reviewed by Filip Pizlo. 7 8 This patch adds basic constant blinding support to the JIT, at the 9 MacroAssembler level. This means all JITs in JSC (Yarr, baseline, and DFG) 10 get constant blinding. Woo! 11 12 This patch only introduces blinding for Imm32, a later patch will do similar 13 for ImmPtr. In order to make misuse of Imm32 as a trusted type essentially 14 impossible, we make TrustedImm32 a private parent of Imm32 and add an explicit 15 accessor that's needed to access the actual value. This also means you cannot 16 accidentally pass an untrusted value to a function that does not perform 17 blinding. 18 19 To make everything work sensibly, this patch also corrects some code that was using 20 Imm32 when TrustedImm32 could be used, and refactors a few callers that use 21 untrusted immediates, so that they call slightly different varaints of the functions 22 that they used previously. This is largely necessary to deal with x86-32 not having 23 sufficient registers to handle the additional work required when we choose to blind 24 a constant. 25 26 * assembler/AbstractMacroAssembler.h: 27 (JSC::AbstractMacroAssembler::Imm32::asTrustedImm32): 28 (Imm32): 29 (JSC::AbstractMacroAssembler::beginUninterruptedSequence): 30 (JSC::AbstractMacroAssembler::endUninterruptedSequence): 31 (JSC::AbstractMacroAssembler::AbstractMacroAssembler): 32 (AbstractMacroAssembler): 33 (JSC::AbstractMacroAssembler::inUninterruptedSequence): 34 (JSC::AbstractMacroAssembler::random): 35 (JSC::AbstractMacroAssembler::scratchRegisterForBlinding): 36 (JSC::AbstractMacroAssembler::shouldBlindForSpecificArch): 37 * assembler/MacroAssembler.h: 38 (JSC::MacroAssembler::addressForPoke): 39 (MacroAssembler): 40 (JSC::MacroAssembler::poke): 41 (JSC::MacroAssembler::branchPtr): 42 (JSC::MacroAssembler::branch32): 43 (JSC::MacroAssembler::convertInt32ToDouble): 44 (JSC::MacroAssembler::shouldBlind): 45 (JSC::MacroAssembler::BlindedImm32::BlindedImm32): 46 (BlindedImm32): 47 (JSC::MacroAssembler::keyForConstant): 48 (JSC::MacroAssembler::xorBlindConstant): 49 (JSC::MacroAssembler::additionBlindedConstant): 50 (JSC::MacroAssembler::andBlindedConstant): 51 (JSC::MacroAssembler::orBlindedConstant): 52 (JSC::MacroAssembler::loadXorBlindedConstant): 53 (JSC::MacroAssembler::add32): 54 (JSC::MacroAssembler::addPtr): 55 (JSC::MacroAssembler::and32): 56 (JSC::MacroAssembler::andPtr): 57 (JSC::MacroAssembler::move): 58 (JSC::MacroAssembler::or32): 59 (JSC::MacroAssembler::store32): 60 (JSC::MacroAssembler::sub32): 61 (JSC::MacroAssembler::subPtr): 62 (JSC::MacroAssembler::xor32): 63 (JSC::MacroAssembler::branchAdd32): 64 (JSC::MacroAssembler::branchMul32): 65 (JSC::MacroAssembler::branchSub32): 66 (JSC::MacroAssembler::trustedImm32ForShift): 67 (JSC::MacroAssembler::lshift32): 68 (JSC::MacroAssembler::rshift32): 69 (JSC::MacroAssembler::urshift32): 70 * assembler/MacroAssemblerARMv7.h: 71 (MacroAssemblerARMv7): 72 (JSC::MacroAssemblerARMv7::scratchRegisterForBlinding): 73 (JSC::MacroAssemblerARMv7::shouldBlindForSpecificArch): 74 * assembler/MacroAssemblerX86_64.h: 75 (JSC::MacroAssemblerX86_64::branchSubPtr): 76 (MacroAssemblerX86_64): 77 (JSC::MacroAssemblerX86_64::scratchRegisterForBlinding): 78 * dfg/DFGJITCompiler.cpp: 79 (JSC::DFG::JITCompiler::linkOSRExits): 80 (JSC::DFG::JITCompiler::compileBody): 81 (JSC::DFG::JITCompiler::compileFunction): 82 * dfg/DFGOSRExitCompiler32_64.cpp: 83 (JSC::DFG::OSRExitCompiler::compileExit): 84 * dfg/DFGOSRExitCompiler64.cpp: 85 (JSC::DFG::OSRExitCompiler::compileExit): 86 * dfg/DFGSpeculativeJIT.cpp: 87 (JSC::DFG::SpeculativeJIT::compile): 88 (JSC::DFG::SpeculativeJIT::compileArithSub): 89 (JSC::DFG::SpeculativeJIT::compileStrictEqForConstant): 90 * dfg/DFGSpeculativeJIT.h: 91 (JSC::DFG::SpeculativeJIT::callOperation): 92 * dfg/DFGSpeculativeJIT32_64.cpp: 93 (JSC::DFG::SpeculativeJIT::emitCall): 94 (JSC::DFG::SpeculativeJIT::compileObjectEquality): 95 (JSC::DFG::SpeculativeJIT::compileDoubleCompare): 96 (JSC::DFG::SpeculativeJIT::compile): 97 * dfg/DFGSpeculativeJIT64.cpp: 98 (JSC::DFG::SpeculativeJIT::emitCall): 99 (JSC::DFG::SpeculativeJIT::compileDoubleCompare): 100 (JSC::DFG::SpeculativeJIT::compile): 101 * jit/JIT.cpp: 102 (JSC::JIT::privateCompileSlowCases): 103 (JSC::JIT::privateCompile): 104 * jit/JITArithmetic.cpp: 105 (JSC::JIT::compileBinaryArithOp): 106 (JSC::JIT::emit_op_add): 107 (JSC::JIT::emit_op_mul): 108 (JSC::JIT::emit_op_div): 109 * jit/JITArithmetic32_64.cpp: 110 (JSC::JIT::emitAdd32Constant): 111 (JSC::JIT::emitSub32Constant): 112 (JSC::JIT::emitBinaryDoubleOp): 113 (JSC::JIT::emitSlow_op_mul): 114 (JSC::JIT::emit_op_div): 115 * jit/JITCall.cpp: 116 (JSC::JIT::compileLoadVarargs): 117 * jit/JITCall32_64.cpp: 118 (JSC::JIT::compileLoadVarargs): 119 * jit/JITInlineMethods.h: 120 (JSC::JIT::updateTopCallFrame): 121 (JSC::JIT::emitValueProfilingSite): 122 * jit/JITOpcodes32_64.cpp: 123 (JSC::JIT::emitSlow_op_jfalse): 124 (JSC::JIT::emitSlow_op_jtrue): 125 * jit/JITStubCall.h: 126 (JITStubCall): 127 (JSC::JITStubCall::addArgument): 128 * yarr/YarrJIT.cpp: 129 (JSC::Yarr::YarrGenerator::backtrack): 130 1 131 2012-03-05 Gavin Barraclough <[email protected]> 2 132
Note:
See TracChangeset
for help on using the changeset viewer.