Changeset 213753 in webkit for trunk/Source/JavaScriptCore/b3/testb3.cpp
- Timestamp:
- Mar 10, 2017, 11:17:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/b3/testb3.cpp
r213714 r213753 70 70 #include <cmath> 71 71 #include <string> 72 #include <wtf/FastTLS.h> 72 73 #include <wtf/ListDump.h> 73 74 #include <wtf/Lock.h> … … 15209 15210 for (unsigned value : values) 15210 15211 CHECK_EQ(numToStore, value); 15212 } 15213 15214 void testFastTLS() 15215 { 15216 #if ENABLE(FAST_TLS_JIT) 15217 _pthread_setspecific_direct(WTF_TESTING_KEY, bitwise_cast<void*>(static_cast<uintptr_t>(0xbeef))); 15218 15219 Procedure proc; 15220 BasicBlock* root = proc.addBlock(); 15221 15222 PatchpointValue* patchpoint = root->appendNew<PatchpointValue>(proc, pointerType(), Origin()); 15223 patchpoint->clobber(RegisterSet::macroScratchRegisters()); 15224 patchpoint->setGenerator( 15225 [&] (CCallHelpers& jit, const StackmapGenerationParams& params) { 15226 AllowMacroScratchRegisterUsage allowScratch(jit); 15227 jit.loadFromTLSPtr(fastTLSOffsetForKey(WTF_TESTING_KEY), params[0].gpr()); 15228 }); 15229 15230 root->appendNew<Value>(proc, Return, Origin(), patchpoint); 15231 15232 CHECK_EQ(compileAndRun<uintptr_t>(proc), static_cast<uintptr_t>(0xbeef)); 15233 #endif 15211 15234 } 15212 15235 … … 16737 16760 RUN(testWasmBoundsCheck(std::numeric_limits<unsigned>::max() - 5)); 16738 16761 RUN(testWasmAddress()); 16762 16763 RUN(testFastTLS()); 16739 16764 16740 16765 if (isX86()) {
Note:
See TracChangeset
for help on using the changeset viewer.