You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(23) |
2
(40) |
3
(17) |
4
(10) |
|
5
(14) |
6
(41) |
7
(26) |
8
(23) |
9
(15) |
10
(25) |
11
(14) |
|
12
(23) |
13
(11) |
14
(18) |
15
(21) |
16
(18) |
17
(8) |
18
(14) |
|
19
(16) |
20
(15) |
21
(12) |
22
(11) |
23
(8) |
24
(11) |
25
(12) |
|
26
(9) |
27
(17) |
28
(31) |
29
(16) |
30
(10) |
31
(17) |
|
|
From: Bart V. A. <bar...@gm...> - 2006-03-07 19:31:18
|
On 3/5/06, Julian Seward <js...@ac...> wrote: > > So the short answer is: I'd like to be informed about every event that > > imposes an ordering of events between threads. The DIOTA tool instrumen= ts > > the following calls: > > - pthread_create(), pthread_join(), pthread_exit(). > > - pthread_mutex_lock(), pthread_mutex_unlock(), pthread_mutex_trylock()= . > > - pthread_cond_wait(), pthread_cond_timedwait(). > > - sem_wait(), sem_post(), sem_trywait(). > > - pthread_barrier_wait(). > > > > The following are IMHO also interesting: > > - pthread_rwlock_rdlock(), pthread_rwlock_tryrdlock(), > > pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), > > pthread_rwlock_wrlock(). > > - pthread_spin_lock(), pthread_spin_trylock(), pthread_spin_unlock(). > > > > Is it possible to send notifications for all these functions ? > > In principle yes. As per my earlier posting you should be able to hack > up wrappers and notifications for any of them yourself; however I > think it would be good to get the thing to work well enough so we can > evaluate it with just the basics (lock, unlock, create, join). OK, as soon as I have the time I will work on the wrappers and try to get the drd tool working with mutex locking, unlocking and with thread creation / termination. |
|
From: John S. <joh...@ya...> - 2006-03-07 17:36:29
|
Hi, I have been trying to run my code under valgrind for memory leaks. Have been cross compiling on Red Hat Linux with Monta Vista to cross compile for ppc32 target. However I am getting the following error: WARNING: unhandled syscallL 72 You may be able to write your own handler. Read the file README_MISSING_SYSCALL_OR_IOCTL Tried to read the above file and implement on my own, but got lost on the way. Can anyone help? Thanks, John --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. |
|
From: Bart V. A. <bar...@gm...> - 2006-03-07 17:04:04
|
Hello Nicholas, The reason why I want to develop a new data race detector is that helgrind (at least in the tests I performed) reports false positives. This is because helgrind uses an Eraser-style algorithm. There exist algorithms that do not produce false positives -- see e.g. http://escher.elis.ugent.be/publ/Edocs/DOC/P104_116.pdf On 3/7/06, Nicholas Nethercote <nj...@cs...> wrote: > On Mon, 6 Mar 2006, Bart Van Assche wrote: > > > As far as I know there is currently one thread-related event that > > is tracked by valgrind, and that is track_post_thread_create. I found > > the following statement in file coregrind/m_syswrap/thread_wrapper(): > > VG_TRACK ( post_thread_create, tst->os_state.parent, tid ); > > That sounds right. There was post_mutex_lock and others but they're > currently not working. > > > I'm sorry to say but none of both approaches is sufficient. The > > problem is that there exist functions like pthread_cond_wait(). The > > drd tool has to be notified both after pthread_cond_wait() unlocks its > > mutex and after pthread_cond_wait() locked its mutex again. I think > > the only way to implement this properly is via a thread model. > > Perhaps I missed some email about this -- this tool is a data-race detect= or, > right? How is it different to Helgrind? |
|
From: Geoff S. <gs...@us...> - 2006-03-07 14:32:46
|
On the "semantics for G" -- The purpose of "G" is to inform a post-processing tool that there are instructions executed but not shown. The reason we added it is to tell the pipeline analyzer (our home-grown tool that uses this input) that the instruction following "G" does not literally follow the instruction before it. The tool can flush the pipeline model so you don't get misleading data. The point of "I" vs. "J" records was to keep the size of a trace down. Originally, we always collected traces of the entire execution; now that we can do calltrees, this is probably a less urgent need. The same reason why we just output the data in "R" and "W", not the size, too. The format should be simple enough that Perl should be able to handle it -- even awk can do it. I tried to explain the records in http://sourceforge.net/mailarchive/message.php?msg_id=14916512 |
|
From: Paul M. <pa...@sa...> - 2006-03-07 12:03:59
|
Tom Hughes writes:
> In message <200...@fr...>
> Duncan Sands <bal...@fr...> wrote:
>
> > indeed. By the way, only x86 seems to have this bit of logic:
> >
> > if (ARG1 & VKI_CLONE_SETTLS) {
> > PRE_MEM_READ("clone(tls_user_desc)", ARG4, sizeof(vki_modify_ldt_t));
> > if (!VG_(am_is_valid_for_client)(ARG4, sizeof(vki_modify_ldt_t),
> > VKI_PROT_READ)) {
> > SET_STATUS_Failure( VKI_EFAULT );
> > return;
> > }
> > }
> >
> > Do you know why - is newtls unused on other platforms? (I will have
> > a look at the kernel source to find out, but I thought you might know).
>
> Possibly - the way TLS data works is certainly different on amd64. No
> idea how the PPC platforms handle it.
If I recall correctly, the CLONE_SETTLS flag just causes the kernel to
set the thread pointer register (r2 for 32-bit, r13 for 64-bit) for
the new task to the tls argument. That is, the tls argument doesn't
point to a structure in memory, it's just a value. (Probably Valgrind
should transfer the definedness of the argument to the target r2/r13.)
Paul.
|
|
From: Tom H. <to...@co...> - 2006-03-07 11:10:43
|
In message <200...@fr...>
Duncan Sands <bal...@fr...> wrote:
> indeed. By the way, only x86 seems to have this bit of logic:
>
> if (ARG1 & VKI_CLONE_SETTLS) {
> PRE_MEM_READ("clone(tls_user_desc)", ARG4, sizeof(vki_modify_ldt_t));
> if (!VG_(am_is_valid_for_client)(ARG4, sizeof(vki_modify_ldt_t),
> VKI_PROT_READ)) {
> SET_STATUS_Failure( VKI_EFAULT );
> return;
> }
> }
>
> Do you know why - is newtls unused on other platforms? (I will have
> a look at the kernel source to find out, but I thought you might know).
Possibly - the way TLS data works is certainly different on amd64. No
idea how the PPC platforms handle it.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: <sv...@va...> - 2006-03-07 11:06:52
|
Author: sewardj
Date: 2006-03-07 11:06:49 +0000 (Tue, 07 Mar 2006)
New Revision: 5721
Log:
First attempt at release notes for 3.1.1.
Modified:
branches/VALGRIND_3_1_BRANCH/NEWS
Modified: branches/VALGRIND_3_1_BRANCH/NEWS
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/NEWS 2006-03-07 10:50:05 UTC (rev 5720)
+++ branches/VALGRIND_3_1_BRANCH/NEWS 2006-03-07 11:06:49 UTC (rev 5721)
@@ -1,4 +1,54 @@
=20
+Release 3.1.1 (11 March 2006)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+3.1.1 fixes a bunch of bugs reported in 3.1.0. There is no new
+functionality. The fixed bugs are:
+
+(note: "n-i-bz" means "not in bugzilla" -- this bug does not have
+ a bugzilla entry).
+
+n-i-bz ppc32: fsub 3,3,3 in dispatcher doesn't clear NaNs
+n-i-bz ppc32: __NR_{set,get}priority
+117332 x86: missing line info with icc 8.1
+117366 amd64: 0xDD 0x7C fnstsw
+=3D=3D 118274
+117367 amd64: 0xD9 0xF4 fxtract
+117369 amd64: __NR_getpriority (140)
+117419 ppc32: lfsu f5, -4(r11)
+117419 ppc32: fsqrt
+117936 more stabs problems (segfaults while reading debug info)
+=3D=3D119914
+=3D=3D120345
+118239 amd64: 0xF 0xAE 0x3F (clflush)
+118939 vm86old system call
+n-i-bz memcheck/tests/mempool reads freed memory
+n-i-bz AshleyP's custom-allocator assertion
+n-i-bz Dirk strict-aliasing stuff
+n-i-bz More space for debugger cmd line (Dan Thaler)
+n-i-bz Clarified leak checker output message
+n-i-bz AshleyP's --gen-suppressions output fix
+n-i-bz cg_annotate's --sort option broken
+n-i-bz OSet 64-bit fastcmp bug
+n-i-bz VG_(getgroups) fix (Shinichi Noda)
+n-i-bz ppc32: allocate from callee-saved FP/VMX regs
+n-i-bz misaligned path word-size bug in mc_main.c
+120410 x86: prefetchw (0xF 0xD 0x48 0x4)
+120728 TIOCSERGETLSR, TIOCGICOUNT, HDIO_GET_DMA ioctls
+120658 Build fixes for gcc 2.96
+120734 x86: Support for changing EIP in signal handler
+n-i-bz memcheck/tests/zeropage de-looping fix
+n-i-bz x86: fxtract doesn't work reliably
+121662 x86: lock xadd (0xF0 0xF 0xC0 0x2)
+121893 calloc does not always zeroed memory
+121901 no support for syscall tkill
+n-i-bz Suppression update for Debian unstable
+122067 amd64: fcmovnu (0xDB 0xD9)
+n-i-bz ppc32: broken signal handling cpu feature detection
+n-i-bz ppc32: rounding mode problems (improved, partial fix only)
+119482 ppc32: mtfsb1
+n-i-bz ppc32: mtocrf/mfocrf
+
+
Release 3.1.0 (25 November 2005)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.1.0 is a feature release with a number of significant improvements:
|
|
From: Duncan S. <bal...@fr...> - 2006-03-07 11:00:11
|
Hi Tom,
> > I see he chose to use PRRAn; I was planning to introduce a more
> > descriptive name. Besides that, it looks good at first glance.
>
> If you are playing with the clone argument checking, be very
> careful about cutting and pasting from one platform to another
> as the arguments are in different orders on different platforms...
indeed. By the way, only x86 seems to have this bit of logic:
if (ARG1 & VKI_CLONE_SETTLS) {
PRE_MEM_READ("clone(tls_user_desc)", ARG4, sizeof(vki_modify_ldt_t));
if (!VG_(am_is_valid_for_client)(ARG4, sizeof(vki_modify_ldt_t),
VKI_PROT_READ)) {
SET_STATUS_Failure( VKI_EFAULT );
return;
}
}
Do you know why - is newtls unused on other platforms? (I will have
a look at the kernel source to find out, but I thought you might know).
Ciao,
Duncan.
|
|
From: <sv...@va...> - 2006-03-07 10:50:14
|
Author: sewardj Date: 2006-03-07 10:50:05 +0000 (Tue, 07 Mar 2006) New Revision: 5720 Log: Bump document versions. Modified: branches/VALGRIND_3_1_BRANCH/docs/xml/vg-entities.xml Modified: branches/VALGRIND_3_1_BRANCH/docs/xml/vg-entities.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/VALGRIND_3_1_BRANCH/docs/xml/vg-entities.xml 2006-03-07 10:3= 8:47 UTC (rev 5719) +++ branches/VALGRIND_3_1_BRANCH/docs/xml/vg-entities.xml 2006-03-07 10:5= 0:05 UTC (rev 5720) @@ -2,12 +2,12 @@ <!ENTITY vg-url "http://www.valgrind.org"> <!ENTITY vg-jemail "ju...@va..."> <!ENTITY vg-vemail "val...@va..."> -<!ENTITY vg-lifespan "2000-2005"> +<!ENTITY vg-lifespan "2000-2006"> <!ENTITY vg-users-list "http://lists.sourceforge.net/lists/listinfo/valg= rind-users"> <!ENTITY vg-developers "http://www.valgrind.org/info/developers.html"> =20 <!-- valgrind release + version stuff --> <!ENTITY rel-type "Release"> -<!ENTITY rel-version "3.1.0"> -<!ENTITY rel-date "November 25 2005"> +<!ENTITY rel-version "3.1.1"> +<!ENTITY rel-date "March 11 2006"> =20 |
|
From: <sv...@va...> - 2006-03-07 10:38:52
|
Author: sewardj
Date: 2006-03-07 10:38:47 +0000 (Tue, 07 Mar 2006)
New Revision: 5719
Log:
Merge r5505 (Make this test 64-bit clean.)
Modified:
branches/VALGRIND_3_1_BRANCH/memcheck/tests/oset_test.c
Modified: branches/VALGRIND_3_1_BRANCH/memcheck/tests/oset_test.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/memcheck/tests/oset_test.c 2006-03-07 01=
:49:54 UTC (rev 5718)
+++ branches/VALGRIND_3_1_BRANCH/memcheck/tests/oset_test.c 2006-03-07 10=
:38:47 UTC (rev 5719)
@@ -34,31 +34,32 @@
#define NN 1000 // Size of OSets being created
=20
//----------------------------------------------------------------------=
-----
-// Int example
+// Word example
//----------------------------------------------------------------------=
-----
=20
-// This example shows that an element can be a single value (in this cas=
e an
-// Int), in which case the element is also the key.
+// This example shows that an element can be a single value (in this
+// case a Word), in which case the element is also the key.
=20
__attribute__((unused))
-static Char *intToStr(void *p)
+static Char *wordToStr(void *p)
{
- static char buf[16];
- sprintf(buf, "%d", *(Int*)p);
+ static char buf[32];
+ sprintf(buf, "%ld", *(Word*)p);
return buf;
}
=20
__attribute__((unused))
-static Int intCmp(void* vkey, void* velem)
+static Word wordCmp(void* vkey, void* velem)
{
- return *(Int*)vkey - *(Int*)velem;
+ return *(Word*)vkey - *(Word*)velem;
}
=20
void example1(void)
{
- Int i, v, n, prev;
- Int* vs[NN];
- Int *pv;
+ Int i, n;
+ Word v, prev;
+ Word* vs[NN];
+ Word *pv;
=20
// Create a static OSet of Ints. This one uses fast (built-in)
// comparisons.
@@ -76,15 +77,15 @@
// Create some elements, with gaps (they're all even) but no dups,
// and shuffle them randomly.
for (i =3D 0; i < NN; i++) {
- vs[i] =3D VG_(OSet_AllocNode)(oset1, sizeof(Int));
+ vs[i] =3D VG_(OSet_AllocNode)(oset1, sizeof(Word));
*(vs[i]) =3D 2*i;
}
for (i =3D 0; i < NN; i++) {
- Int r1 =3D random() % NN;
- Int r2 =3D random() % NN;
- Int* tmp=3D vs[r1];
- vs[r1] =3D vs[r2];
- vs[r2] =3D tmp;
+ Word r1 =3D random() % NN;
+ Word r2 =3D random() % NN;
+ Word* tmp=3D vs[r1];
+ vs[r1] =3D vs[r2];
+ vs[r2] =3D tmp;
}
=20
// Insert the elements
@@ -124,7 +125,7 @@
prev =3D -1;
VG_(OSet_ResetIter)(oset1);
while ( (pv =3D VG_(OSet_Next)(oset1)) ) {
- Int curr =3D *pv;
+ Word curr =3D *pv;
assert(prev < curr);=20
prev =3D curr;
n++;
@@ -179,7 +180,7 @@
}
=20
// Print the list
- OSet_Print(oset1, "foo", intToStr);
+ OSet_Print(oset1, "foo", wordToStr);
=20
// Destroy the OSet
VG_(OSet_Destroy)(oset1);
|
|
From: <js...@ac...> - 2006-03-07 10:29:43
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-03-07 02:00:01 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 193 tests, 11 stderr failures, 5 stdout failures ================= memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/stack_changes (stdout) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <js...@ac...> - 2006-03-07 05:26:09
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-03-07 03:30:01 GMT Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 224 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 223 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 7 03:49:33 2006 --- new.short Tue Mar 7 04:09:45 2006 *************** *** 10,12 **** ! == 223 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) --- 10,12 ---- ! == 224 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) |
|
From: Tom H. <to...@co...> - 2006-03-07 03:43:45
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2006-03-07 03:30:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 226 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 225 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 7 03:37:02 2006 --- new.short Tue Mar 7 03:43:40 2006 *************** *** 8,11 **** ! == 225 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) --- 8,12 ---- ! == 226 tests, 8 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) + memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) |
|
From: <js...@ac...> - 2006-03-07 03:43:45
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2006-03-07 04:40:01 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... failed Last 20 lines of verbose log follow echo mpiwrap.c: In function `walk_type': mpiwrap.c:351: warning: cast to pointer from integer of different size mpiwrap.c: In function `_vgwZU_libmpiZdsoZa_PMPI_Send': mpiwrap.c:614: warning: implicit declaration of function `CALL_FN_W_6W' mpiwrap.c: In function `_vgwZU_libmpiZdsoZa_PMPI_Recv': mpiwrap.c:639: warning: implicit declaration of function `CALL_FN_W_7W' mpiwrap.c: In function `_vgwZU_libmpiZdsoZa_PMPI_Waitall': mpiwrap.c:942: warning: implicit declaration of function `CALL_FN_W_WWW' mpiwrap.c: In function `_vgwZU_libmpiZdsoZa_PMPI_Iprobe': mpiwrap.c:981: warning: implicit declaration of function `CALL_FN_W_5W' mpiwrap.c: In function `_vgwZU_libmpiZdsoZa_PMPI_Sendrecv': mpiwrap.c:1022: warning: implicit declaration of function `CALL_FN_W_12W' mpiwrap.c: In function `_vgwZU_libmpiZdsoZa_PMPI_Gather': mpiwrap.c:1116: warning: implicit declaration of function `CALL_FN_W_8W' mpicc: No such file or directory make[2]: *** [libmpiwrap.so] Error 1 make[2]: Leaving directory `/home/sewardj/Nightly/valgrind/auxprogs' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/sewardj/Nightly/valgrind' make: *** [all] Error 2 |
|
From: Tom H. <th...@cy...> - 2006-03-07 03:32:57
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2006-03-07 03:15:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 225 tests, 21 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/mempool (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) memcheck/tests/xml1 (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 224 tests, 21 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/mempool (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) memcheck/tests/xml1 (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 7 03:24:46 2006 --- new.short Tue Mar 7 03:32:46 2006 *************** *** 8,10 **** ! == 224 tests, 21 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 225 tests, 21 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) |
|
From: Tom H. <th...@cy...> - 2006-03-07 03:27:07
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2006-03-07 03:00:03 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 248 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 245 tests, 7 stderr failures, 2 stdout failures ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/tls (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 7 03:16:57 2006 --- new.short Tue Mar 7 03:26:57 2006 *************** *** 8,10 **** ! == 245 tests, 7 stderr failures, 2 stdout failures ================= memcheck/tests/stack_switch (stderr) --- 8,10 ---- ! == 248 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) *************** *** 15,17 **** none/tests/fdleak_fcntl (stderr) - none/tests/tls (stdout) none/tests/x86/faultstatus (stderr) --- 15,16 ---- |
|
From: Tom H. <th...@cy...> - 2006-03-07 03:26:01
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2006-03-07 03:10:10 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 248 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 245 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 7 03:18:55 2006 --- new.short Tue Mar 7 03:25:49 2006 *************** *** 8,10 **** ! == 245 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 248 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/pointer-trace (stderr) |
|
From: Tom H. <th...@cy...> - 2006-03-07 03:22:55
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2006-03-07 03:05:14 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 248 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 245 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 7 03:15:06 2006 --- new.short Tue Mar 7 03:22:42 2006 *************** *** 8,10 **** ! == 245 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) --- 8,10 ---- ! == 248 tests, 6 stderr failures, 1 stdout failure ================= memcheck/tests/stack_switch (stderr) |
|
From: Julian S. <js...@ac...> - 2006-03-07 02:03:06
|
I'd like to release 3.1.1 some time around Friday, if possible. Many bug fixes have been merged in now and I'm hoping to be in a code freeze state soon. A good summary of the bugs that have been fixed are in trunk/docs/internals/3_1_BUGSTATUS.txt. If you're a packager, or you want to check that 3.1.1 fixes your showstopping bug in 3.1.0, now would be a good time to check out the 3.1.X line and test it: svn co svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_1_BRANCH \ branch31 cd branch31 ./autogen.sh # then configure and build as usual Let me know of any critical breakage ASAP. J |
|
From: <sv...@va...> - 2006-03-07 01:49:58
|
Author: sewardj
Date: 2006-03-07 01:49:54 +0000 (Tue, 07 Mar 2006)
New Revision: 5718
Log:
Update.
Modified:
trunk/docs/internals/3_1_BUGSTATUS.txt
Modified: trunk/docs/internals/3_1_BUGSTATUS.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/internals/3_1_BUGSTATUS.txt 2006-03-07 01:41:59 UTC (rev 5=
717)
+++ trunk/docs/internals/3_1_BUGSTATUS.txt 2006-03-07 01:49:54 UTC (rev 5=
718)
@@ -11,9 +11,9 @@
v5384 wontfix 117096 Weird errors when --log-fd=3D has invalid v=
alue
v5470 v5479 117332 missing line info with icc 8.1 (x86)
pending pending 117362 partially defined equality
-pending pending 117366 amd64: 0xDD 0x7C fnstsw
+vx1591 vx1592 117366 amd64: 0xDD 0x7C fnstsw
=3D=3D 118274
-pending pending 117367 amd64: 0xD9 0xF4 fxtract
+vx1593 vx1594 117367 amd64: 0xD9 0xF4 fxtract
v5256 v5260 117369 amd64: __NR_getpriority (140)
vx1482 vx1514 117419 ppc32: lfsu f5, -4(r11)
vx1492 vx1515 117419 ppc32: fsqrt
@@ -23,7 +23,7 @@
=3D=3D119914
=3D=3D120345
pending pending 118118 SIGBUS in disInstr_AMD64 after long run
-vx1533 pending 118239 amd64: 0xF 0xAE 0x3F (clflush)
+vx1533 vx1590 118239 amd64: 0xF 0xAE 0x3F (clflush)
pending pending 118466 add %r,%r mishandled by memcheck
v5635 v5672 118939 vm86old system call
many wontfix n-i-bz VALGRIND_COUNT_LEAKS arg types (Olly Betts)
@@ -40,24 +40,24 @@
vx1519 vx1578 n-i-bz ppc32/64: allocate from callee-saved FP/VMX=
regs
v5500 v5674 n-i-bz misaligned path word-size bug in mc_main.c
vx1521/2 pending 119297 Incorrect error message for sse code
-pending pending 120410 x86: prefetchw (0xF 0xD 0x48 0x4)
+vx1585 vx1586 120410 x86: prefetchw (0xF 0xD 0x48 0x4)
v5633 v5675 120728 TIOCSERGETLSR, TIOCGICOUNT, HDIO_GET_DMA io=
ctls
-vx1419 pending 120658 Build fixes for gcc 2.96
+vx1419 vx1581 120658 Build fixes for gcc 2.96
v5593 wontfix 120658 Pass -Wdeclaration-after-statement to VEX b=
uild
pending pending 120732 Generating trapno for sigcontext (x86)
v5641 v5676 120734 Support for changing EIP in signal handler =
(x86)
v5616 v5677 n-i-bz memcheck/tests/zeropage de-looping fix
-vx1569 pending n-i-bz x86 fxtract doesn't work reliably
+vx1569 vx1582 n-i-bz x86 fxtract doesn't work reliably
probably-wontfix 121029 std::pow returns different float values
pending pending 121617 Assertion 'sizeof(*regs) =3D=3D sizeof(prs-=
>pr_reg)
-pending pending 121662 x86: lock xadd (0xF0 0xF 0xC0 0x2)
+vx1583 vx1584 121662 x86: lock xadd (0xF0 0xF 0xC0 0x2)
v5647 v5678 121893 calloc does not always zero memory
pending pending n-i-bz XML output truncated (users, Jan 26 09:08:3=
4 2006)
pending pending 121896 ESP modification in ucontext from signal ha=
ndlers
(closed INVALID)
v5651 v5679 121901 no support for syscall tkill
v5700 v5701 n-i-bz Suppression update for Debian unstable
-pending pending 122067 amd64: fcmovnu (0xDB 0xD9)
+vx1587 vx1589 122067 amd64: fcmovnu (0xDB 0xD9)
=20
(next 4 are ppc32-specific FP problems)
v5662 v5703 n-i-bz broken signal handling in ppc32/64 cpuid-in=
g
|
|
From: <sv...@va...> - 2006-03-07 01:42:04
|
Author: sewardj
Date: 2006-03-07 01:41:59 +0000 (Tue, 07 Mar 2006)
New Revision: 5717
Log:
Merge amd64 'fxtract' test from trunk.
Added:
branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.c
branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stderr.exp
branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stdout.exp
branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.vgtest
Modified:
branches/VALGRIND_3_1_BRANCH/none/tests/amd64/Makefile.am
Modified: branches/VALGRIND_3_1_BRANCH/none/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/none/tests/amd64/Makefile.am 2006-03-07 =
01:17:12 UTC (rev 5716)
+++ branches/VALGRIND_3_1_BRANCH/none/tests/amd64/Makefile.am 2006-03-07 =
01:41:59 UTC (rev 5717)
@@ -6,6 +6,7 @@
=20
EXTRA_DIST =3D $(noinst_SCRIPTS) \
faultstatus.vgtest faultstatus.stderr.exp \
+ fxtract.vgtest fxtract.stderr.exp fxtract.stdout.exp \
$(addsuffix .stderr.exp,$(INSN_TESTS)) \
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
$(addsuffix .vgtest,$(INSN_TESTS)) \
@@ -16,7 +17,7 @@
=20
=20
check_PROGRAMS =3D \
- faultstatus $(INSN_TESTS) looper jrcxz smc1 shrld
+ faultstatus fxtract $(INSN_TESTS) looper jrcxz smc1 shrld
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
AM_CXXFLAGS =3D $(AM_CFLAGS)
@@ -32,6 +33,7 @@
insn_sse2_LDADD =3D -lm
insn_fpu_SOURCES =3D insn_fpu.def
insn_fpu_LDADD =3D -lm
+fxtract_LDADD =3D -lm
=20
.def.c: $(srcdir)/gen_insn_test.pl
$(PERL) $(srcdir)/gen_insn_test.pl < $< > $@
Copied: branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.c (from rev=
5716, trunk/none/tests/amd64/fxtract.c)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.c =
(rev 0)
+++ branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.c 2006-03-07 01=
:41:59 UTC (rev 5717)
@@ -0,0 +1,99 @@
+
+#include <stdio.h>
+#include <math.h>
+
+double arg, res1, res2;
+
+extern void do_fxtract ( void );
+asm("\n"
+".global do_fxtract\n"
+"do_fxtract:\n"
+"\tfinit\n"
+"\tfldl arg\n"
+"\tfxtract\n"
+"\tfstpl res1\n"
+"\tfstpl res2\n"
+"\tret"
+);
+
+void try ( double x )
+{
+ arg =3D x * 1.414213562373049;
+ res1 =3D res2 =3D 0.0;
+ do_fxtract();
+ printf("%17.10e -> %14.10f %14.10f\n", arg, res1, res2);
+}
+
+int main ( void )
+{
+ int i;
+
+ /* positives */
+
+ for (i =3D 0; i < 40; i++)
+ try( 1.27 + (double)(i*10 - 200) );
+
+ try(+0.0);
+ try(1.0 / 0.0);
+ try(sqrt(-1.0));
+
+ try(5.1e-308);
+ try(4.1e-308);
+ try(3.1e-308);
+ try(2.1e-308);
+ try(1.1e-308);
+ try(0.9e-308);
+ try(0.7e-308);
+ try(0.6e-308);
+ try(0.5e-308);
+ try(0.4e-308);
+ try(0.3e-308);
+ try(0.1e-308);
+
+ try(1.3e-320);
+ try(1.3e-321);
+ try(1.3e-322);
+ try(1.3e-323);
+ try(0.9e-323);
+ try(0.7e-323);
+ try(0.5e-323);
+ try(0.3e-323);
+ try(0.2e-323);
+ try(1.3e-324);
+
+ /* negatives */
+
+ printf("\n");
+ for (i =3D 0; i < 40; i++)
+ try( - (1.27 + (double)(i*10 - 200)) );
+
+ try(-0.0);
+ try(-(1.0 / 0.0));
+ try(-sqrt(-1.0));
+
+ try(-5.1e-308);
+ try(-4.1e-308);
+ try(-3.1e-308);
+ try(-2.1e-308);
+ try(-1.1e-308);
+ try(-0.9e-308);
+ try(-0.7e-308);
+ try(-0.6e-308);
+ try(-0.5e-308);
+ try(-0.4e-308);
+ try(-0.3e-308);
+ try(-0.1e-308);
+
+ try(-1.3e-320);
+ try(-1.3e-321);
+ try(-1.3e-322);
+ try(-1.3e-323);
+ try(-0.9e-323);
+ try(-0.7e-323);
+ try(-0.5e-323);
+ try(-0.3e-323);
+ try(-0.2e-323);
+ try(-1.3e-324);
+
+ return 0;
+}
Copied: branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stderr.exp =
(from rev 5716, trunk/none/tests/amd64/fxtract.stderr.exp)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stderr.exp =
(rev 0)
+++ branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stderr.exp 2006=
-03-07 01:41:59 UTC (rev 5717)
@@ -0,0 +1,2 @@
+
+
Copied: branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stdout.exp =
(from rev 5716, trunk/none/tests/amd64/fxtract.stdout.exp)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stdout.exp =
(rev 0)
+++ branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.stdout.exp 2006=
-03-07 01:41:59 UTC (rev 5717)
@@ -0,0 +1,131 @@
+-2.8104666125e+02 -> -1.0978385205 8.0000000000
+-2.6690452563e+02 -> -1.0425958032 8.0000000000
+-2.5276239000e+02 -> -1.9747061719 7.0000000000
+-2.3862025438e+02 -> -1.8642207373 7.0000000000
+-2.2447811876e+02 -> -1.7537353028 7.0000000000
+-2.1033598313e+02 -> -1.6432498682 7.0000000000
+-1.9619384751e+02 -> -1.5327644337 7.0000000000
+-1.8205171188e+02 -> -1.4222789991 7.0000000000
+-1.6790957626e+02 -> -1.3117935645 7.0000000000
+-1.5376744064e+02 -> -1.2013081300 7.0000000000
+-1.3962530501e+02 -> -1.0908226954 7.0000000000
+-1.2548316939e+02 -> -1.9606745217 6.0000000000
+-1.1134103377e+02 -> -1.7397036526 6.0000000000
+-9.7198898142e+01 -> -1.5187327835 6.0000000000
+-8.3056762518e+01 -> -1.2977619143 6.0000000000
+-6.8914626894e+01 -> -1.0767910452 6.0000000000
+-5.4772491271e+01 -> -1.7116403522 5.0000000000
+-4.0630355647e+01 -> -1.2696986140 5.0000000000
+-2.6488220023e+01 -> -1.6555137515 4.0000000000
+-1.2346084400e+01 -> -1.5432605499 3.0000000000
+ 1.7960512242e+00 -> 1.7960512242 0.0000000000
+ 1.5938186848e+01 -> 1.9922733560 3.0000000000
+ 3.0080322472e+01 -> 1.8800201545 4.0000000000
+ 4.4222458095e+01 -> 1.3819518155 5.0000000000
+ 5.8364593719e+01 -> 1.8238935537 5.0000000000
+ 7.2506729343e+01 -> 1.1329176460 6.0000000000
+ 8.6648864967e+01 -> 1.3538885151 6.0000000000
+ 1.0079100059e+02 -> 1.5748593842 6.0000000000
+ 1.1493313621e+02 -> 1.7958302533 6.0000000000
+ 1.2907527184e+02 -> 1.0084005612 7.0000000000
+ 1.4321740746e+02 -> 1.1188859958 7.0000000000
+ 1.5735954309e+02 -> 1.2293714304 7.0000000000
+ 1.7150167871e+02 -> 1.3398568649 7.0000000000
+ 1.8564381433e+02 -> 1.4503422995 7.0000000000
+ 1.9978594996e+02 -> 1.5608277340 7.0000000000
+ 2.1392808558e+02 -> 1.6713131686 7.0000000000
+ 2.2807022120e+02 -> 1.7817986032 7.0000000000
+ 2.4221235683e+02 -> 1.8922840377 7.0000000000
+ 2.5635449245e+02 -> 1.0013847361 8.0000000000
+ 2.7049662808e+02 -> 1.0566274534 8.0000000000
+ 0.0000000000e+00 -> 0.0000000000 -inf
+ inf -> inf inf
+ nan -> nan nan
+7.2124891681e-308 -> 1.6207302828 -1021.0000000000
+5.7982756057e-308 -> 1.3029400313 -1021.0000000000
+4.3840620434e-308 -> 1.9702995595 -1022.0000000000
+2.9698484810e-308 -> 1.3347190565 -1022.0000000000
+1.5556349186e-308 -> 1.3982771068 -1023.0000000000
+1.2727922061e-308 -> 1.1440449055 -1023.0000000000
+9.8994949366e-309 -> 1.7796254086 -1024.0000000000
+8.4852813742e-309 -> 1.5253932074 -1024.0000000000
+7.0710678119e-309 -> 1.2711610062 -1024.0000000000
+5.6568542495e-309 -> 1.0169288049 -1024.0000000000
+4.2426406871e-309 -> 1.5253932074 -1025.0000000000
+1.4142135624e-309 -> 1.0169288049 -1026.0000000000
+1.8384182682e-320 -> 1.8168945312 -1063.0000000000
+1.8379242025e-321 -> 1.4531250000 -1066.0000000000
+1.8280428896e-322 -> 1.1562500000 -1069.0000000000
+1.9762625834e-323 -> 1.0000000000 -1072.0000000000
+1.4821969375e-323 -> 1.5000000000 -1073.0000000000
+4.9406564584e-324 -> 1.0000000000 -1074.0000000000
+4.9406564584e-324 -> 1.0000000000 -1074.0000000000
+4.9406564584e-324 -> 1.0000000000 -1074.0000000000
+ 0.0000000000e+00 -> 0.0000000000 -inf
+ 0.0000000000e+00 -> 0.0000000000 -inf
+
+ 2.8104666125e+02 -> 1.0978385205 8.0000000000
+ 2.6690452563e+02 -> 1.0425958032 8.0000000000
+ 2.5276239000e+02 -> 1.9747061719 7.0000000000
+ 2.3862025438e+02 -> 1.8642207373 7.0000000000
+ 2.2447811876e+02 -> 1.7537353028 7.0000000000
+ 2.1033598313e+02 -> 1.6432498682 7.0000000000
+ 1.9619384751e+02 -> 1.5327644337 7.0000000000
+ 1.8205171188e+02 -> 1.4222789991 7.0000000000
+ 1.6790957626e+02 -> 1.3117935645 7.0000000000
+ 1.5376744064e+02 -> 1.2013081300 7.0000000000
+ 1.3962530501e+02 -> 1.0908226954 7.0000000000
+ 1.2548316939e+02 -> 1.9606745217 6.0000000000
+ 1.1134103377e+02 -> 1.7397036526 6.0000000000
+ 9.7198898142e+01 -> 1.5187327835 6.0000000000
+ 8.3056762518e+01 -> 1.2977619143 6.0000000000
+ 6.8914626894e+01 -> 1.0767910452 6.0000000000
+ 5.4772491271e+01 -> 1.7116403522 5.0000000000
+ 4.0630355647e+01 -> 1.2696986140 5.0000000000
+ 2.6488220023e+01 -> 1.6555137515 4.0000000000
+ 1.2346084400e+01 -> 1.5432605499 3.0000000000
+-1.7960512242e+00 -> -1.7960512242 0.0000000000
+-1.5938186848e+01 -> -1.9922733560 3.0000000000
+-3.0080322472e+01 -> -1.8800201545 4.0000000000
+-4.4222458095e+01 -> -1.3819518155 5.0000000000
+-5.8364593719e+01 -> -1.8238935537 5.0000000000
+-7.2506729343e+01 -> -1.1329176460 6.0000000000
+-8.6648864967e+01 -> -1.3538885151 6.0000000000
+-1.0079100059e+02 -> -1.5748593842 6.0000000000
+-1.1493313621e+02 -> -1.7958302533 6.0000000000
+-1.2907527184e+02 -> -1.0084005612 7.0000000000
+-1.4321740746e+02 -> -1.1188859958 7.0000000000
+-1.5735954309e+02 -> -1.2293714304 7.0000000000
+-1.7150167871e+02 -> -1.3398568649 7.0000000000
+-1.8564381433e+02 -> -1.4503422995 7.0000000000
+-1.9978594996e+02 -> -1.5608277340 7.0000000000
+-2.1392808558e+02 -> -1.6713131686 7.0000000000
+-2.2807022120e+02 -> -1.7817986032 7.0000000000
+-2.4221235683e+02 -> -1.8922840377 7.0000000000
+-2.5635449245e+02 -> -1.0013847361 8.0000000000
+-2.7049662808e+02 -> -1.0566274534 8.0000000000
+-0.0000000000e+00 -> -0.0000000000 -inf
+ -inf -> -inf inf
+ nan -> nan nan
+-7.2124891681e-308 -> -1.6207302828 -1021.0000000000
+-5.7982756057e-308 -> -1.3029400313 -1021.0000000000
+-4.3840620434e-308 -> -1.9702995595 -1022.0000000000
+-2.9698484810e-308 -> -1.3347190565 -1022.0000000000
+-1.5556349186e-308 -> -1.3982771068 -1023.0000000000
+-1.2727922061e-308 -> -1.1440449055 -1023.0000000000
+-9.8994949366e-309 -> -1.7796254086 -1024.0000000000
+-8.4852813742e-309 -> -1.5253932074 -1024.0000000000
+-7.0710678119e-309 -> -1.2711610062 -1024.0000000000
+-5.6568542495e-309 -> -1.0169288049 -1024.0000000000
+-4.2426406871e-309 -> -1.5253932074 -1025.0000000000
+-1.4142135624e-309 -> -1.0169288049 -1026.0000000000
+-1.8384182682e-320 -> -1.8168945312 -1063.0000000000
+-1.8379242025e-321 -> -1.4531250000 -1066.0000000000
+-1.8280428896e-322 -> -1.1562500000 -1069.0000000000
+-1.9762625834e-323 -> -1.0000000000 -1072.0000000000
+-1.4821969375e-323 -> -1.5000000000 -1073.0000000000
+-4.9406564584e-324 -> -1.0000000000 -1074.0000000000
+-4.9406564584e-324 -> -1.0000000000 -1074.0000000000
+-4.9406564584e-324 -> -1.0000000000 -1074.0000000000
+-0.0000000000e+00 -> -0.0000000000 -inf
+-0.0000000000e+00 -> -0.0000000000 -inf
Copied: branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.vgtest (fro=
m rev 5716, trunk/none/tests/amd64/fxtract.vgtest)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.vgtest =
(rev 0)
+++ branches/VALGRIND_3_1_BRANCH/none/tests/amd64/fxtract.vgtest 2006-03-=
07 01:41:59 UTC (rev 5717)
@@ -0,0 +1 @@
+prog: fxtract
|
|
From: <sv...@va...> - 2006-03-07 01:40:48
|
Author: sewardj
Date: 2006-03-07 01:40:44 +0000 (Tue, 07 Mar 2006)
New Revision: 1594
Log:
Merge r1593 (implement amd64 fxtract)
Modified:
branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c
branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.c
branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.h
branches/VEX_3_1_BRANCH/priv/guest-x86/gdefs.h
branches/VEX_3_1_BRANCH/priv/guest-x86/ghelpers.c
branches/VEX_3_1_BRANCH/priv/guest-x86/toIR.c
Modified: branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c 2006-03-07 01:15:50 U=
TC (rev 1593)
+++ branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c 2006-03-07 01:40:44 U=
TC (rev 1594)
@@ -132,6 +132,7 @@
#include "main/vex_util.h"
#include "main/vex_globals.h"
#include "guest-generic/bb_to_IR.h"
+#include "guest-generic/g_generic_x87.h"
#include "guest-amd64/gdefs.h"
=20
=20
@@ -4772,6 +4773,42 @@
fp_pop();
break;
=20
+ case 0xF4: { /* FXTRACT */
+ IRTemp argF =3D newTemp(Ity_F64);
+ IRTemp sigF =3D newTemp(Ity_F64);
+ IRTemp expF =3D newTemp(Ity_F64);
+ IRTemp argI =3D newTemp(Ity_I64);
+ IRTemp sigI =3D newTemp(Ity_I64);
+ IRTemp expI =3D newTemp(Ity_I64);
+ DIP("fxtract\n");
+ assign( argF, get_ST(0) );
+ assign( argI, unop(Iop_ReinterpF64asI64, mkexpr(argF)));
+ assign( sigI,=20
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(0)/*sig*/ ))=20
+ );
+ assign( expI,=20
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(1)/*exp*/ ))=20
+ );
+ assign( sigF, unop(Iop_ReinterpI64asF64, mkexpr(sigI)) );
+ assign( expF, unop(Iop_ReinterpI64asF64, mkexpr(expI)) );
+ /* exponent */
+ put_ST_UNCHECKED(0, mkexpr(expF) );
+ fp_push();
+ /* significand */
+ put_ST(0, mkexpr(sigF) );
+ break;
+ }
+
//.. case 0xF5: { /* FPREM1 -- IEEE compliant */
//.. IRTemp a1 =3D newTemp(Ity_F64);
//.. IRTemp a2 =3D newTemp(Ity_F64);
Modified: branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.c 2006-03-07=
01:15:50 UTC (rev 1593)
+++ branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.c 2006-03-07=
01:40:44 UTC (rev 1594)
@@ -437,6 +437,115 @@
}
=20
=20
+/* CALLED FROM GENERATED CODE: CLEAN HELPER */
+/* Extract the signed significand or exponent component as per
+ fxtract. Arg and result are doubles travelling under the guise of
+ ULongs. Returns significand when getExp is zero and exponent
+ otherwise. */
+ULong x86amd64g_calculate_FXTRACT ( ULong arg, HWord getExp )
+{
+ ULong uSig, uExp;
+ /* Long sSig; */
+ Int sExp, i;
+ UInt sign, expExp;
+
+ /*
+ S 7FF 0------0 infinity
+ S 7FF 0X-----X snan
+ S 7FF 1X-----X qnan
+ */
+ const ULong posInf =3D 0x7FF0000000000000ULL;
+ const ULong negInf =3D 0xFFF0000000000000ULL;
+ const ULong nanMask =3D 0x7FF0000000000000ULL;
+ const ULong qNan =3D 0x7FF8000000000000ULL;
+ const ULong posZero =3D 0x0000000000000000ULL;
+ const ULong negZero =3D 0x8000000000000000ULL;
+ const ULong bit51 =3D 1ULL << 51;
+ const ULong bit52 =3D 1ULL << 52;
+ const ULong sigMask =3D bit52 - 1;
+
+ /* Mimic PIII behaviour for special cases. */
+ if (arg =3D=3D posInf)
+ return getExp ? posInf : posInf;
+ if (arg =3D=3D negInf)
+ return getExp ? posInf : negInf;
+ if ((arg & nanMask) =3D=3D nanMask)
+ return qNan;
+ if (arg =3D=3D posZero)
+ return getExp ? negInf : posZero;
+ if (arg =3D=3D negZero)
+ return getExp ? negInf : negZero;
+
+ /* Split into sign, exponent and significand. */
+ sign =3D ((UInt)(arg >> 63)) & 1;
+
+ /* Mask off exponent & sign. uSig is in range 0 .. 2^52-1. */
+ uSig =3D arg & sigMask;
+
+ /* Get the exponent. */
+ sExp =3D ((Int)(arg >> 52)) & 0x7FF;
+
+ /* Deal with denormals: if the exponent is zero, then the
+ significand cannot possibly be zero (negZero/posZero are handled
+ above). Shift the significand left until bit 51 of it becomes
+ 1, and decrease the exponent accordingly.
+ */
+ if (sExp =3D=3D 0) {
+ for (i =3D 0; i < 52; i++) {
+ if (uSig & bit51)
+ break;
+ uSig <<=3D 1;
+ sExp--;
+ }
+ uSig <<=3D 1;
+ } else {
+ /* Add the implied leading-1 in the significand. */
+ uSig |=3D bit52;
+ }
+
+ /* Roll in the sign. */
+ /* sSig =3D uSig; */
+ /* if (sign) sSig =3D- sSig; */
+
+ /* Convert sig into a double. This should be an exact conversion.
+ Then divide by 2^52, which should give a value in the range 1.0
+ to 2.0-epsilon, at least for normalised args. */
+ /* dSig =3D (Double)sSig; */
+ /* dSig /=3D 67108864.0; */ /* 2^26 */
+ /* dSig /=3D 67108864.0; */ /* 2^26 */
+ uSig &=3D sigMask;
+ uSig |=3D 0x3FF0000000000000ULL;
+ if (sign)
+ uSig ^=3D negZero;
+
+ /* Convert exp into a double. Also an exact conversion. */
+ /* dExp =3D (Double)(sExp - 1023); */
+ sExp -=3D 1023;
+ if (sExp =3D=3D 0) {
+ uExp =3D 0;
+ } else {
+ uExp =3D sExp < 0 ? -sExp : sExp;
+ expExp =3D 0x3FF +52;
+ /* 1 <=3D uExp <=3D 1074 */
+ /* Skip first 42 iterations of normalisation loop as we know they
+ will always happen */
+ uExp <<=3D 42;
+ expExp -=3D 42;
+ for (i =3D 0; i < 52-42; i++) {
+ if (uExp & bit52)
+ break;
+ uExp <<=3D 1;
+ expExp--;
+ }
+ uExp &=3D sigMask;
+ uExp |=3D ((ULong)expExp) << 52;
+ if (sExp < 0) uExp ^=3D negZero;
+ }
+
+ return getExp ? uExp : uSig;
+}
+
+
/*---------------------------------------------------------------*/
/*--- end guest-generic/h_generic_x87.c ---*/
/*---------------------------------------------------------------*/
Modified: branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.h 2006-03-07=
01:15:50 UTC (rev 1593)
+++ branches/VEX_3_1_BRANCH/priv/guest-generic/g_generic_x87.h 2006-03-07=
01:40:44 UTC (rev 1594)
@@ -105,7 +105,11 @@
#define FP_REG(ii) (10*(7-(ii)))
=20
=20
+/* Do the computations for x86/amd64 FXTRACT */
+extern ULong x86amd64g_calculate_FXTRACT ( ULong arg, HWord getExp );
=20
+
+
#endif /* ndef __G_GENERIC_X87_H */
=20
/*---------------------------------------------------------------*/
Modified: branches/VEX_3_1_BRANCH/priv/guest-x86/gdefs.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-x86/gdefs.h 2006-03-07 01:15:50 UT=
C (rev 1593)
+++ branches/VEX_3_1_BRANCH/priv/guest-x86/gdefs.h 2006-03-07 01:40:44 UT=
C (rev 1594)
@@ -119,9 +119,7 @@
=20
extern UInt x86g_create_mxcsr ( UInt sseround );
=20
-extern ULong x86g_calculate_FXTRACT ( ULong arg, UInt getExp );
=20
-
/* Translate a guest virtual_addr into a guest linear address by
consulting the supplied LDT/GDT structures. Their representation
must be as specified in pub/libvex_guest_x86.h. To indicate a
Modified: branches/VEX_3_1_BRANCH/priv/guest-x86/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-x86/ghelpers.c 2006-03-07 01:15:50=
UTC (rev 1593)
+++ branches/VEX_3_1_BRANCH/priv/guest-x86/ghelpers.c 2006-03-07 01:40:44=
UTC (rev 1594)
@@ -1243,115 +1243,6 @@
}
=20
=20
-/* CALLED FROM GENERATED CODE: CLEAN HELPER */
-/* Extract the signed significand or exponent component as per
- fxtract. Arg and result are doubles travelling under the guise of
- ULongs. Returns significand when getExp is zero and exponent
- otherwise. */
-ULong x86g_calculate_FXTRACT ( ULong arg, UInt getExp )
-{
- ULong uSig, uExp;
- /* Long sSig; */
- Int sExp, i;
- UInt sign, expExp;
-
- /*
- S 7FF 0------0 infinity
- S 7FF 0X-----X snan
- S 7FF 1X-----X qnan
- */
- const ULong posInf =3D 0x7FF0000000000000ULL;
- const ULong negInf =3D 0xFFF0000000000000ULL;
- const ULong nanMask =3D 0x7FF0000000000000ULL;
- const ULong qNan =3D 0x7FF8000000000000ULL;
- const ULong posZero =3D 0x0000000000000000ULL;
- const ULong negZero =3D 0x8000000000000000ULL;
- const ULong bit51 =3D 1ULL << 51;
- const ULong bit52 =3D 1ULL << 52;
- const ULong sigMask =3D bit52 - 1;
-
- /* Mimic PIII behaviour for special cases. */
- if (arg =3D=3D posInf)
- return getExp ? posInf : posInf;
- if (arg =3D=3D negInf)
- return getExp ? posInf : negInf;
- if ((arg & nanMask) =3D=3D nanMask)
- return qNan;
- if (arg =3D=3D posZero)
- return getExp ? negInf : posZero;
- if (arg =3D=3D negZero)
- return getExp ? negInf : negZero;
-
- /* Split into sign, exponent and significand. */
- sign =3D ((UInt)(arg >> 63)) & 1;
-
- /* Mask off exponent & sign. uSig is in range 0 .. 2^52-1. */
- uSig =3D arg & sigMask;
-
- /* Get the exponent. */
- sExp =3D ((Int)(arg >> 52)) & 0x7FF;
-
- /* Deal with denormals: if the exponent is zero, then the
- significand cannot possibly be zero (negZero/posZero are handled
- above). Shift the significand left until bit 51 of it becomes
- 1, and decrease the exponent accordingly.
- */
- if (sExp =3D=3D 0) {
- for (i =3D 0; i < 52; i++) {
- if (uSig & bit51)
- break;
- uSig <<=3D 1;
- sExp--;
- }
- uSig <<=3D 1;
- } else {
- /* Add the implied leading-1 in the significand. */
- uSig |=3D bit52;
- }
-
- /* Roll in the sign. */
- /* sSig =3D uSig; */
- /* if (sign) sSig =3D- sSig; */
-
- /* Convert sig into a double. This should be an exact conversion.
- Then divide by 2^52, which should give a value in the range 1.0
- to 2.0-epsilon, at least for normalised args. */
- /* dSig =3D (Double)sSig; */
- /* dSig /=3D 67108864.0; */ /* 2^26 */
- /* dSig /=3D 67108864.0; */ /* 2^26 */
- uSig &=3D sigMask;
- uSig |=3D 0x3FF0000000000000ULL;
- if (sign)
- uSig ^=3D negZero;
-
- /* Convert exp into a double. Also an exact conversion. */
- /* dExp =3D (Double)(sExp - 1023); */
- sExp -=3D 1023;
- if (sExp =3D=3D 0) {
- uExp =3D 0;
- } else {
- uExp =3D sExp < 0 ? -sExp : sExp;
- expExp =3D 0x3FF +52;
- /* 1 <=3D uExp <=3D 1074 */
- /* Skip first 42 iterations of normalisation loop as we know they
- will always happen */
- uExp <<=3D 42;
- expExp -=3D 42;
- for (i =3D 0; i < 52-42; i++) {
- if (uExp & bit52)
- break;
- uExp <<=3D 1;
- expExp--;
- }
- uExp &=3D sigMask;
- uExp |=3D ((ULong)expExp) << 52;
- if (sExp < 0) uExp ^=3D negZero;
- }
-
- return getExp ? uExp : uSig;
-}
-
-
/*----------------------------------------------*/
/*--- The exported fns .. ---*/
/*----------------------------------------------*/
Modified: branches/VEX_3_1_BRANCH/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-x86/toIR.c 2006-03-07 01:15:50 UTC=
(rev 1593)
+++ branches/VEX_3_1_BRANCH/priv/guest-x86/toIR.c 2006-03-07 01:40:44 UTC=
(rev 1594)
@@ -132,6 +132,7 @@
#include "main/vex_util.h"
#include "main/vex_globals.h"
#include "guest-generic/bb_to_IR.h"
+#include "guest-generic/g_generic_x87.h"
#include "guest-x86/gdefs.h"
=20
=20
@@ -3886,17 +3887,21 @@
assign( argF, get_ST(0) );
assign( argI, unop(Iop_ReinterpF64asI64, mkexpr(argF)));
assign( sigI,=20
- mkIRExprCCall(Ity_I64, 0/*regparms*/,=20
- "x86g_calculate_FXTRACT",=20
- &x86g_calculate_FXTRACT,=20
- mkIRExprVec_2( mkexpr(argI),=20
- mkU32(0)/*sig*/ )) )=
;
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(0)/*sig*/ ))=20
+ );
assign( expI,=20
- mkIRExprCCall(Ity_I64, 0/*regparms*/,=20
- "x86g_calculate_FXTRACT",=20
- &x86g_calculate_FXTRACT,=20
- mkIRExprVec_2( mkexpr(argI),=20
- mkU32(1)/*exp*/ )) )=
;
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(1)/*exp*/ ))=20
+ );
assign( sigF, unop(Iop_ReinterpI64asF64, mkexpr(sigI)) );
assign( expF, unop(Iop_ReinterpI64asF64, mkexpr(expI)) );
/* exponent */
|
|
From: <sv...@va...> - 2006-03-07 01:17:19
|
Author: sewardj
Date: 2006-03-07 01:17:12 +0000 (Tue, 07 Mar 2006)
New Revision: 5716
Log:
Add an amd64 test program for 'fxtract' - just a copy of the x86 one.
Added:
trunk/none/tests/amd64/fxtract.c
trunk/none/tests/amd64/fxtract.stderr.exp
trunk/none/tests/amd64/fxtract.stdout.exp
trunk/none/tests/amd64/fxtract.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/Makefile.am 2006-03-06 19:50:06 UTC (rev 5715)
+++ trunk/none/tests/amd64/Makefile.am 2006-03-07 01:17:12 UTC (rev 5716)
@@ -7,6 +7,7 @@
EXTRA_DIST =3D $(noinst_SCRIPTS) \
faultstatus.vgtest faultstatus.stderr.exp \
fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \
+ fxtract.vgtest fxtract.stderr.exp fxtract.stdout.exp \
$(addsuffix .stderr.exp,$(INSN_TESTS)) \
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
$(addsuffix .vgtest,$(INSN_TESTS)) \
@@ -17,7 +18,7 @@
=20
=20
check_PROGRAMS =3D \
- faultstatus fcmovnu $(INSN_TESTS) looper jrcxz smc1 shrld
+ faultstatus fcmovnu fxtract $(INSN_TESTS) looper jrcxz smc1 shrld
=20
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/inc=
lude
@FLAG_M64@
@@ -34,6 +35,7 @@
insn_sse2_LDADD =3D -lm
insn_fpu_SOURCES =3D insn_fpu.def
insn_fpu_LDADD =3D -lm
+fxtract_LDADD =3D -lm
=20
.def.c: $(srcdir)/gen_insn_test.pl
$(PERL) $(srcdir)/gen_insn_test.pl < $< > $@
Added: trunk/none/tests/amd64/fxtract.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/fxtract.c (rev 0)
+++ trunk/none/tests/amd64/fxtract.c 2006-03-07 01:17:12 UTC (rev 5716)
@@ -0,0 +1,99 @@
+
+#include <stdio.h>
+#include <math.h>
+
+double arg, res1, res2;
+
+extern void do_fxtract ( void );
+asm("\n"
+".global do_fxtract\n"
+"do_fxtract:\n"
+"\tfinit\n"
+"\tfldl arg\n"
+"\tfxtract\n"
+"\tfstpl res1\n"
+"\tfstpl res2\n"
+"\tret"
+);
+
+void try ( double x )
+{
+ arg =3D x * 1.414213562373049;
+ res1 =3D res2 =3D 0.0;
+ do_fxtract();
+ printf("%17.10e -> %14.10f %14.10f\n", arg, res1, res2);
+}
+
+int main ( void )
+{
+ int i;
+
+ /* positives */
+
+ for (i =3D 0; i < 40; i++)
+ try( 1.27 + (double)(i*10 - 200) );
+
+ try(+0.0);
+ try(1.0 / 0.0);
+ try(sqrt(-1.0));
+
+ try(5.1e-308);
+ try(4.1e-308);
+ try(3.1e-308);
+ try(2.1e-308);
+ try(1.1e-308);
+ try(0.9e-308);
+ try(0.7e-308);
+ try(0.6e-308);
+ try(0.5e-308);
+ try(0.4e-308);
+ try(0.3e-308);
+ try(0.1e-308);
+
+ try(1.3e-320);
+ try(1.3e-321);
+ try(1.3e-322);
+ try(1.3e-323);
+ try(0.9e-323);
+ try(0.7e-323);
+ try(0.5e-323);
+ try(0.3e-323);
+ try(0.2e-323);
+ try(1.3e-324);
+
+ /* negatives */
+
+ printf("\n");
+ for (i =3D 0; i < 40; i++)
+ try( - (1.27 + (double)(i*10 - 200)) );
+
+ try(-0.0);
+ try(-(1.0 / 0.0));
+ try(-sqrt(-1.0));
+
+ try(-5.1e-308);
+ try(-4.1e-308);
+ try(-3.1e-308);
+ try(-2.1e-308);
+ try(-1.1e-308);
+ try(-0.9e-308);
+ try(-0.7e-308);
+ try(-0.6e-308);
+ try(-0.5e-308);
+ try(-0.4e-308);
+ try(-0.3e-308);
+ try(-0.1e-308);
+
+ try(-1.3e-320);
+ try(-1.3e-321);
+ try(-1.3e-322);
+ try(-1.3e-323);
+ try(-0.9e-323);
+ try(-0.7e-323);
+ try(-0.5e-323);
+ try(-0.3e-323);
+ try(-0.2e-323);
+ try(-1.3e-324);
+
+ return 0;
+}
Added: trunk/none/tests/amd64/fxtract.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/fxtract.stderr.exp (re=
v 0)
+++ trunk/none/tests/amd64/fxtract.stderr.exp 2006-03-07 01:17:12 UTC (re=
v 5716)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/amd64/fxtract.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/fxtract.stdout.exp (re=
v 0)
+++ trunk/none/tests/amd64/fxtract.stdout.exp 2006-03-07 01:17:12 UTC (re=
v 5716)
@@ -0,0 +1,131 @@
+-2.8104666125e+02 -> -1.0978385205 8.0000000000
+-2.6690452563e+02 -> -1.0425958032 8.0000000000
+-2.5276239000e+02 -> -1.9747061719 7.0000000000
+-2.3862025438e+02 -> -1.8642207373 7.0000000000
+-2.2447811876e+02 -> -1.7537353028 7.0000000000
+-2.1033598313e+02 -> -1.6432498682 7.0000000000
+-1.9619384751e+02 -> -1.5327644337 7.0000000000
+-1.8205171188e+02 -> -1.4222789991 7.0000000000
+-1.6790957626e+02 -> -1.3117935645 7.0000000000
+-1.5376744064e+02 -> -1.2013081300 7.0000000000
+-1.3962530501e+02 -> -1.0908226954 7.0000000000
+-1.2548316939e+02 -> -1.9606745217 6.0000000000
+-1.1134103377e+02 -> -1.7397036526 6.0000000000
+-9.7198898142e+01 -> -1.5187327835 6.0000000000
+-8.3056762518e+01 -> -1.2977619143 6.0000000000
+-6.8914626894e+01 -> -1.0767910452 6.0000000000
+-5.4772491271e+01 -> -1.7116403522 5.0000000000
+-4.0630355647e+01 -> -1.2696986140 5.0000000000
+-2.6488220023e+01 -> -1.6555137515 4.0000000000
+-1.2346084400e+01 -> -1.5432605499 3.0000000000
+ 1.7960512242e+00 -> 1.7960512242 0.0000000000
+ 1.5938186848e+01 -> 1.9922733560 3.0000000000
+ 3.0080322472e+01 -> 1.8800201545 4.0000000000
+ 4.4222458095e+01 -> 1.3819518155 5.0000000000
+ 5.8364593719e+01 -> 1.8238935537 5.0000000000
+ 7.2506729343e+01 -> 1.1329176460 6.0000000000
+ 8.6648864967e+01 -> 1.3538885151 6.0000000000
+ 1.0079100059e+02 -> 1.5748593842 6.0000000000
+ 1.1493313621e+02 -> 1.7958302533 6.0000000000
+ 1.2907527184e+02 -> 1.0084005612 7.0000000000
+ 1.4321740746e+02 -> 1.1188859958 7.0000000000
+ 1.5735954309e+02 -> 1.2293714304 7.0000000000
+ 1.7150167871e+02 -> 1.3398568649 7.0000000000
+ 1.8564381433e+02 -> 1.4503422995 7.0000000000
+ 1.9978594996e+02 -> 1.5608277340 7.0000000000
+ 2.1392808558e+02 -> 1.6713131686 7.0000000000
+ 2.2807022120e+02 -> 1.7817986032 7.0000000000
+ 2.4221235683e+02 -> 1.8922840377 7.0000000000
+ 2.5635449245e+02 -> 1.0013847361 8.0000000000
+ 2.7049662808e+02 -> 1.0566274534 8.0000000000
+ 0.0000000000e+00 -> 0.0000000000 -inf
+ inf -> inf inf
+ nan -> nan nan
+7.2124891681e-308 -> 1.6207302828 -1021.0000000000
+5.7982756057e-308 -> 1.3029400313 -1021.0000000000
+4.3840620434e-308 -> 1.9702995595 -1022.0000000000
+2.9698484810e-308 -> 1.3347190565 -1022.0000000000
+1.5556349186e-308 -> 1.3982771068 -1023.0000000000
+1.2727922061e-308 -> 1.1440449055 -1023.0000000000
+9.8994949366e-309 -> 1.7796254086 -1024.0000000000
+8.4852813742e-309 -> 1.5253932074 -1024.0000000000
+7.0710678119e-309 -> 1.2711610062 -1024.0000000000
+5.6568542495e-309 -> 1.0169288049 -1024.0000000000
+4.2426406871e-309 -> 1.5253932074 -1025.0000000000
+1.4142135624e-309 -> 1.0169288049 -1026.0000000000
+1.8384182682e-320 -> 1.8168945312 -1063.0000000000
+1.8379242025e-321 -> 1.4531250000 -1066.0000000000
+1.8280428896e-322 -> 1.1562500000 -1069.0000000000
+1.9762625834e-323 -> 1.0000000000 -1072.0000000000
+1.4821969375e-323 -> 1.5000000000 -1073.0000000000
+4.9406564584e-324 -> 1.0000000000 -1074.0000000000
+4.9406564584e-324 -> 1.0000000000 -1074.0000000000
+4.9406564584e-324 -> 1.0000000000 -1074.0000000000
+ 0.0000000000e+00 -> 0.0000000000 -inf
+ 0.0000000000e+00 -> 0.0000000000 -inf
+
+ 2.8104666125e+02 -> 1.0978385205 8.0000000000
+ 2.6690452563e+02 -> 1.0425958032 8.0000000000
+ 2.5276239000e+02 -> 1.9747061719 7.0000000000
+ 2.3862025438e+02 -> 1.8642207373 7.0000000000
+ 2.2447811876e+02 -> 1.7537353028 7.0000000000
+ 2.1033598313e+02 -> 1.6432498682 7.0000000000
+ 1.9619384751e+02 -> 1.5327644337 7.0000000000
+ 1.8205171188e+02 -> 1.4222789991 7.0000000000
+ 1.6790957626e+02 -> 1.3117935645 7.0000000000
+ 1.5376744064e+02 -> 1.2013081300 7.0000000000
+ 1.3962530501e+02 -> 1.0908226954 7.0000000000
+ 1.2548316939e+02 -> 1.9606745217 6.0000000000
+ 1.1134103377e+02 -> 1.7397036526 6.0000000000
+ 9.7198898142e+01 -> 1.5187327835 6.0000000000
+ 8.3056762518e+01 -> 1.2977619143 6.0000000000
+ 6.8914626894e+01 -> 1.0767910452 6.0000000000
+ 5.4772491271e+01 -> 1.7116403522 5.0000000000
+ 4.0630355647e+01 -> 1.2696986140 5.0000000000
+ 2.6488220023e+01 -> 1.6555137515 4.0000000000
+ 1.2346084400e+01 -> 1.5432605499 3.0000000000
+-1.7960512242e+00 -> -1.7960512242 0.0000000000
+-1.5938186848e+01 -> -1.9922733560 3.0000000000
+-3.0080322472e+01 -> -1.8800201545 4.0000000000
+-4.4222458095e+01 -> -1.3819518155 5.0000000000
+-5.8364593719e+01 -> -1.8238935537 5.0000000000
+-7.2506729343e+01 -> -1.1329176460 6.0000000000
+-8.6648864967e+01 -> -1.3538885151 6.0000000000
+-1.0079100059e+02 -> -1.5748593842 6.0000000000
+-1.1493313621e+02 -> -1.7958302533 6.0000000000
+-1.2907527184e+02 -> -1.0084005612 7.0000000000
+-1.4321740746e+02 -> -1.1188859958 7.0000000000
+-1.5735954309e+02 -> -1.2293714304 7.0000000000
+-1.7150167871e+02 -> -1.3398568649 7.0000000000
+-1.8564381433e+02 -> -1.4503422995 7.0000000000
+-1.9978594996e+02 -> -1.5608277340 7.0000000000
+-2.1392808558e+02 -> -1.6713131686 7.0000000000
+-2.2807022120e+02 -> -1.7817986032 7.0000000000
+-2.4221235683e+02 -> -1.8922840377 7.0000000000
+-2.5635449245e+02 -> -1.0013847361 8.0000000000
+-2.7049662808e+02 -> -1.0566274534 8.0000000000
+-0.0000000000e+00 -> -0.0000000000 -inf
+ -inf -> -inf inf
+ nan -> nan nan
+-7.2124891681e-308 -> -1.6207302828 -1021.0000000000
+-5.7982756057e-308 -> -1.3029400313 -1021.0000000000
+-4.3840620434e-308 -> -1.9702995595 -1022.0000000000
+-2.9698484810e-308 -> -1.3347190565 -1022.0000000000
+-1.5556349186e-308 -> -1.3982771068 -1023.0000000000
+-1.2727922061e-308 -> -1.1440449055 -1023.0000000000
+-9.8994949366e-309 -> -1.7796254086 -1024.0000000000
+-8.4852813742e-309 -> -1.5253932074 -1024.0000000000
+-7.0710678119e-309 -> -1.2711610062 -1024.0000000000
+-5.6568542495e-309 -> -1.0169288049 -1024.0000000000
+-4.2426406871e-309 -> -1.5253932074 -1025.0000000000
+-1.4142135624e-309 -> -1.0169288049 -1026.0000000000
+-1.8384182682e-320 -> -1.8168945312 -1063.0000000000
+-1.8379242025e-321 -> -1.4531250000 -1066.0000000000
+-1.8280428896e-322 -> -1.1562500000 -1069.0000000000
+-1.9762625834e-323 -> -1.0000000000 -1072.0000000000
+-1.4821969375e-323 -> -1.5000000000 -1073.0000000000
+-4.9406564584e-324 -> -1.0000000000 -1074.0000000000
+-4.9406564584e-324 -> -1.0000000000 -1074.0000000000
+-4.9406564584e-324 -> -1.0000000000 -1074.0000000000
+-0.0000000000e+00 -> -0.0000000000 -inf
+-0.0000000000e+00 -> -0.0000000000 -inf
Added: trunk/none/tests/amd64/fxtract.vgtest
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/none/tests/amd64/fxtract.vgtest (rev 0)
+++ trunk/none/tests/amd64/fxtract.vgtest 2006-03-07 01:17:12 UTC (rev 57=
16)
@@ -0,0 +1 @@
+prog: fxtract
|
|
From: <sv...@va...> - 2006-03-07 01:15:55
|
Author: sewardj
Date: 2006-03-07 01:15:50 +0000 (Tue, 07 Mar 2006)
New Revision: 1593
Log:
Move the helper function for x86 'fxtract' to g_generic_x87.c so
it can be shared by the x86 and amd64 front ends, then use it to
implement fxtract on amd64.
Modified:
trunk/priv/guest-amd64/toIR.c
trunk/priv/guest-generic/g_generic_x87.c
trunk/priv/guest-generic/g_generic_x87.h
trunk/priv/guest-x86/gdefs.h
trunk/priv/guest-x86/ghelpers.c
trunk/priv/guest-x86/toIR.c
Modified: trunk/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/toIR.c 2006-03-07 00:24:59 UTC (rev 1592)
+++ trunk/priv/guest-amd64/toIR.c 2006-03-07 01:15:50 UTC (rev 1593)
@@ -154,6 +154,7 @@
#include "main/vex_util.h"
#include "main/vex_globals.h"
#include "guest-generic/bb_to_IR.h"
+#include "guest-generic/g_generic_x87.h"
#include "guest-amd64/gdefs.h"
=20
=20
@@ -4828,6 +4829,42 @@
fp_pop();
break;
=20
+ case 0xF4: { /* FXTRACT */
+ IRTemp argF =3D newTemp(Ity_F64);
+ IRTemp sigF =3D newTemp(Ity_F64);
+ IRTemp expF =3D newTemp(Ity_F64);
+ IRTemp argI =3D newTemp(Ity_I64);
+ IRTemp sigI =3D newTemp(Ity_I64);
+ IRTemp expI =3D newTemp(Ity_I64);
+ DIP("fxtract\n");
+ assign( argF, get_ST(0) );
+ assign( argI, unop(Iop_ReinterpF64asI64, mkexpr(argF)));
+ assign( sigI,=20
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(0)/*sig*/ ))=20
+ );
+ assign( expI,=20
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(1)/*exp*/ ))=20
+ );
+ assign( sigF, unop(Iop_ReinterpI64asF64, mkexpr(sigI)) );
+ assign( expF, unop(Iop_ReinterpI64asF64, mkexpr(expI)) );
+ /* exponent */
+ put_ST_UNCHECKED(0, mkexpr(expF) );
+ fp_push();
+ /* significand */
+ put_ST(0, mkexpr(sigF) );
+ break;
+ }
+
//.. case 0xF5: { /* FPREM1 -- IEEE compliant */
//.. IRTemp a1 =3D newTemp(Ity_F64);
//.. IRTemp a2 =3D newTemp(Ity_F64);
Modified: trunk/priv/guest-generic/g_generic_x87.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-generic/g_generic_x87.c 2006-03-07 00:24:59 UTC (rev=
1592)
+++ trunk/priv/guest-generic/g_generic_x87.c 2006-03-07 01:15:50 UTC (rev=
1593)
@@ -437,6 +437,115 @@
}
=20
=20
+/* CALLED FROM GENERATED CODE: CLEAN HELPER */
+/* Extract the signed significand or exponent component as per
+ fxtract. Arg and result are doubles travelling under the guise of
+ ULongs. Returns significand when getExp is zero and exponent
+ otherwise. */
+ULong x86amd64g_calculate_FXTRACT ( ULong arg, HWord getExp )
+{
+ ULong uSig, uExp;
+ /* Long sSig; */
+ Int sExp, i;
+ UInt sign, expExp;
+
+ /*
+ S 7FF 0------0 infinity
+ S 7FF 0X-----X snan
+ S 7FF 1X-----X qnan
+ */
+ const ULong posInf =3D 0x7FF0000000000000ULL;
+ const ULong negInf =3D 0xFFF0000000000000ULL;
+ const ULong nanMask =3D 0x7FF0000000000000ULL;
+ const ULong qNan =3D 0x7FF8000000000000ULL;
+ const ULong posZero =3D 0x0000000000000000ULL;
+ const ULong negZero =3D 0x8000000000000000ULL;
+ const ULong bit51 =3D 1ULL << 51;
+ const ULong bit52 =3D 1ULL << 52;
+ const ULong sigMask =3D bit52 - 1;
+
+ /* Mimic PIII behaviour for special cases. */
+ if (arg =3D=3D posInf)
+ return getExp ? posInf : posInf;
+ if (arg =3D=3D negInf)
+ return getExp ? posInf : negInf;
+ if ((arg & nanMask) =3D=3D nanMask)
+ return qNan;
+ if (arg =3D=3D posZero)
+ return getExp ? negInf : posZero;
+ if (arg =3D=3D negZero)
+ return getExp ? negInf : negZero;
+
+ /* Split into sign, exponent and significand. */
+ sign =3D ((UInt)(arg >> 63)) & 1;
+
+ /* Mask off exponent & sign. uSig is in range 0 .. 2^52-1. */
+ uSig =3D arg & sigMask;
+
+ /* Get the exponent. */
+ sExp =3D ((Int)(arg >> 52)) & 0x7FF;
+
+ /* Deal with denormals: if the exponent is zero, then the
+ significand cannot possibly be zero (negZero/posZero are handled
+ above). Shift the significand left until bit 51 of it becomes
+ 1, and decrease the exponent accordingly.
+ */
+ if (sExp =3D=3D 0) {
+ for (i =3D 0; i < 52; i++) {
+ if (uSig & bit51)
+ break;
+ uSig <<=3D 1;
+ sExp--;
+ }
+ uSig <<=3D 1;
+ } else {
+ /* Add the implied leading-1 in the significand. */
+ uSig |=3D bit52;
+ }
+
+ /* Roll in the sign. */
+ /* sSig =3D uSig; */
+ /* if (sign) sSig =3D- sSig; */
+
+ /* Convert sig into a double. This should be an exact conversion.
+ Then divide by 2^52, which should give a value in the range 1.0
+ to 2.0-epsilon, at least for normalised args. */
+ /* dSig =3D (Double)sSig; */
+ /* dSig /=3D 67108864.0; */ /* 2^26 */
+ /* dSig /=3D 67108864.0; */ /* 2^26 */
+ uSig &=3D sigMask;
+ uSig |=3D 0x3FF0000000000000ULL;
+ if (sign)
+ uSig ^=3D negZero;
+
+ /* Convert exp into a double. Also an exact conversion. */
+ /* dExp =3D (Double)(sExp - 1023); */
+ sExp -=3D 1023;
+ if (sExp =3D=3D 0) {
+ uExp =3D 0;
+ } else {
+ uExp =3D sExp < 0 ? -sExp : sExp;
+ expExp =3D 0x3FF +52;
+ /* 1 <=3D uExp <=3D 1074 */
+ /* Skip first 42 iterations of normalisation loop as we know they
+ will always happen */
+ uExp <<=3D 42;
+ expExp -=3D 42;
+ for (i =3D 0; i < 52-42; i++) {
+ if (uExp & bit52)
+ break;
+ uExp <<=3D 1;
+ expExp--;
+ }
+ uExp &=3D sigMask;
+ uExp |=3D ((ULong)expExp) << 52;
+ if (sExp < 0) uExp ^=3D negZero;
+ }
+
+ return getExp ? uExp : uSig;
+}
+
+
/*---------------------------------------------------------------*/
/*--- end guest-generic/h_generic_x87.c ---*/
/*---------------------------------------------------------------*/
Modified: trunk/priv/guest-generic/g_generic_x87.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-generic/g_generic_x87.h 2006-03-07 00:24:59 UTC (rev=
1592)
+++ trunk/priv/guest-generic/g_generic_x87.h 2006-03-07 01:15:50 UTC (rev=
1593)
@@ -105,7 +105,11 @@
#define FP_REG(ii) (10*(7-(ii)))
=20
=20
+/* Do the computations for x86/amd64 FXTRACT */
+extern ULong x86amd64g_calculate_FXTRACT ( ULong arg, HWord getExp );
=20
+
+
#endif /* ndef __G_GENERIC_X87_H */
=20
/*---------------------------------------------------------------*/
Modified: trunk/priv/guest-x86/gdefs.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/gdefs.h 2006-03-07 00:24:59 UTC (rev 1592)
+++ trunk/priv/guest-x86/gdefs.h 2006-03-07 01:15:50 UTC (rev 1593)
@@ -120,9 +120,7 @@
=20
extern UInt x86g_create_mxcsr ( UInt sseround );
=20
-extern ULong x86g_calculate_FXTRACT ( ULong arg, UInt getExp );
=20
-
/* Translate a guest virtual_addr into a guest linear address by
consulting the supplied LDT/GDT structures. Their representation
must be as specified in pub/libvex_guest_x86.h. To indicate a
Modified: trunk/priv/guest-x86/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/ghelpers.c 2006-03-07 00:24:59 UTC (rev 1592)
+++ trunk/priv/guest-x86/ghelpers.c 2006-03-07 01:15:50 UTC (rev 1593)
@@ -1243,115 +1243,6 @@
}
=20
=20
-/* CALLED FROM GENERATED CODE: CLEAN HELPER */
-/* Extract the signed significand or exponent component as per
- fxtract. Arg and result are doubles travelling under the guise of
- ULongs. Returns significand when getExp is zero and exponent
- otherwise. */
-ULong x86g_calculate_FXTRACT ( ULong arg, UInt getExp )
-{
- ULong uSig, uExp;
- /* Long sSig; */
- Int sExp, i;
- UInt sign, expExp;
-
- /*
- S 7FF 0------0 infinity
- S 7FF 0X-----X snan
- S 7FF 1X-----X qnan
- */
- const ULong posInf =3D 0x7FF0000000000000ULL;
- const ULong negInf =3D 0xFFF0000000000000ULL;
- const ULong nanMask =3D 0x7FF0000000000000ULL;
- const ULong qNan =3D 0x7FF8000000000000ULL;
- const ULong posZero =3D 0x0000000000000000ULL;
- const ULong negZero =3D 0x8000000000000000ULL;
- const ULong bit51 =3D 1ULL << 51;
- const ULong bit52 =3D 1ULL << 52;
- const ULong sigMask =3D bit52 - 1;
-
- /* Mimic PIII behaviour for special cases. */
- if (arg =3D=3D posInf)
- return getExp ? posInf : posInf;
- if (arg =3D=3D negInf)
- return getExp ? posInf : negInf;
- if ((arg & nanMask) =3D=3D nanMask)
- return qNan;
- if (arg =3D=3D posZero)
- return getExp ? negInf : posZero;
- if (arg =3D=3D negZero)
- return getExp ? negInf : negZero;
-
- /* Split into sign, exponent and significand. */
- sign =3D ((UInt)(arg >> 63)) & 1;
-
- /* Mask off exponent & sign. uSig is in range 0 .. 2^52-1. */
- uSig =3D arg & sigMask;
-
- /* Get the exponent. */
- sExp =3D ((Int)(arg >> 52)) & 0x7FF;
-
- /* Deal with denormals: if the exponent is zero, then the
- significand cannot possibly be zero (negZero/posZero are handled
- above). Shift the significand left until bit 51 of it becomes
- 1, and decrease the exponent accordingly.
- */
- if (sExp =3D=3D 0) {
- for (i =3D 0; i < 52; i++) {
- if (uSig & bit51)
- break;
- uSig <<=3D 1;
- sExp--;
- }
- uSig <<=3D 1;
- } else {
- /* Add the implied leading-1 in the significand. */
- uSig |=3D bit52;
- }
-
- /* Roll in the sign. */
- /* sSig =3D uSig; */
- /* if (sign) sSig =3D- sSig; */
-
- /* Convert sig into a double. This should be an exact conversion.
- Then divide by 2^52, which should give a value in the range 1.0
- to 2.0-epsilon, at least for normalised args. */
- /* dSig =3D (Double)sSig; */
- /* dSig /=3D 67108864.0; */ /* 2^26 */
- /* dSig /=3D 67108864.0; */ /* 2^26 */
- uSig &=3D sigMask;
- uSig |=3D 0x3FF0000000000000ULL;
- if (sign)
- uSig ^=3D negZero;
-
- /* Convert exp into a double. Also an exact conversion. */
- /* dExp =3D (Double)(sExp - 1023); */
- sExp -=3D 1023;
- if (sExp =3D=3D 0) {
- uExp =3D 0;
- } else {
- uExp =3D sExp < 0 ? -sExp : sExp;
- expExp =3D 0x3FF +52;
- /* 1 <=3D uExp <=3D 1074 */
- /* Skip first 42 iterations of normalisation loop as we know they
- will always happen */
- uExp <<=3D 42;
- expExp -=3D 42;
- for (i =3D 0; i < 52-42; i++) {
- if (uExp & bit52)
- break;
- uExp <<=3D 1;
- expExp--;
- }
- uExp &=3D sigMask;
- uExp |=3D ((ULong)expExp) << 52;
- if (sExp < 0) uExp ^=3D negZero;
- }
-
- return getExp ? uExp : uSig;
-}
-
-
/*----------------------------------------------*/
/*--- The exported fns .. ---*/
/*----------------------------------------------*/
Modified: trunk/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/toIR.c 2006-03-07 00:24:59 UTC (rev 1592)
+++ trunk/priv/guest-x86/toIR.c 2006-03-07 01:15:50 UTC (rev 1593)
@@ -156,6 +156,7 @@
#include "main/vex_util.h"
#include "main/vex_globals.h"
#include "guest-generic/bb_to_IR.h"
+#include "guest-generic/g_generic_x87.h"
#include "guest-x86/gdefs.h"
=20
=20
@@ -3944,17 +3945,21 @@
assign( argF, get_ST(0) );
assign( argI, unop(Iop_ReinterpF64asI64, mkexpr(argF)));
assign( sigI,=20
- mkIRExprCCall(Ity_I64, 0/*regparms*/,=20
- "x86g_calculate_FXTRACT",=20
- &x86g_calculate_FXTRACT,=20
- mkIRExprVec_2( mkexpr(argI),=20
- mkU32(0)/*sig*/ )) )=
;
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(0)/*sig*/ ))=20
+ );
assign( expI,=20
- mkIRExprCCall(Ity_I64, 0/*regparms*/,=20
- "x86g_calculate_FXTRACT",=20
- &x86g_calculate_FXTRACT,=20
- mkIRExprVec_2( mkexpr(argI),=20
- mkU32(1)/*exp*/ )) )=
;
+ mkIRExprCCall(
+ Ity_I64, 0/*regparms*/,=20
+ "x86amd64g_calculate_FXTRACT",=20
+ &x86amd64g_calculate_FXTRACT,=20
+ mkIRExprVec_2( mkexpr(argI),=20
+ mkIRExpr_HWord(1)/*exp*/ ))=20
+ );
assign( sigF, unop(Iop_ReinterpI64asF64, mkexpr(sigI)) );
assign( expF, unop(Iop_ReinterpI64asF64, mkexpr(expI)) );
/* exponent */
|
|
From: <sv...@va...> - 2006-03-07 00:25:06
|
Author: sewardj
Date: 2006-03-07 00:24:59 +0000 (Tue, 07 Mar 2006)
New Revision: 1592
Log:
Merge r1591 (Implement fnstsw).
Modified:
branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c
Modified: branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c 2006-03-07 00:22:02 U=
TC (rev 1591)
+++ branches/VEX_3_1_BRANCH/priv/guest-amd64/toIR.c 2006-03-07 00:24:59 U=
TC (rev 1592)
@@ -4172,7 +4172,23 @@
put_C3210( binop(Iop_And64, get_C3210(), mkU64(~AMD64G_FC_MASK_C2)) )=
;
}
=20
+/* Invent a plausible-looking FPU status word value:
+ ((ftop & 7) << 11) | (c3210 & 0x4700)
+ */
+static IRExpr* get_FPU_sw ( void )
+{
+ return
+ unop(Iop_32to16,
+ binop(Iop_Or32,
+ binop(Iop_Shl32,=20
+ binop(Iop_And32, get_ftop(), mkU32(7)),=20
+ mkU8(11)),
+ binop(Iop_And32, unop(Iop_64to32, get_C3210()),=20
+ mkU32(0x4700))
+ ));
+}
=20
+
/* ------------------------------------------------------- */
/* Given all that stack-mangling junk, we can now go ahead
and describe FP instructions.=20
@@ -5423,6 +5439,14 @@
//.. break;
//.. }
=20
+ case 7: { /* FNSTSW m16 */
+ IRExpr* sw =3D get_FPU_sw();
+ vassert(typeOfIRExpr(irbb->tyenv, sw) =3D=3D Ity_I16);
+ storeLE( mkexpr(addr), sw );
+ DIP("fnstsw %s\n", dis_buf);
+ break;
+ }
+
default:
vex_printf("unhandled opc_aux =3D 0x%2x\n", gregLO3ofRM(m=
odrm));
vex_printf("first_opcode =3D=3D 0xDD\n");
|