Summary: | [JSC] Add Floating Point Abs() to B3 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Benjamin Poulain <benjamin> | ||||||||||
Component: | New Bugs | Assignee: | Benjamin Poulain <benjamin> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, ggaren | ||||||||||
Priority: | P2 | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Benjamin Poulain
2015-12-11 10:30:40 PST
Created attachment 267172 [details]
Patch
Comment on attachment 267172 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267172&action=review r=me > Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.cpp:81 > + if (m_value->type() == Double) > + mask = m_insertionSet.insert<ConstDoubleValue>(m_index, m_origin, bitwise_cast<double>(~(1l << 63))); > + if (m_value->type() == Float) > + mask = m_insertionSet.insert<ConstFloatValue>(m_index, m_origin, bitwise_cast<float>(~(1 << 31))); I think this would be clearest as else-if or switch. > Source/JavaScriptCore/b3/B3LowerMacrosAfterOptimizations.h:35 > +// Lower certain high level Opcodes to lower-level opcode to help code generation. opcodes Created attachment 267177 [details]
Patch for landing
Comment on attachment 267177 [details] Patch for landing Rejecting attachment 267177 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: ce/JavaScriptCore/b3/B3PatchpointValue.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/Objects-normal/x86_64/B3PatchpointValue.o ** BUILD FAILED ** The following build commands failed: CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/JavaScriptCore.build/Release/JavaScriptCore.build/Objects-normal/x86_64/B3LowerMacrosAfterOptimizations.o b3/B3LowerMacrosAfterOptimizations.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Full output: http://webkit-queues.webkit.org/results/546312 Created attachment 267186 [details]
Patch for landing
Comment on attachment 267186 [details] Patch for landing Rejecting attachment 267186 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 267186, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: ource/JavaScriptCore/b3/B3Value.h patching file Source/JavaScriptCore/b3/air/AirOpcode.opcodes patching file Source/JavaScriptCore/b3/testb3.cpp Hunk #1 succeeded at 1942 (offset 1 line). Hunk #2 succeeded at 3031 (offset 1 line). Hunk #3 succeeded at 7845 (offset 16 lines). Hunk #4 succeeded at 8085 (offset 16 lines). patching file Source/JavaScriptCore/ftl/FTLB3Output.h Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/547523 Created attachment 267217 [details]
Patch for landing
Comment on attachment 267217 [details] Patch for landing Clearing flags on attachment: 267217 Committed r194003: <http://trac.webkit.org/changeset/194003> All reviewed patches have been landed. Closing bug. Comment on attachment 267217 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=267217&action=review > Source/JavaScriptCore/b3/B3Validate.cpp:157 > + case BitAnd: This is super cool. :-) Are you going to add BitXor for floating point neg as well? :-) (In reply to comment #10) > Comment on attachment 267217 [details] > Patch for landing > > View in context: > https://bugs.webkit.org/attachment.cgi?id=267217&action=review > > > Source/JavaScriptCore/b3/B3Validate.cpp:157 > > + case BitAnd: > > This is super cool. :-) Are you going to add BitXor for floating point neg > as well? :-) Very likely yep. I'll do ceil() next though. We need it asap for ArithRound() |