1 #define sext(X) ((long long) (X)) 2 #define POS (1LL << 31) 3 #define NEG (-POS - 1) 4 lt_ge0(int x)5static int lt_ge0(int x) { return (sext(x) < (POS + 0)) == 1; } lt_ge1(int x)6static int lt_ge1(int x) { return (sext(x) < (POS + 1)) == 1; } lt_ge2(int x)7static int lt_ge2(int x) { return (sext(x) < (POS + 2)) == 1; } lt_gex(int x)8static int lt_gex(int x) { return (sext(x) < (POS<< 1)) == 1; } lt_gey(int x)9static int lt_gey(int x) { return (sext(x) < (POS<< 3)) == 1; } le_ge0(int x)10static int le_ge0(int x) { return (sext(x) <= (POS + 0)) == 1; } le_ge1(int x)11static int le_ge1(int x) { return (sext(x) <= (POS + 1)) == 1; } le_ge2(int x)12static int le_ge2(int x) { return (sext(x) <= (POS + 2)) == 1; } le_gex(int x)13static int le_gex(int x) { return (sext(x) <= (POS<< 1)) == 1; } le_gey(int x)14static int le_gey(int x) { return (sext(x) <= (POS<< 3)) == 1; } ge_ge0(int x)15static int ge_ge0(int x) { return (sext(x) >= (POS + 0)) == 0; } ge_ge1(int x)16static int ge_ge1(int x) { return (sext(x) >= (POS + 1)) == 0; } ge_ge2(int x)17static int ge_ge2(int x) { return (sext(x) >= (POS + 2)) == 0; } ge_gex(int x)18static int ge_gex(int x) { return (sext(x) >= (POS<< 1)) == 0; } ge_gey(int x)19static int ge_gey(int x) { return (sext(x) >= (POS<< 3)) == 0; } gt_ge0(int x)20static int gt_ge0(int x) { return (sext(x) > (POS + 0)) == 0; } gt_ge1(int x)21static int gt_ge1(int x) { return (sext(x) > (POS + 1)) == 0; } gt_ge2(int x)22static int gt_ge2(int x) { return (sext(x) > (POS + 2)) == 0; } gt_gex(int x)23static int gt_gex(int x) { return (sext(x) > (POS<< 1)) == 0; } gt_gey(int x)24static int gt_gey(int x) { return (sext(x) > (POS<< 3)) == 0; } 25 lt_lt0(int x)26static int lt_lt0(int x) { return (sext(x) < (NEG - 0)) == 0; } lt_lt1(int x)27static int lt_lt1(int x) { return (sext(x) < (NEG - 1)) == 0; } lt_lt2(int x)28static int lt_lt2(int x) { return (sext(x) < (NEG - 2)) == 0; } lt_ltx(int x)29static int lt_ltx(int x) { return (sext(x) < (NEG<< 1)) == 0; } lt_lty(int x)30static int lt_lty(int x) { return (sext(x) < (NEG<< 3)) == 0; } le_lt0(int x)31static int le_lt0(int x) { return (sext(x) <= (NEG - 0)) == 0; } le_lt1(int x)32static int le_lt1(int x) { return (sext(x) <= (NEG - 1)) == 0; } le_lt2(int x)33static int le_lt2(int x) { return (sext(x) <= (NEG - 2)) == 0; } le_ltx(int x)34static int le_ltx(int x) { return (sext(x) <= (NEG<< 1)) == 0; } le_lty(int x)35static int le_lty(int x) { return (sext(x) <= (NEG<< 3)) == 0; } ge_lt0(int x)36static int ge_lt0(int x) { return (sext(x) >= (NEG - 0)) == 1; } ge_lt1(int x)37static int ge_lt1(int x) { return (sext(x) >= (NEG - 1)) == 1; } ge_lt2(int x)38static int ge_lt2(int x) { return (sext(x) >= (NEG - 2)) == 1; } ge_ltx(int x)39static int ge_ltx(int x) { return (sext(x) >= (NEG<< 1)) == 1; } ge_lty(int x)40static int ge_lty(int x) { return (sext(x) >= (NEG<< 3)) == 1; } gt_lt0(int x)41static int gt_lt0(int x) { return (sext(x) > (NEG - 0)) == 1; } gt_lt1(int x)42static int gt_lt1(int x) { return (sext(x) > (NEG - 1)) == 1; } gt_lt2(int x)43static int gt_lt2(int x) { return (sext(x) > (NEG - 2)) == 1; } gt_ltx(int x)44static int gt_ltx(int x) { return (sext(x) > (NEG<< 1)) == 1; } gt_lty(int x)45static int gt_lty(int x) { return (sext(x) > (NEG<< 3)) == 1; } 46 47 /* 48 * check-name: cmp-sext-simm 49 * check-command: test-linearize -Wno-decl $file 50 * 51 * check-output-ignore 52 * check-output-returns: 1 53 */ 54