Strange branching performance

David Chase at
Thu Feb 20 06:11:23 PST 2014

On 2014-02-14, at 1:46 PM, Vladimir Kozlov <vladimir.kozlov at> wrote:

> Equality test does not set carry flag. You code is for if (P < Q) { X+1 }

Be careful with the carry flag after cmp -- from the Intel docs:

The condition codes used by the Jcc, CMOVcc, and SETcc instructions are based on the results of a CMP instruction. Appendix B, “EFLAGS Condition Codes,” in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, shows the relationship of the status flags and the condition codes.


The terms “above” and “below” are associated with the CF flag and refer to the relation between two unsigned integer values. The terms “greater” and “less” are asso- ciated with the SF and OF flags and refer to the relation between two signed integer values.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : 

More information about the hotspot-compiler-dev mailing list