Changeset 44514 in webkit for trunk/JavaScriptCore/yarr/RegexJIT.cpp
- Timestamp:
- Jun 8, 2009, 6:40:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/yarr/RegexJIT.cpp
r44477 r44514 44 44 friend void jitCompileRegex(JSGlobalData* globalData, RegexCodeBlock& jitObject, const UString& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline); 45 45 46 #if PLATFORM(ARM_V7) 47 static const RegisterID input = ARM::r0; 48 static const RegisterID index = ARM::r1; 49 static const RegisterID length = ARM::r2; 50 51 static const RegisterID output = ARM::r4; 52 static const RegisterID regT0 = ARM::r5; 53 static const RegisterID regT1 = ARM::r6; 54 55 static const RegisterID returnRegister = ARM::r0; 56 #endif 46 57 #if PLATFORM(X86) 47 58 static const RegisterID input = X86::eax; … … 1279 1290 void generateEnter() 1280 1291 { 1281 // On x86 edi & esi are callee preserved registers. 1292 #if PLATFORM(X86_64) 1282 1293 push(X86::ebp); 1283 1294 move(stackPointerRegister, X86::ebp); 1284 #if PLATFORM(X86) 1295 #elif PLATFORM(X86) 1296 push(X86::ebp); 1297 move(stackPointerRegister, X86::ebp); 1285 1298 // TODO: do we need spill registers to fill the output pointer if there are no sub captures? 1286 1299 push(X86::ebx); … … 1288 1301 push(X86::esi); 1289 1302 // load output into edi (2 = saved ebp + return address). 1290 #if COMPILER(MSVC)1303 #if COMPILER(MSVC) 1291 1304 loadPtr(Address(X86::ebp, 2 * sizeof(void*)), input); 1292 1305 loadPtr(Address(X86::ebp, 3 * sizeof(void*)), index); 1293 1306 loadPtr(Address(X86::ebp, 4 * sizeof(void*)), length); 1294 1307 loadPtr(Address(X86::ebp, 5 * sizeof(void*)), output); 1295 #else1308 #else 1296 1309 loadPtr(Address(X86::ebp, 2 * sizeof(void*)), output); 1310 #endif 1311 #elif PLATFORM(ARM_V7) 1312 push(ARM::r4); 1313 push(ARM::r5); 1314 push(ARM::r6); 1315 move(ARM::r3, output); 1297 1316 #endif 1298 #endif1299 1317 } 1300 1318 1301 1319 void generateReturn() 1302 1320 { 1303 #if PLATFORM(X86) 1321 #if PLATFORM(X86_64) 1322 pop(X86::ebp); 1323 #elif PLATFORM(X86) 1304 1324 pop(X86::esi); 1305 1325 pop(X86::edi); 1306 1326 pop(X86::ebx); 1327 pop(X86::ebp); 1328 #elif PLATFORM(ARM_V7) 1329 pop(ARM::r6); 1330 pop(ARM::r5); 1331 pop(ARM::r4); 1307 1332 #endif 1308 pop(X86::ebp);1309 1333 ret(); 1310 1334 }
Note:
See TracChangeset
for help on using the changeset viewer.