Changeset 224243 in webkit
- Timestamp:
- Oct 31, 2017 1:29:55 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r224236 r224243 1 2017-10-31 Keith Miller <keith_miller@apple.com> 2 3 StructureStubInfo should have GPRReg members not int8_ts 4 https://bugs.webkit.org/show_bug.cgi?id=179071 5 6 Reviewed by Michael Saboff. 7 8 This patch makes the various RegisterID enums be backed by 9 uint8_t. This means that we can remove the old int8_t members in 10 StructureStubInfo and replace them with the correct enum types. 11 12 Also, this fixes an indentation issue in ARMv7Assembler.h. 13 14 * assembler/ARM64Assembler.h: 15 * assembler/ARMAssembler.h: 16 * assembler/ARMv7Assembler.h: 17 (JSC::ARMRegisters::asSingle): 18 (JSC::ARMRegisters::asDouble): 19 * assembler/MIPSAssembler.h: 20 * assembler/X86Assembler.h: 21 * bytecode/InlineAccess.cpp: 22 (JSC::InlineAccess::generateSelfPropertyAccess): 23 (JSC::getScratchRegister): 24 * bytecode/PolymorphicAccess.cpp: 25 (JSC::PolymorphicAccess::regenerate): 26 * bytecode/StructureStubInfo.h: 27 (JSC::StructureStubInfo::valueRegs const): 28 * dfg/DFGSpeculativeJIT.cpp: 29 (JSC::DFG::SpeculativeJIT::compileIn): 30 * ftl/FTLLowerDFGToB3.cpp: 31 (JSC::FTL::DFG::LowerDFGToB3::compileIn): 32 * jit/JITInlineCacheGenerator.cpp: 33 (JSC::JITByIdGenerator::JITByIdGenerator): 34 (JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator): 35 1 36 2017-10-31 Devin Rousso <webkit@devinrousso.com> 2 37 -
trunk/Source/JavaScriptCore/assembler/ARM64Assembler.h
r219740 r224243 158 158 namespace ARM64Registers { 159 159 160 typedef enum{160 enum RegisterID : uint8_t { 161 161 // Parameter/result registers. 162 162 x0, … … 204 204 x30 = lr, 205 205 zr = 0x3f, 206 } RegisterID;206 }; 207 207 208 208 typedef enum { -
trunk/Source/JavaScriptCore/assembler/ARMAssembler.h
r220871 r224243 39 39 namespace ARMRegisters { 40 40 41 typedef enum{41 enum RegisterID : uint8_t { 42 42 r0, 43 43 r1, … … 64 64 r14 = lr, 65 65 r15 = pc 66 } RegisterID;66 }; 67 67 68 68 typedef enum { -
trunk/Source/JavaScriptCore/assembler/ARMv7Assembler.h
r220958 r224243 40 40 namespace ARMRegisters { 41 41 42 typedef enum{43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 } RegisterID;68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 42 enum RegisterID : uint8_t { 43 r0, 44 r1, 45 r2, 46 r3, 47 r4, 48 r5, 49 r6, 50 r7, 51 r8, 52 r9, 53 r10, 54 r11, 55 r12, 56 r13, 57 r14, 58 r15, 59 60 fp = r7, // frame pointer 61 sb = r9, // static base 62 sl = r10, // stack limit 63 ip = r12, 64 sp = r13, 65 lr = r14, 66 pc = r15 67 }; 68 69 typedef enum { 70 apsr, 71 fpscr 72 } SPRegisterID; 73 74 typedef enum { 75 s0, 76 s1, 77 s2, 78 s3, 79 s4, 80 s5, 81 s6, 82 s7, 83 s8, 84 s9, 85 s10, 86 s11, 87 s12, 88 s13, 89 s14, 90 s15, 91 s16, 92 s17, 93 s18, 94 s19, 95 s20, 96 s21, 97 s22, 98 s23, 99 s24, 100 s25, 101 s26, 102 s27, 103 s28, 104 s29, 105 s30, 106 s31, 107 } FPSingleRegisterID; 108 109 typedef enum { 110 d0, 111 d1, 112 d2, 113 d3, 114 d4, 115 d5, 116 d6, 117 d7, 118 d8, 119 d9, 120 d10, 121 d11, 122 d12, 123 d13, 124 d14, 125 d15, 126 126 #if CPU(ARM_NEON) || CPU(ARM_VFP_V3_D32) 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 127 d16, 128 d17, 129 d18, 130 d19, 131 d20, 132 d21, 133 d22, 134 d23, 135 d24, 136 d25, 137 d26, 138 d27, 139 d28, 140 d29, 141 d30, 142 d31, 143 143 #endif // CPU(ARM_NEON) || CPU(ARM_VFP_V3_D32) 144 144 } FPDoubleRegisterID; 145 145 146 146 #if CPU(ARM_NEON) 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 147 typedef enum { 148 q0, 149 q1, 150 q2, 151 q3, 152 q4, 153 q5, 154 q6, 155 q7, 156 q8, 157 q9, 158 q10, 159 q11, 160 q12, 161 q13, 162 q14, 163 q15, 164 } FPQuadRegisterID; 165 165 #endif // CPU(ARM_NEON) 166 166 167 168 169 170 171 172 173 174 175 176 177 167 inline FPSingleRegisterID asSingle(FPDoubleRegisterID reg) 168 { 169 ASSERT(reg < d16); 170 return (FPSingleRegisterID)(reg << 1); 171 } 172 173 inline FPDoubleRegisterID asDouble(FPSingleRegisterID reg) 174 { 175 ASSERT(!(reg & 1)); 176 return (FPDoubleRegisterID)(reg >> 1); 177 } 178 178 179 179 } // namespace ARMRegisters -
trunk/Source/JavaScriptCore/assembler/MIPSAssembler.h
r219740 r224243 42 42 43 43 namespace MIPSRegisters { 44 typedef enum { 44 45 enum RegisterID : uint8_t { 45 46 r0 = 0, 46 47 r1, … … 107 108 fp = r30, 108 109 ra = r31 109 } RegisterID;110 }; 110 111 111 112 // Currently, we don't have support for any special purpose registers. -
trunk/Source/JavaScriptCore/assembler/X86Assembler.h
r219740 r224243 42 42 namespace X86Registers { 43 43 44 typedef enum{44 enum RegisterID : uint8_t { 45 45 eax, 46 46 ecx, … … 61 61 r15 62 62 #endif 63 } RegisterID;63 }; 64 64 65 65 typedef enum { -
trunk/Source/JavaScriptCore/bytecode/InlineAccess.cpp
r220441 r224243 162 162 CCallHelpers jit; 163 163 164 GPRReg base = st atic_cast<GPRReg>(stubInfo.patch.baseGPR);164 GPRReg base = stubInfo.patch.baseGPR; 165 165 JSValueRegs value = stubInfo.valueRegs(); 166 166 … … 190 190 { 191 191 ScratchRegisterAllocator allocator(stubInfo.patch.usedRegisters); 192 allocator.lock(st atic_cast<GPRReg>(stubInfo.patch.baseGPR));193 allocator.lock(st atic_cast<GPRReg>(stubInfo.patch.valueGPR));192 allocator.lock(stubInfo.patch.baseGPR); 193 allocator.lock(stubInfo.patch.valueGPR); 194 194 #if USE(JSVALUE32_64) 195 allocator.lock(st atic_cast<GPRReg>(stubInfo.patch.baseTagGPR));196 allocator.lock(st atic_cast<GPRReg>(stubInfo.patch.valueTagGPR));195 allocator.lock(stubInfo.patch.baseTagGPR); 196 allocator.lock(stubInfo.patch.valueTagGPR); 197 197 #endif 198 198 GPRReg scratch = allocator.allocateScratchGPR(); -
trunk/Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
r223738 r224243 380 380 state.ident = &ident; 381 381 382 state.baseGPR = st atic_cast<GPRReg>(stubInfo.patch.baseGPR);383 state.thisGPR = st atic_cast<GPRReg>(stubInfo.patch.thisGPR);382 state.baseGPR = stubInfo.patch.baseGPR; 383 state.thisGPR = stubInfo.patch.thisGPR; 384 384 state.valueRegs = stubInfo.valueRegs(); 385 385 … … 391 391 allocator.lock(state.valueRegs); 392 392 #if USE(JSVALUE32_64) 393 allocator.lock(st atic_cast<GPRReg>(stubInfo.patch.baseTagGPR));393 allocator.lock(stubInfo.patch.baseTagGPR); 394 394 #endif 395 395 -
trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h
r218794 r224243 175 175 int32_t deltaFromStartToSlowPathStart; 176 176 177 int8_tbaseGPR;178 int8_tvalueGPR;179 int8_tthisGPR;177 GPRReg baseGPR; 178 GPRReg valueGPR; 179 GPRReg thisGPR; 180 180 #if USE(JSVALUE32_64) 181 int8_tvalueTagGPR;182 int8_tbaseTagGPR;183 int8_tthisTagGPR;181 GPRReg valueTagGPR; 182 GPRReg baseTagGPR; 183 GPRReg thisTagGPR; 184 184 #endif 185 185 } patch; … … 198 198 return JSValueRegs( 199 199 #if USE(JSVALUE32_64) 200 static_cast<GPRReg>(patch.valueTagGPR),200 patch.valueTagGPR, 201 201 #endif 202 static_cast<GPRReg>(patch.valueGPR));202 patch.valueGPR); 203 203 } 204 204 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r223715 r224243 1051 1051 stubInfo->callSiteIndex = m_jit.addCallSite(node->origin.semantic); 1052 1052 stubInfo->codeOrigin = node->origin.semantic; 1053 stubInfo->patch.baseGPR = static_cast<int8_t>(baseGPR);1054 stubInfo->patch.valueGPR = static_cast<int8_t>(resultGPR);1055 stubInfo->patch.thisGPR = static_cast<int8_t>(InvalidGPRReg);1053 stubInfo->patch.baseGPR = baseGPR; 1054 stubInfo->patch.valueGPR = resultGPR; 1055 stubInfo->patch.thisGPR = InvalidGPRReg; 1056 1056 #if USE(JSVALUE32_64) 1057 stubInfo->patch.valueTagGPR = static_cast<int8_t>(InvalidGPRReg);1058 stubInfo->patch.baseTagGPR = static_cast<int8_t>(InvalidGPRReg);1059 stubInfo->patch.thisTagGPR = static_cast<int8_t>(InvalidGPRReg);1057 stubInfo->patch.valueTagGPR = InvalidGPRReg; 1058 stubInfo->patch.baseTagGPR = InvalidGPRReg; 1059 stubInfo->patch.thisTagGPR = InvalidGPRReg; 1060 1060 #endif 1061 1061 stubInfo->patch.usedRegisters = usedRegisters(); -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r223919 r224243 8865 8865 state->jitCode->common.addCodeOrigin(node->origin.semantic); 8866 8866 stubInfo->codeOrigin = node->origin.semantic; 8867 stubInfo->patch.baseGPR = static_cast<int8_t>(baseGPR);8868 stubInfo->patch.valueGPR = static_cast<int8_t>(resultGPR);8869 stubInfo->patch.thisGPR = static_cast<int8_t>(InvalidGPRReg);8867 stubInfo->patch.baseGPR = baseGPR; 8868 stubInfo->patch.valueGPR = resultGPR; 8869 stubInfo->patch.thisGPR = InvalidGPRReg; 8870 8870 stubInfo->patch.usedRegisters = params.unavailableRegisters(); 8871 8871 -
trunk/Source/JavaScriptCore/jit/JITInlineCacheGenerator.cpp
r213467 r224243 61 61 m_stubInfo->patch.usedRegisters = usedRegisters; 62 62 63 m_stubInfo->patch.baseGPR = static_cast<int8_t>(base.payloadGPR());64 m_stubInfo->patch.valueGPR = static_cast<int8_t>(value.payloadGPR());65 m_stubInfo->patch.thisGPR = static_cast<int8_t>(InvalidGPRReg);63 m_stubInfo->patch.baseGPR = base.payloadGPR(); 64 m_stubInfo->patch.valueGPR = value.payloadGPR(); 65 m_stubInfo->patch.thisGPR = InvalidGPRReg; 66 66 #if USE(JSVALUE32_64) 67 m_stubInfo->patch.baseTagGPR = static_cast<int8_t>(base.tagGPR());68 m_stubInfo->patch.valueTagGPR = static_cast<int8_t>(value.tagGPR());69 m_stubInfo->patch.thisTagGPR = static_cast<int8_t>(InvalidGPRReg);67 m_stubInfo->patch.baseTagGPR = base.tagGPR(); 68 m_stubInfo->patch.valueTagGPR = value.tagGPR(); 69 m_stubInfo->patch.thisTagGPR = InvalidGPRReg; 70 70 #endif 71 71 } … … 126 126 RELEASE_ASSERT(thisRegs.payloadGPR() != thisRegs.tagGPR()); 127 127 128 m_stubInfo->patch.thisGPR = static_cast<int8_t>(thisRegs.payloadGPR());128 m_stubInfo->patch.thisGPR = thisRegs.payloadGPR(); 129 129 #if USE(JSVALUE32_64) 130 m_stubInfo->patch.thisTagGPR = static_cast<int8_t>(thisRegs.tagGPR());130 m_stubInfo->patch.thisTagGPR = thisRegs.tagGPR(); 131 131 #endif 132 132 }
Note: See TracChangeset
for help on using the changeset viewer.