Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimizing LONG MUL to SHIFT: add overflow detection for x86
Similar to the AArch64 implementation, we compare "op" and "op << n >> n" to detect integer overflow. Note that instructions 'pushf' and 'popf' are used to save/restore the flags set by 'cmp', otherwise, the follow-up 'shl' might change the flags. Note that test case "mul_004.phpt" can pass now for x86. Change-Id: Ieee037f41dce298979b8a0964ca97598939c495c
- Loading branch information
Showing
1 changed file
with
55 additions
and
6 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