From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FsSSS-0007M6-0X for qemu-devel@nongnu.org; Mon, 19 Jun 2006 18:43:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FsSSQ-0007Kw-Cy for qemu-devel@nongnu.org; Mon, 19 Jun 2006 18:42:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FsSSQ-0007Kj-8i for qemu-devel@nongnu.org; Mon, 19 Jun 2006 18:42:58 -0400 Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FsSco-00080K-Im for qemu-devel@nongnu.org; Mon, 19 Jun 2006 18:53:42 -0400 Received: from savannah.gnu.org ([127.0.0.1]) by savannah.gnu.org with esmtp (Exim 3.36 #1 (Debian)) id 1FsSSP-000615-00 for ; Mon, 19 Jun 2006 18:42:57 -0400 Received: from bellard by savannah.gnu.org with local (Exim 4.50) id 1FsSSP-000612-Im for qemu-devel@nongnu.org; Mon, 19 Jun 2006 22:42:57 +0000 Message-Id: From: Fabrice Bellard Date: Mon, 19 Jun 2006 22:42:57 +0000 Subject: [Qemu-devel] qemu/tests test-i386.c Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org CVSROOT: /sources/qemu Module name: qemu Changes by: Fabrice Bellard 06/06/19 22:42:57 Modified files: tests : test-i386.c Log message: fxam test CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/tests/test-i386.c?cvsroot=qemu&r1=1.49&r2=1.50 Patches: Index: test-i386.c =================================================================== RCS file: /sources/qemu/qemu/tests/test-i386.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -b -r1.49 -r1.50 --- test-i386.c 23 Apr 2005 17:54:59 -0000 1.49 +++ test-i386.c 19 Jun 2006 22:42:57 -0000 1.50 @@ -789,6 +789,12 @@ a, b, fpus & FPUS_EMASK, eflags & (CC_Z | CC_P | CC_C)); } fpu_clear_exceptions(); + asm volatile("fxam\n" + "fstsw %%ax\n" + : "=a" (fpus) + : "t" (a)); + printf("fxam(%f)=%04lx\n", a, fpus & 0x4700); + fpu_clear_exceptions(); } void test_fcvt(double a) @@ -958,12 +964,17 @@ test_fcmp(2, 3); test_fcmp(2, q_nan.d); test_fcmp(q_nan.d, -1); + test_fcmp(-1.0/0.0, -1); + test_fcmp(1.0/0.0, -1); test_fcvt(0.5); test_fcvt(-0.5); test_fcvt(1.0/7.0); test_fcvt(-1.0/9.0); test_fcvt(32768); test_fcvt(-1e20); + test_fcvt(-1.0/0.0); + test_fcvt(1.0/0.0); + test_fcvt(q_nan.d); test_fconst(); test_fbcd(1234567890123456); test_fbcd(-123451234567890);