From: Matthias Braun Date: Sun, 21 Sep 2008 21:05:51 +0000 (+0000) Subject: crafty problem X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=bb834c4f78008dedf8c9872ff4eeeb17e155871c;p=libfirm crafty problem [r22151] --- diff --git a/ir/be/test/codegen/crafty.c b/ir/be/test/codegen/crafty.c new file mode 100644 index 000000000..ffd5def32 --- /dev/null +++ b/ir/be/test/codegen/crafty.c @@ -0,0 +1,22 @@ +int first_ones[256]; + + int FirstOne(unsigned long long arg1) + { + union doub { + unsigned short i[4]; + unsigned long long d; + }; + union doub x; + x.d=arg1; + + if (x.i[3]) + return (first_ones[x.i[3]]); + if (x.i[2]) + return (first_ones[x.i[2]]+16); + if (x.i[1]) + return (first_ones[x.i[1]]+32); + if (x.i[0]) + return (first_ones[x.i[0]]+48); + + return(64); + }