/* * Check that GCC code does the right thing when the movsicc condition depends * on a floating-point comparison (for testing Maverick FPU-generated code). */ lt(double a, double b) { volatile int r = 0; if (a < b) r = 1; return r; } gt(double a, double b) { volatile int r = 0; if (a > b) r = 1; return r; } le(double a, double b) { volatile int r = 0; if (a <= b) r = 1; return r; } ge(double a, double b) { volatile int r = 0; if (a >= b) r = 1; return r; } main() { if (!lt(1.0, 2.0)) abort(); if (!gt(2.0, 1.0)) abort(); if (!le(1.0, 2.0)) abort(); if (!ge(2.0, 1.0)) abort(); if (!le(1.0, 1.0)) abort(); if (!ge(2.0, 2.0)) abort(); exit(0); }