removed some #if 0
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 17 Oct 2006 09:06:35 +0000 (09:06 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 17 Oct 2006 09:06:35 +0000 (09:06 +0000)
ir/be/test/ll.c

index 9c7e334..6d0254a 100644 (file)
@@ -3,7 +3,7 @@
 
 typedef long long int ll_t;
 
 
 typedef long long int ll_t;
 
-#ifndef _WIN32
+#ifdef __GNUC__
 ll_t mul_ll(ll_t a, ll_t b) __attribute__((noinline));
 ll_t shl_ll(ll_t a, ll_t b) __attribute__((noinline));
 ll_t shr_ll(ll_t a, ll_t b) __attribute__((noinline));
 ll_t mul_ll(ll_t a, ll_t b) __attribute__((noinline));
 ll_t shl_ll(ll_t a, ll_t b) __attribute__((noinline));
 ll_t shr_ll(ll_t a, ll_t b) __attribute__((noinline));
@@ -36,7 +36,6 @@ ll_t sub_ll(ll_t a, ll_t b) {
        return a - b;
 }
 
        return a - b;
 }
 
-#if 0
 ll_t div_ll(ll_t a, ll_t b) {
        return a / b;
 }
 ll_t div_ll(ll_t a, ll_t b) {
        return a / b;
 }
@@ -48,7 +47,6 @@ ll_t mod_ll(ll_t a, ll_t b) {
 ll_t divmod_ll(ll_t a, ll_t b) {
        return (a / b) + (a % b);
 }
 ll_t divmod_ll(ll_t a, ll_t b) {
        return (a / b) + (a % b);
 }
-#endif
 
 ll_t neg_ll(ll_t a) {
        return -a;
 
 ll_t neg_ll(ll_t a) {
        return -a;
@@ -77,19 +75,16 @@ int main(void) {
        printf("%lld * %lld  = %lld\n", a, b, mul_ll(a, b));
        printf("%lld + %lld  = %lld\n", a, b, add_ll(a, b));
        printf("%lld - %lld  = %lld\n", a, b, sub_ll(a, b));
        printf("%lld * %lld  = %lld\n", a, b, mul_ll(a, b));
        printf("%lld + %lld  = %lld\n", a, b, add_ll(a, b));
        printf("%lld - %lld  = %lld\n", a, b, sub_ll(a, b));
-#if 0
-       printf("%lld / %lld  = %lld\n", a, b, div_ll(a, b));
-       printf("%lld % %lld  = %lld\n", a, b, mod_ll(a, b));
-       printf("%lld / + % %lld  = %lld\n", a, b, divmod_ll(a, b));
-#endif
-       printf("%lld << %lld = %lld\n", a, 2, shl_ll(a, 2));
-       printf("%lld >> %lld = %lld\n", a, 2, shr_ll(a, 2));
+       printf("%lld / %lld  = %lld\n", b, a, div_ll(b, a));
+       printf("%lld %% %lld  = %lld\n", b, a, mod_ll(b, a));
+       printf("%lld / + %% %lld  = %lld\n", b, a, divmod_ll(b, a));
+       printf("%lld << %d = %lld\n", a, 2, shl_ll(a, 2));
+       printf("%lld >> %d = %lld\n", a, 2, shr_ll(a, 2));
        printf("abs(%lld)    = %lld\n", c, abs_ll(c));
        printf("neg(%lld)    = %lld\n", b, neg_ll(b));
 #if 0
        printf("conv(%lld)   = %lf\n",  c, conv_ll_d(c));
        printf("conv(%lf)    = %lld\n", d, conv_d_ll(d));
 #endif
        printf("abs(%lld)    = %lld\n", c, abs_ll(c));
        printf("neg(%lld)    = %lld\n", b, neg_ll(b));
 #if 0
        printf("conv(%lld)   = %lf\n",  c, conv_ll_d(c));
        printf("conv(%lf)    = %lld\n", d, conv_d_ll(d));
 #endif
-
        return 0;
 }
        return 0;
 }