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