#include "irnode_t.h"
enum {
- ia32_pn_Cmp_unsigned = 0x1000,
- ia32_pn_Cmp_float = 0x2000,
- ia32_pn_Cmp_parity = 0x4000
+ ia32_pn_Cmp_unsigned = 0x1000,
+ ia32_pn_Cmp_float = 0x2000,
+ ia32_pn_Cmp_parity = 0x4000,
+ /* The unsigned Lt/Ge comparisons test the carry bit. */
+ ia32_pn_Cmp_carry = pn_Cmp_Lt | ia32_pn_Cmp_unsigned
+ ia32_pn_Cmp_not_carry = pn_Cmp_Ge | ia32_pn_Cmp_unsigned,
};
typedef enum {
int pnc = get_ia32_condcode(user);
switch (pnc) {
- case pn_Cmp_Eq: pnc = pn_Cmp_Ge | ia32_pn_Cmp_unsigned; break;
- case pn_Cmp_Lg: pnc = pn_Cmp_Lt | ia32_pn_Cmp_unsigned; break;
+ case pn_Cmp_Eq: pnc = ia32_pn_Cmp_no_carry; break;
+ case pn_Cmp_Lg: pnc = ia32_pn_Cmp_carry; break;
default: panic("unexpected pn");
}
set_ia32_condcode(user, pnc);