forked from google/skia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve RP code generation for negation.
Previously, we emitted `0 - x` for all negation. This was fine, but can never use our immediate ops. Now, we emit negation for floats as `x + int(0x80000000)`, and negation for ints as `x * -1`. This allows scalar negation to use a single immediate-op instruction, and sometimes allows multi-slot negation to reuse an existing value on the stack. This never seems to be a downgrade. Change-Id: I427f6e2932370c56cd7076535e082d938a645820 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/681516 Reviewed-by: Brian Osman <[email protected]> Commit-Queue: Brian Osman <[email protected]> Auto-Submit: John Stiles <[email protected]> Commit-Queue: John Stiles <[email protected]>
- Loading branch information
1 parent
b59f0fd
commit 3fea885
Showing
12 changed files
with
271 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.