|
| 1 | +2011-11-08 Gavin Barraclough <barraclough@apple.com> |
| 2 | + |
| 3 | + Better abstract 'abs' operation through the MacroAssembler. |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=71873 |
| 5 | + |
| 6 | + Reviewed by Geoff Garen. |
| 7 | + |
| 8 | + Currently the x86 specific instruction sequence to perform a double abs |
| 9 | + is duplicated throughout the JITs / thunk generators. |
| 10 | + |
| 11 | + * assembler/MacroAssemblerARM.h: |
| 12 | + (JSC::MacroAssemblerARM::supportsFloatingPoint): |
| 13 | + (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): |
| 14 | + (JSC::MacroAssemblerARM::supportsFloatingPointSqrt): |
| 15 | + (JSC::MacroAssemblerARM::supportsFloatingPointAbs): |
| 16 | + (JSC::MacroAssemblerARM::absDouble): |
| 17 | + - Renamed supportsFloatingPointAbs, make these methods static so that |
| 18 | + we can check the JIT's capabilites before we begin compilation. |
| 19 | + * assembler/MacroAssemblerARMv7.h: |
| 20 | + (JSC::MacroAssemblerARMv7::supportsFloatingPoint): |
| 21 | + (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate): |
| 22 | + (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt): |
| 23 | + (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs): |
| 24 | + - Renamed supportsFloatingPointAbs, make these methods static so that |
| 25 | + we can check the JIT's capabilites before we begin compilation. |
| 26 | + * assembler/MacroAssemblerMIPS.h: |
| 27 | + (JSC::MacroAssemblerMIPS::absDouble): |
| 28 | + (JSC::MacroAssemblerMIPS::supportsFloatingPoint): |
| 29 | + (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate): |
| 30 | + (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt): |
| 31 | + (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs): |
| 32 | + - Renamed supportsFloatingPointAbs, make these methods static so that |
| 33 | + we can check the JIT's capabilites before we begin compilation. |
| 34 | + * assembler/MacroAssemblerSH4.h: |
| 35 | + (JSC::MacroAssemblerSH4::supportsFloatingPoint): |
| 36 | + (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate): |
| 37 | + (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt): |
| 38 | + (JSC::MacroAssemblerSH4::supportsFloatingPointAbs): |
| 39 | + (JSC::MacroAssemblerSH4::absDouble): |
| 40 | + - Renamed supportsFloatingPointAbs, make these methods static so that |
| 41 | + we can check the JIT's capabilites before we begin compilation. |
| 42 | + * assembler/MacroAssemblerX86.h: |
| 43 | + (JSC::MacroAssemblerX86::absDouble): |
| 44 | + (JSC::MacroAssemblerX86::supportsFloatingPoint): |
| 45 | + (JSC::MacroAssemblerX86::supportsFloatingPointTruncate): |
| 46 | + (JSC::MacroAssemblerX86::supportsFloatingPointSqrt): |
| 47 | + (JSC::MacroAssemblerX86::supportsFloatingPointAbs): |
| 48 | + - Made supports* methods static so that we can check the JIT's |
| 49 | + capabilites before we begin compilation. Added absDouble. |
| 50 | + * assembler/MacroAssemblerX86Common.h: |
| 51 | + - Removed andnotDouble, added s_maskSignBit. |
| 52 | + * assembler/MacroAssemblerX86_64.h: |
| 53 | + (JSC::MacroAssemblerX86_64::absDouble): |
| 54 | + (JSC::MacroAssemblerX86_64::supportsFloatingPoint): |
| 55 | + (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate): |
| 56 | + (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt): |
| 57 | + (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs): |
| 58 | + - Made supports* methods static so that we can check the JIT's |
| 59 | + capabilites before we begin compilation. Added absDouble. |
| 60 | + * assembler/X86Assembler.h: |
| 61 | + (JSC::X86Assembler::andpd_rr): |
| 62 | + (JSC::X86Assembler::andpd_mr): |
| 63 | + - Added support for andpd instruction. |
| 64 | + * dfg/DFGByteCodeParser.cpp: |
| 65 | + (JSC::DFG::ByteCodeParser::handleIntrinsic): |
| 66 | + - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt. |
| 67 | + * dfg/DFGSpeculativeJIT32_64.cpp: |
| 68 | + (JSC::DFG::SpeculativeJIT::compile): |
| 69 | + - Switched to use doubleAbs, we can now also reuse the operand register for the result. |
| 70 | + * dfg/DFGSpeculativeJIT64.cpp: |
| 71 | + (JSC::DFG::SpeculativeJIT::compile): |
| 72 | + - Switched to use doubleAbs, we can now also reuse the operand register for the result. |
| 73 | + * jit/ThunkGenerators.cpp: |
| 74 | + - Switched to use doubleAbs. |
| 75 | + (JSC::absThunkGenerator): |
| 76 | + * runtime/JSGlobalData.cpp: |
| 77 | + - Declared MacroAssemblerX86Common::s_maskSignBit here. |
| 78 | + This is a little ugly, but it doesn't seem worth adding a whole extra .cpp |
| 79 | + to the compile for just one constant. |
| 80 | + |
1 | 81 | 2011-11-08 Gavin Barraclough <barraclough@apple.com> |
2 | 82 |
|
3 | 83 | Move duplicates of SYMBOL_STRING* macros to the single location |
|
0 commit comments