|
From: Tom H. <th...@cy...> - 2004-03-16 11:03:15
|
CVS commit by thughes:
Filter out the ": core dumped" message from test results as the user
running the tests might have a ulimit set that prevents the core dumps.
M +1 -1 memcheck/tests/badjump.stderr.exp 1.8
M +1 -1 none/tests/int.stderr.exp 1.2
M +5 -1 tests/filter_stderr_basic 1.17
--- valgrind/memcheck/tests/badjump.stderr.exp #1.7:1.8
@@ -6,5 +6,5 @@
Address 0x........ is not stack'd, malloc'd or free'd
-Process terminating with default action of signal 11 (SIGSEGV): dumping core
+Process terminating with default action of signal 11 (SIGSEGV)
Access not within mapped region at address 0x........
at 0x........: ???
--- valgrind/none/tests/int.stderr.exp #1.1:1.2
@@ -3,5 +3,5 @@
at 0x........: main (int.c:5)
-Process terminating with default action of signal 4 (SIGILL): dumping core
+Process terminating with default action of signal 4 (SIGILL)
Illegal operand at address 0x........
at 0x........: main (int.c:5)
--- valgrind/tests/filter_stderr_basic #1.16:1.17
@@ -34,3 +34,7 @@
# Remove line info out of order warnings
-sed "/warning: line info addresses out of order/d"
+sed "/warning: line info addresses out of order/d" |
+
+# Remove any ": dumping core" message as the user might have a
+# limit set that prevents the core dump
+sed "s/\(signal [0-9]* (SIG[A-Z]*)\): dumping core/\1/"
|
|
From: Tom H. <th...@cy...> - 2004-03-16 11:05:25
|
CVS commit by thughes: Ignore valgrind core files. M +1 -0 memcheck/tests/.cvsignore 1.10 M +1 -0 none/tests/.cvsignore 1.13 --- valgrind/memcheck/tests/.cvsignore #1.9:1.10 @@ -56,4 +56,5 @@ realloc3 threadederrno +vgcore.pid* writev zeropage --- valgrind/none/tests/.cvsignore #1.12:1.13 @@ -65,3 +65,4 @@ *.stderr.out tls +vgcore.pid* yield |
|
From: Tom H. <th...@cy...> - 2004-03-23 19:49:00
|
CVS commit by thughes:
Commit rewrite of semaphore handling to avoid having a fixed upper
limit. Patch courtesy of Aleksander Salwa <A....@os...>.
A none/tests/semlimit.c 1.1 [no copyright]
A none/tests/semlimit.stderr.exp 1.1
A none/tests/semlimit.stdout.exp 1.1
A none/tests/semlimit.vgtest 1.1
M +0 -3 coregrind/vg_include.h 1.188
M +78 -56 coregrind/vg_libpthread.c 1.149
M +5 -2 none/tests/Makefile.am 1.34
--- valgrind/coregrind/vg_include.h #1.187:1.188
@@ -117,7 +117,4 @@
#define VG_PTHREAD_STACK_SIZE (1 << 20)
-/* Number of entries in the semaphore-remapping table. */
-#define VG_N_SEMAPHORES 50
-
/* Number of entries in the rwlock-remapping table. */
#define VG_N_RWLOCKS 500
--- valgrind/coregrind/vg_libpthread.c #1.148:1.149
@@ -2490,7 +2490,4 @@ pid_t __vfork(void)
#include <semaphore.h>
-/* This is a terrible way to do the remapping. Plan is to import an
- AVL tree at some point. */
-
typedef
struct {
@@ -2502,57 +2499,50 @@ typedef
vg_sem_t;
-static pthread_mutex_t se_remap_mx = PTHREAD_MUTEX_INITIALIZER;
+#define SEM_CHECK_MAGIC 0x5b1d0772
-static int se_remap_used = 0;
-static sem_t* se_remap_orig[VG_N_SEMAPHORES];
-static vg_sem_t se_remap_new[VG_N_SEMAPHORES];
+typedef
+ struct {
+ union {
+ vg_sem_t* p;
+ int i;
+ } shadow;
+ int err_check;
+ }
+ user_sem_t;
-static vg_sem_t* se_remap ( sem_t* orig )
+
+static vg_sem_t* se_new ( sem_t* orig )
{
- int res, i;
- res = __pthread_mutex_lock(&se_remap_mx);
- my_assert(res == 0);
+ user_sem_t* u_sem = (user_sem_t*)orig;
+ vg_sem_t* vg_sem;
- for (i = 0; i < se_remap_used; i++) {
- if (se_remap_orig[i] == orig)
- break;
- }
- if (i == se_remap_used) {
- if (se_remap_used == VG_N_SEMAPHORES) {
- res = pthread_mutex_unlock(&se_remap_mx);
- my_assert(res == 0);
- barf("VG_N_SEMAPHORES is too low. Increase and recompile.");
- }
- se_remap_used++;
- se_remap_orig[i] = orig;
- /* printf("allocated semaphore %d\n", i); */
- }
- res = __pthread_mutex_unlock(&se_remap_mx);
- my_assert(res == 0);
- return &se_remap_new[i];
+ vg_sem = my_malloc(sizeof(vg_sem_t));
+
+ u_sem->shadow.p = vg_sem;
+ u_sem->err_check = u_sem->shadow.i ^ SEM_CHECK_MAGIC;
+
+ return vg_sem;
}
-static void se_unmap( sem_t* orig )
+static vg_sem_t* se_lookup ( sem_t* orig )
{
- int res, i;
- res = __pthread_mutex_lock(&se_remap_mx);
- my_assert(res == 0);
+ user_sem_t* u_sem = (user_sem_t*) orig;
- for (i = 0; i < se_remap_used; i++) {
- if (se_remap_orig[i] == orig)
- break;
- }
- if (i == se_remap_used) {
- res = pthread_mutex_unlock(&se_remap_mx);
- my_assert(res == 0);
- barf("se_unmap: unmapping invalid semaphore");
- } else {
- se_remap_orig[i] = se_remap_orig[--se_remap_used];
- se_remap_orig[se_remap_used] = 0;
- memset(&se_remap_new[se_remap_used], 0,
- sizeof(se_remap_new[se_remap_used]));
- }
- res = pthread_mutex_unlock(&se_remap_mx);
- my_assert(res == 0);
+ if(!u_sem->shadow.p || ((u_sem->shadow.i ^ SEM_CHECK_MAGIC) != u_sem->err_check))
+ return NULL;
+
+ return u_sem->shadow.p;
+}
+
+static void se_free( sem_t* orig )
+{
+ user_sem_t* u_sem = (user_sem_t*) orig;
+
+ my_free(u_sem->shadow.p);
+
+ u_sem->shadow.p = NULL;
+ u_sem->err_check = 0;
+
+ return;
}
@@ -2567,5 +2557,6 @@ int sem_init(sem_t *sem, int pshared, un
return -1;
}
- vg_sem = se_remap(sem);
+ vg_sem = se_new(sem);
+
res = pthread_mutex_init(&vg_sem->se_mx, NULL);
my_assert(res == 0);
@@ -2573,4 +2564,5 @@ int sem_init(sem_t *sem, int pshared, un
my_assert(res == 0);
vg_sem->count = value;
+ vg_sem->waiters = 0;
return 0;
}
@@ -2581,5 +2573,10 @@ int sem_wait ( sem_t* sem )
vg_sem_t* vg_sem;
ensure_valgrind("sem_wait");
- vg_sem = se_remap(sem);
+ vg_sem = se_lookup(sem);
+ if(!vg_sem) {
+ pthread_error("sem_wait: semaphore overwritten or not initialized");
+ *(__errno_location()) = EINVAL;
+ return -1;
+ }
res = __pthread_mutex_lock(&vg_sem->se_mx);
my_assert(res == 0);
@@ -2601,5 +2598,10 @@ int sem_post ( sem_t* sem )
vg_sem_t* vg_sem;
ensure_valgrind("sem_post");
- vg_sem = se_remap(sem);
+ vg_sem = se_lookup(sem);
+ if(!vg_sem) {
+ pthread_error("sem_post: semaphore overwritten or not initialized");
+ *(__errno_location()) = EINVAL;
+ return -1;
+ }
res = __pthread_mutex_lock(&vg_sem->se_mx);
my_assert(res == 0);
@@ -2622,5 +2624,10 @@ int sem_trywait ( sem_t* sem )
vg_sem_t* vg_sem;
ensure_valgrind("sem_trywait");
- vg_sem = se_remap(sem);
+ vg_sem = se_lookup(sem);
+ if(!vg_sem) {
+ pthread_error("sem_trywait: semaphore overwritten or not initialized");
+ *(__errno_location()) = EINVAL;
+ return -1;
+ }
res = __pthread_mutex_lock(&vg_sem->se_mx);
my_assert(res == 0);
@@ -2643,5 +2650,10 @@ int sem_getvalue(sem_t* sem, int * sval)
vg_sem_t* vg_sem;
ensure_valgrind("sem_getvalue");
- vg_sem = se_remap(sem);
+ vg_sem = se_lookup(sem);
+ if(!vg_sem) {
+ pthread_error("sem_getvalue: semaphore overwritten or not initialized");
+ *(__errno_location()) = EINVAL;
+ return -1;
+ }
res = __pthread_mutex_lock(&vg_sem->se_mx);
my_assert(res == 0);
@@ -2659,5 +2671,10 @@ int sem_destroy(sem_t * sem)
int res;
ensure_valgrind("sem_destroy");
- vg_sem = se_remap(sem);
+ vg_sem = se_lookup(sem);
+ if(!vg_sem) {
+ pthread_error("sem_destroy: semaphore overwritten or not initialized");
+ *(__errno_location()) = EINVAL;
+ return -1;
+ }
res = __pthread_mutex_lock(&vg_sem->se_mx);
my_assert(res == 0);
@@ -2675,5 +2692,5 @@ int sem_destroy(sem_t * sem)
res = pthread_mutex_destroy(&vg_sem->se_mx);
my_assert(res == 0);
- se_unmap(sem);
+ se_free(sem);
return 0;
}
@@ -2685,5 +2702,10 @@ int sem_timedwait(sem_t* sem, const stru
vg_sem_t* vg_sem;
ensure_valgrind("sem_timedwait");
- vg_sem = se_remap(sem);
+ vg_sem = se_lookup(sem);
+ if(!vg_sem) {
+ pthread_error("sem_timedwait: semaphore overwritten or not initialized");
+ *(__errno_location()) = EINVAL;
+ return -1;
+ }
res = __pthread_mutex_lock(&vg_sem->se_mx);
my_assert(res == 0);
--- valgrind/none/tests/Makefile.am #1.33:1.34
@@ -46,4 +46,5 @@
seg_override.stderr.exp \
seg_override.stdout.exp seg_override.vgtest \
+ semlimit.stderr.exp semlimit.stdout.exp semlimit.vgtest \
susphello.stdout.exp susphello.stderr.exp susphello.vgtest \
sha1_test.stderr.exp sha1_test.vgtest \
@@ -62,6 +63,6 @@
fucomip $(INSN_TESTS) \
int munmap_exe map_unmap mremap rcl_assert \
- rcrl readline1 resolv seg_override sha1_test shortpush shorts smc1 \
- susphello pth_blockedsig pushpopseg \
+ rcrl readline1 resolv seg_override semlimit sha1_test \
+ shortpush shorts smc1 susphello pth_blockedsig pushpopseg \
syscall-restart1 syscall-restart2 system \
coolo_sigaction gxx304 yield
@@ -109,4 +110,6 @@
resolv_SOURCES = resolv.c
seg_override_SOURCES = seg_override.c
+semlimit_SOURCES = semlimit.c
+semlimit_LDADD = -lpthread
smc1_SOURCES = smc1.c
sha1_test_SOURCES = sha1_test.c
|
|
From: Tom H. <th...@cy...> - 2004-03-23 19:52:09
|
CVS commit by thughes: Added some extra .cvsignore entries. M +1 -0 .cvsignore 1.7 M +2 -0 none/tests/.cvsignore 1.14 --- valgrind/.cvsignore #1.6:1.7 @@ -18,4 +18,5 @@ cachegrind.out.* autom4te.cache +autom4te-*.cache valgrind.pc .in_place --- valgrind/none/tests/.cvsignore #1.13:1.14 @@ -41,8 +41,10 @@ resolv seg_override +semlimit sha1_test shortpush shorts smc1 +susphello syscall-restart1 syscall-restart2 |
|
From: Tom H. <th...@cy...> - 2004-03-27 18:02:42
|
CVS commit by thughes:
Extended instruction test system to handle x87 floating point instructions
and started working on adding tests for the x87 instruction set.
A addrcheck/tests/insn_fpu.stderr.exp 1.1
A addrcheck/tests/insn_fpu.stdout.exp 1.1
A addrcheck/tests/insn_fpu.vgtest 1.1
A cachegrind/tests/insn_fpu.stderr.exp 1.1
A cachegrind/tests/insn_fpu.stdout.exp 1.1
A cachegrind/tests/insn_fpu.vgtest 1.1
A helgrind/tests/insn_fpu.stderr.exp 1.1
A helgrind/tests/insn_fpu.stdout.exp 1.1
A helgrind/tests/insn_fpu.vgtest 1.1
A memcheck/tests/insn_fpu.stderr.exp 1.1
A memcheck/tests/insn_fpu.stdout.exp 1.1
A memcheck/tests/insn_fpu.vgtest 1.1
A none/tests/insn_fpu.def 1.1
A none/tests/insn_fpu.stderr.exp 1.1
A none/tests/insn_fpu.stdout.exp 1.1
A none/tests/insn_fpu.vgtest 1.1
M +1 -1 addrcheck/tests/Makefile.am 1.7
M +1 -1 cachegrind/tests/Makefile.am 1.12
M +1 -1 helgrind/tests/Makefile.am 1.7
M +1 -1 memcheck/tests/Makefile.am 1.34
M +3 -1 none/tests/Makefile.am 1.35
M +224 -12 none/tests/gen_insn_test.pl 1.5
M +4 -1 tests/cputest.c 1.3
--- valgrind/addrcheck/tests/Makefile.am #1.6:1.7
@@ -1,5 +1,5 @@
noinst_SCRIPTS = filter_stderr
-INSN_TESTS=insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
+INSN_TESTS=insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
EXTRA_DIST = $(noinst_SCRIPTS) \
--- valgrind/cachegrind/tests/Makefile.am #1.11:1.12
@@ -1,5 +1,5 @@
noinst_SCRIPTS = filter_stderr filter_cachesim_discards
-INSN_TESTS=insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
+INSN_TESTS=insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
EXTRA_DIST = $(noinst_SCRIPTS) \
--- valgrind/helgrind/tests/Makefile.am #1.6:1.7
@@ -1,5 +1,5 @@
noinst_SCRIPTS = filter_stderr
-INSN_TESTS=insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
+INSN_TESTS=insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
EXTRA_DIST = $(noinst_SCRIPTS) \
--- valgrind/memcheck/tests/Makefile.am #1.33:1.34
@@ -8,5 +8,5 @@
filter_tronical
-INSN_TESTS=insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
+INSN_TESTS=insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
EXTRA_DIST = $(noinst_SCRIPTS) \
--- valgrind/none/tests/Makefile.am #1.34:1.35
@@ -2,5 +2,5 @@
CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
-INSN_TESTS=insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
+INSN_TESTS=insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
EXTRA_DIST = $(noinst_SCRIPTS) \
@@ -90,4 +90,6 @@
insn_basic_SOURCES = insn_basic.def
insn_basic_LDADD = -lm
+insn_fpu_SOURCES = insn_fpu.def
+insn_fpu_LDADD = -lm
insn_cmov_SOURCES = insn_cmov.def
insn_cmov_LDADD = -lm
--- valgrind/none/tests/gen_insn_test.pl #1.4:1.5
@@ -8,12 +8,14 @@
r16 => "reg16_t",
r32 => "reg32_t",
- mm => "mm_reg_t",
- xmm => "xmm_reg_t",
+ mm => "reg64_t",
+ xmm => "reg128_t",
m8 => "reg8_t",
m16 => "reg16_t",
m32 => "reg32_t",
- m64 => "mm_reg_t",
- m128 => "xmm_reg_t",
- eflags => "reg32_t"
+ m64 => "reg64_t",
+ m128 => "reg128_t",
+ eflags => "reg32_t",
+ st => "reg64_t",
+ fpusw => "reg16_t"
);
@@ -52,5 +54,7 @@
bh => 5,
ch => 6,
- dh => 7
+ dh => 7,
+ st0 => 0, st1 => 1, st2 => 2, st3 => 3,
+ st4 => 4, st5 => 5, st6 => 6, st7 => 7
);
@@ -113,5 +117,5 @@
float ps[2];
double pd[1];
-} mm_reg_t __attribute__ ((aligned (8)));
+} reg64_t __attribute__ ((aligned (8)));
typedef union {
@@ -126,5 +130,5 @@
float ps[4];
double pd[2];
-} xmm_reg_t __attribute__ ((aligned (16)));
+} reg128_t __attribute__ ((aligned (16)));
static sigjmp_buf catchpoint;
@@ -185,4 +189,5 @@
my @mmregs = map { "mm$_" } (0 .. 7);
my @xmmregs = map { "xmm$_" } (0 .. 7);
+ my @fpregs = map { "st$_" } (0 .. 7);
my @presets;
@@ -190,5 +195,7 @@
my $eflagsmask;
my $eflagsset;
-
+ my $fpuswmask;
+ my $fpuswset;
+
foreach my $preset (split(/\s+/, $presets))
{
@@ -230,4 +237,41 @@
$presetc++;
}
+ elsif ($preset =~ /^st([0-9]+)\.(ps|pd)\[([^\]]+)\]$/)
+ {
+ my $name = "preset$presetc";
+ my $type = "st";
+ my $regnum = $1;
+ my $register = $fpregs[$regnum];
+ my $subtype = $2;
+ my @values = split(/,/, $3);
+
+ die "Register st$1 already used" unless defined($register);
+
+ my $preset = {
+ name => $name,
+ type => $type,
+ subtype => $subtype,
+ register => $register
+ };
+
+ delete($fpregs[$regnum]);
+
+ push @presets, $preset;
+
+ print qq| $ArgTypes{$type} $name = \{ .$subtype = \{|;
+
+ my $valuec = 0;
+
+ foreach my $value (@values)
+ {
+ print qq|,| if $valuec > 0;
+ print qq| $value$SubTypeSuffixes{$subtype}|;
+ $valuec++;
+ }
+
+ print qq| \} \};\n|;
+
+ $presetc++;
+ }
elsif ($preset =~ /^(eflags)\[([^\]]+)\]$/)
{
@@ -241,4 +285,15 @@
$eflagsset = sprintf "0x%x", $values[1];
}
+ elsif ($preset =~ /^(fpusw)\[([^\]]+)\]$/)
+ {
+ my $type = $1;
+ my @values = split(/,/, $2);
+
+ $values[0] = oct($values[0]) if $values[0] =~ /^0/;
+ $values[1] = oct($values[1]) if $values[1] =~ /^0/;
+
+ $fpuswmask = sprintf "0x%x", ~$values[0];
+ $fpuswset = sprintf "0x%x", $values[1];
+ }
else
{
@@ -291,4 +346,41 @@
print qq| \} \};\n|;
}
+ elsif ($arg =~ /^st([0-9]+)\.(ps|pd)\[([^\]]+)\]$/)
+ {
+ my $type = "st";
+ my $regnum = $1;
+ my $register = $fpregs[$regnum] if defined($regnum);
+ my $subtype = $2;
+ my @values = split(/,/, $3);
+
+ die "Register st$1 already used" if defined($regnum) && !defined($register);
+
+ my $arg = {
+ name => $name,
+ type => $type,
+ subtype => $subtype
+ };
+
+ if (defined($register))
+ {
+ $arg->{register} = $register;
+ delete($fpregs[$regnum]);
+ }
+
+ push @args, $arg;
+
+ print qq| $ArgTypes{$type} $name = \{ .$subtype = \{|;
+
+ my $valuec = 0;
+
+ foreach my $value (@values)
+ {
+ print qq|,| if $valuec > 0;
+ print qq| $value$SubTypeSuffixes{$subtype}|;
+ $valuec++;
+ }
+
+ print qq| \} \};\n|;
+ }
elsif ($arg =~ /^(imm8|imm16|imm32)\[([^\]]+)\]$/)
{
@@ -330,4 +422,11 @@
$arg->{register} = shift @xmmregs;
}
+ elsif ($arg->{type} =~ /^st$/)
+ {
+ while (!exists($arg->{register}) || !defined($arg->{register}))
+ {
+ $arg->{register} = shift @fpregs;
+ }
+ }
}
@@ -384,4 +483,23 @@
print qq| $ArgTypes{$type} $name;\n|;
}
+ elsif ($result =~ /^(st[0-9]+)\.(ps|pd)\[([^\]]+)\]$/)
+ {
+ my $register = $1;
+ my $type = "st";
+ my $subtype = $2;
+ my @values = split(/,/, $3);
+
+ my $result = {
+ name => $name,
+ type => $type,
+ subtype => $subtype,
+ register => $register,
+ values => [ @values ]
+ };
+
+ push @results, $result;
+
+ print qq| $ArgTypes{$type} $name;\n|;
+ }
elsif ($result =~ /^eflags\[([^\]]+)\]$/)
{
@@ -408,4 +526,28 @@
}
}
+ elsif ($result =~ /^fpusw\[([^\]]+)\]$/)
+ {
+ my @values = split(/,/, $1);
+
+ $values[0] = oct($values[0]) if $values[0] =~ /^0/;
+ $values[1] = oct($values[1]) if $values[1] =~ /^0/;
+
+ my $result = {
+ name => $name,
+ type => "fpusw",
+ subtype => "ud",
+ values => [ map { sprintf "0x%x", $_ } @values ]
+ };
+
+ push @results, $result;
+
+ print qq| $ArgTypes{fpusw} $name;\n|;
+
+ if (!defined($fpuswmask) && !defined($fpuswset))
+ {
+ $fpuswmask = sprintf "0x%x", ~$values[0];
+ $fpuswset = sprintf "0x%x", $values[0] & ~$values[1];
+ }
+ }
else
{
@@ -420,5 +562,5 @@
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|eflags)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|flags|fpusw)$/)
{
$result->{argnum} = $argnum++;
@@ -451,4 +593,6 @@
print qq| \"fsave %$stateargnum\\n\"\n|;
+ my @fpargs;
+
foreach my $arg (@presets, @args)
{
@@ -474,6 +618,29 @@
print qq| \"movhps 8%$arg->{argnum}, %%$arg->{register}\\n\"\n|;
}
+ elsif ($arg->{type} eq "st")
+ {
+ $fpargs[$RegNums{$arg->{register}}] = $arg;
+ }
}
+ foreach my $arg (reverse @fpargs)
+ {
+ if (defined($arg))
+ {
+ if ($arg->{subtype} eq "ps")
+ {
+ print qq| \"flds %$arg->{argnum}\\n\"\n|;
+ }
+ elsif ($arg->{subtype} eq "pd")
+ {
+ print qq| \"fldl %$arg->{argnum}\\n\"\n|;
+ }
+ }
+ else
+ {
+ print qq| \"fldz\\n\"\n|;
+ }
+ }
+
if (defined($eflagsmask) || defined($eflagsset))
{
@@ -496,4 +663,12 @@
print qq|$prefix%%$arg->{register}|;
}
+ elsif ($arg->{type} =~ /^st$/)
+ {
+ my $register = $arg->{register};
+
+ $register =~ s/st(\d+)/st\($1\)/;
+
+ print qq|$prefix%%$register|;
+ }
elsif ($arg->{type} =~ /^(m(8|16|32|64|128))$/)
{
@@ -517,4 +692,6 @@
print qq|\\n\"\n|;
+ my @fpresults;
+
foreach my $result (@results)
{
@@ -540,4 +717,8 @@
print qq| \"movhps %%$result->{register}, 8%$result->{argnum}\\n\"\n|;
}
+ elsif ($result->{type} eq "st")
+ {
+ $fpresults[$RegNums{$result->{register}}] = $result;
+ }
elsif ($result->{type} eq "eflags")
{
@@ -545,4 +726,27 @@
print qq| \"popl %$result->{argnum}\\n\"\n|;
}
+ elsif ($result->{type} eq "fpusw")
+ {
+ print qq| \"fstsw %$result->{argnum}\\n\"\n|;
+ }
+ }
+
+ foreach my $result (@fpresults)
+ {
+ if (defined($result))
+ {
+ if ($result->{subtype} eq "ps")
+ {
+ print qq| \"fstps %$result->{argnum}\\n\"\n|;
+ }
+ elsif ($result->{subtype} eq "pd")
+ {
+ print qq| \"fstpl %$result->{argnum}\\n\"\n|;
+ }
+ }
+ else
+ {
+ print qq| \"fincstp\\n\"\n|;
+ }
}
@@ -555,5 +759,5 @@
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|eflags)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpusw)$/)
{
print qq|$prefix\"=m\" \($result->{name}\)|;
@@ -590,5 +794,5 @@
foreach my $arg (@presets, @args)
{
- if ($arg->{register})
+ if ($arg->{register} && $arg->{type} ne "st")
{
print qq|$prefix\"$arg->{register}\"|;
@@ -617,4 +821,8 @@
print qq|${prefix}\($result->{name}.ud[0] & $values[0]UL\) == $values[1]UL|;
}
+ elsif ($type eq "fpusw")
+ {
+ print qq|${prefix}\($result->{name}.uw[0] & $values[0]\) == $values[1]|;
+ }
else
{
@@ -660,4 +868,8 @@
print qq| printf(" eflags & 0x%lx = 0x%lx (expected 0x%lx)\\n", $values[0]UL, $result->{name}.ud\[0\] & $values[0]UL, $values[1]UL);\n|;
}
+ elsif ($type eq "fpusw")
+ {
+ print qq| printf(" fpusw & 0x%x = 0x%x (expected 0x%x)\\n", $values[0], $result->{name}.uw\[0\] & $values[0], $values[1]);\n|;
+ }
else
{
--- valgrind/tests/cputest.c #1.2:1.3
@@ -24,5 +24,8 @@ int main(int argc, char **argv)
if ( argc == 2 ) {
- if ( strcmp( argv[1], "cmov" ) == 0 ) {
+ if ( strcmp( argv[1], "fpu" ) == 0 ) {
+ level = 1;
+ mask = 1 << 0;
+ } else if ( strcmp( argv[1], "cmov" ) == 0 ) {
level = 1;
mask = 1 << 15;
|
|
From: Tom H. <th...@cy...> - 2004-03-28 00:31:07
|
CVS commit by thughes: Added tests for floating point multiple and divide instructions. M +168 -0 addrcheck/tests/insn_fpu.stdout.exp 1.2 M +168 -0 cachegrind/tests/insn_fpu.stdout.exp 1.2 M +168 -0 helgrind/tests/insn_fpu.stdout.exp 1.2 M +168 -0 memcheck/tests/insn_fpu.stdout.exp 1.2 M +168 -0 none/tests/insn_fpu.def 1.2 M +168 -0 none/tests/insn_fpu.stdout.exp 1.2 --- valgrind/addrcheck/tests/insn_fpu.stdout.exp #1.1:1.2 @@ -63,4 +63,116 @@ fchs_3 ... ok fchs_4 ... ok +fdivs_1 ... ok +fdivs_2 ... ok +fdivs_3 ... ok +fdivs_4 ... ok +fdivl_1 ... ok +fdivl_2 ... ok +fdivl_3 ... ok +fdivl_4 ... ok +fdiv_1 ... ok +fdiv_2 ... ok +fdiv_3 ... ok +fdiv_4 ... ok +fdiv_5 ... ok +fdiv_6 ... ok +fdiv_7 ... ok +fdiv_8 ... ok +fdiv_9 ... ok +fdiv_10 ... ok +fdiv_11 ... ok +fdiv_12 ... ok +fdiv_13 ... ok +fdiv_14 ... ok +fdiv_15 ... ok +fdiv_16 ... ok +fdivp_1 ... ok +fdivp_2 ... ok +fdivp_3 ... ok +fdivp_4 ... ok +fdivp_5 ... ok +fdivp_6 ... ok +fdivp_7 ... ok +fdivp_8 ... ok +fdivp_9 ... ok +fdivp_10 ... ok +fdivp_11 ... ok +fdivp_12 ... ok +fdivp_13 ... ok +fdivp_14 ... ok +fdivp_15 ... ok +fdivp_16 ... ok +fidivs_1 ... ok +fidivs_2 ... ok +fidivs_3 ... ok +fidivs_4 ... ok +fidivs_5 ... ok +fidivs_6 ... ok +fidivs_7 ... ok +fidivs_8 ... ok +fidivl_1 ... ok +fidivl_2 ... ok +fidivl_3 ... ok +fidivl_4 ... ok +fidivl_5 ... ok +fidivl_6 ... ok +fidivl_7 ... ok +fidivl_8 ... ok +fdivrs_1 ... ok +fdivrs_2 ... ok +fdivrs_3 ... ok +fdivrs_4 ... ok +fdivrl_1 ... ok +fdivrl_2 ... ok +fdivrl_3 ... ok +fdivrl_4 ... ok +fdivr_1 ... ok +fdivr_2 ... ok +fdivr_3 ... ok +fdivr_4 ... ok +fdivr_5 ... ok +fdivr_6 ... ok +fdivr_7 ... ok +fdivr_8 ... ok +fdivr_9 ... ok +fdivr_10 ... ok +fdivr_11 ... ok +fdivr_12 ... ok +fdivr_13 ... ok +fdivr_14 ... ok +fdivr_15 ... ok +fdivr_16 ... ok +fdivrp_1 ... ok +fdivrp_2 ... ok +fdivrp_3 ... ok +fdivrp_4 ... ok +fdivrp_5 ... ok +fdivrp_6 ... ok +fdivrp_7 ... ok +fdivrp_8 ... ok +fdivrp_9 ... ok +fdivrp_10 ... ok +fdivrp_11 ... ok +fdivrp_12 ... ok +fdivrp_13 ... ok +fdivrp_14 ... ok +fdivrp_15 ... ok +fdivrp_16 ... ok +fidivrs_1 ... ok +fidivrs_2 ... ok +fidivrs_3 ... ok +fidivrs_4 ... ok +fidivrs_5 ... ok +fidivrs_6 ... ok +fidivrs_7 ... ok +fidivrs_8 ... ok +fidivrl_1 ... ok +fidivrl_2 ... ok +fidivrl_3 ... ok +fidivrl_4 ... ok +fidivrl_5 ... ok +fidivrl_6 ... ok +fidivrl_7 ... ok +fidivrl_8 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -70,4 +182,60 @@ fldln2_1 ... ok fldz_1 ... ok +fmuls_1 ... ok +fmuls_2 ... ok +fmuls_3 ... ok +fmuls_4 ... ok +fmull_1 ... ok +fmull_2 ... ok +fmull_3 ... ok +fmull_4 ... ok +fmul_1 ... ok +fmul_2 ... ok +fmul_3 ... ok +fmul_4 ... ok +fmul_5 ... ok +fmul_6 ... ok +fmul_7 ... ok +fmul_8 ... ok +fmul_9 ... ok +fmul_10 ... ok +fmul_11 ... ok +fmul_12 ... ok +fmul_13 ... ok +fmul_14 ... ok +fmul_15 ... ok +fmul_16 ... ok +fmulp_1 ... ok +fmulp_2 ... ok +fmulp_3 ... ok +fmulp_4 ... ok +fmulp_5 ... ok +fmulp_6 ... ok +fmulp_7 ... ok +fmulp_8 ... ok +fmulp_9 ... ok +fmulp_10 ... ok +fmulp_11 ... ok +fmulp_12 ... ok +fmulp_13 ... ok +fmulp_14 ... ok +fmulp_15 ... ok +fmulp_16 ... ok +fimuls_1 ... ok +fimuls_2 ... ok +fimuls_3 ... ok +fimuls_4 ... ok +fimuls_5 ... ok +fimuls_6 ... ok +fimuls_7 ... ok +fimuls_8 ... ok +fimull_1 ... ok +fimull_2 ... ok +fimull_3 ... ok +fimull_4 ... ok +fimull_5 ... ok +fimull_6 ... ok +fimull_7 ... ok +fimull_8 ... ok fsubs_1 ... ok fsubs_2 ... ok --- valgrind/cachegrind/tests/insn_fpu.stdout.exp #1.1:1.2 @@ -63,4 +63,116 @@ fchs_3 ... ok fchs_4 ... ok +fdivs_1 ... ok +fdivs_2 ... ok +fdivs_3 ... ok +fdivs_4 ... ok +fdivl_1 ... ok +fdivl_2 ... ok +fdivl_3 ... ok +fdivl_4 ... ok +fdiv_1 ... ok +fdiv_2 ... ok +fdiv_3 ... ok +fdiv_4 ... ok +fdiv_5 ... ok +fdiv_6 ... ok +fdiv_7 ... ok +fdiv_8 ... ok +fdiv_9 ... ok +fdiv_10 ... ok +fdiv_11 ... ok +fdiv_12 ... ok +fdiv_13 ... ok +fdiv_14 ... ok +fdiv_15 ... ok +fdiv_16 ... ok +fdivp_1 ... ok +fdivp_2 ... ok +fdivp_3 ... ok +fdivp_4 ... ok +fdivp_5 ... ok +fdivp_6 ... ok +fdivp_7 ... ok +fdivp_8 ... ok +fdivp_9 ... ok +fdivp_10 ... ok +fdivp_11 ... ok +fdivp_12 ... ok +fdivp_13 ... ok +fdivp_14 ... ok +fdivp_15 ... ok +fdivp_16 ... ok +fidivs_1 ... ok +fidivs_2 ... ok +fidivs_3 ... ok +fidivs_4 ... ok +fidivs_5 ... ok +fidivs_6 ... ok +fidivs_7 ... ok +fidivs_8 ... ok +fidivl_1 ... ok +fidivl_2 ... ok +fidivl_3 ... ok +fidivl_4 ... ok +fidivl_5 ... ok +fidivl_6 ... ok +fidivl_7 ... ok +fidivl_8 ... ok +fdivrs_1 ... ok +fdivrs_2 ... ok +fdivrs_3 ... ok +fdivrs_4 ... ok +fdivrl_1 ... ok +fdivrl_2 ... ok +fdivrl_3 ... ok +fdivrl_4 ... ok +fdivr_1 ... ok +fdivr_2 ... ok +fdivr_3 ... ok +fdivr_4 ... ok +fdivr_5 ... ok +fdivr_6 ... ok +fdivr_7 ... ok +fdivr_8 ... ok +fdivr_9 ... ok +fdivr_10 ... ok +fdivr_11 ... ok +fdivr_12 ... ok +fdivr_13 ... ok +fdivr_14 ... ok +fdivr_15 ... ok +fdivr_16 ... ok +fdivrp_1 ... ok +fdivrp_2 ... ok +fdivrp_3 ... ok +fdivrp_4 ... ok +fdivrp_5 ... ok +fdivrp_6 ... ok +fdivrp_7 ... ok +fdivrp_8 ... ok +fdivrp_9 ... ok +fdivrp_10 ... ok +fdivrp_11 ... ok +fdivrp_12 ... ok +fdivrp_13 ... ok +fdivrp_14 ... ok +fdivrp_15 ... ok +fdivrp_16 ... ok +fidivrs_1 ... ok +fidivrs_2 ... ok +fidivrs_3 ... ok +fidivrs_4 ... ok +fidivrs_5 ... ok +fidivrs_6 ... ok +fidivrs_7 ... ok +fidivrs_8 ... ok +fidivrl_1 ... ok +fidivrl_2 ... ok +fidivrl_3 ... ok +fidivrl_4 ... ok +fidivrl_5 ... ok +fidivrl_6 ... ok +fidivrl_7 ... ok +fidivrl_8 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -70,4 +182,60 @@ fldln2_1 ... ok fldz_1 ... ok +fmuls_1 ... ok +fmuls_2 ... ok +fmuls_3 ... ok +fmuls_4 ... ok +fmull_1 ... ok +fmull_2 ... ok +fmull_3 ... ok +fmull_4 ... ok +fmul_1 ... ok +fmul_2 ... ok +fmul_3 ... ok +fmul_4 ... ok +fmul_5 ... ok +fmul_6 ... ok +fmul_7 ... ok +fmul_8 ... ok +fmul_9 ... ok +fmul_10 ... ok +fmul_11 ... ok +fmul_12 ... ok +fmul_13 ... ok +fmul_14 ... ok +fmul_15 ... ok +fmul_16 ... ok +fmulp_1 ... ok +fmulp_2 ... ok +fmulp_3 ... ok +fmulp_4 ... ok +fmulp_5 ... ok +fmulp_6 ... ok +fmulp_7 ... ok +fmulp_8 ... ok +fmulp_9 ... ok +fmulp_10 ... ok +fmulp_11 ... ok +fmulp_12 ... ok +fmulp_13 ... ok +fmulp_14 ... ok +fmulp_15 ... ok +fmulp_16 ... ok +fimuls_1 ... ok +fimuls_2 ... ok +fimuls_3 ... ok +fimuls_4 ... ok +fimuls_5 ... ok +fimuls_6 ... ok +fimuls_7 ... ok +fimuls_8 ... ok +fimull_1 ... ok +fimull_2 ... ok +fimull_3 ... ok +fimull_4 ... ok +fimull_5 ... ok +fimull_6 ... ok +fimull_7 ... ok +fimull_8 ... ok fsubs_1 ... ok fsubs_2 ... ok --- valgrind/helgrind/tests/insn_fpu.stdout.exp #1.1:1.2 @@ -63,4 +63,116 @@ fchs_3 ... ok fchs_4 ... ok +fdivs_1 ... ok +fdivs_2 ... ok +fdivs_3 ... ok +fdivs_4 ... ok +fdivl_1 ... ok +fdivl_2 ... ok +fdivl_3 ... ok +fdivl_4 ... ok +fdiv_1 ... ok +fdiv_2 ... ok +fdiv_3 ... ok +fdiv_4 ... ok +fdiv_5 ... ok +fdiv_6 ... ok +fdiv_7 ... ok +fdiv_8 ... ok +fdiv_9 ... ok +fdiv_10 ... ok +fdiv_11 ... ok +fdiv_12 ... ok +fdiv_13 ... ok +fdiv_14 ... ok +fdiv_15 ... ok +fdiv_16 ... ok +fdivp_1 ... ok +fdivp_2 ... ok +fdivp_3 ... ok +fdivp_4 ... ok +fdivp_5 ... ok +fdivp_6 ... ok +fdivp_7 ... ok +fdivp_8 ... ok +fdivp_9 ... ok +fdivp_10 ... ok +fdivp_11 ... ok +fdivp_12 ... ok +fdivp_13 ... ok +fdivp_14 ... ok +fdivp_15 ... ok +fdivp_16 ... ok +fidivs_1 ... ok +fidivs_2 ... ok +fidivs_3 ... ok +fidivs_4 ... ok +fidivs_5 ... ok +fidivs_6 ... ok +fidivs_7 ... ok +fidivs_8 ... ok +fidivl_1 ... ok +fidivl_2 ... ok +fidivl_3 ... ok +fidivl_4 ... ok +fidivl_5 ... ok +fidivl_6 ... ok +fidivl_7 ... ok +fidivl_8 ... ok +fdivrs_1 ... ok +fdivrs_2 ... ok +fdivrs_3 ... ok +fdivrs_4 ... ok +fdivrl_1 ... ok +fdivrl_2 ... ok +fdivrl_3 ... ok +fdivrl_4 ... ok +fdivr_1 ... ok +fdivr_2 ... ok +fdivr_3 ... ok +fdivr_4 ... ok +fdivr_5 ... ok +fdivr_6 ... ok +fdivr_7 ... ok +fdivr_8 ... ok +fdivr_9 ... ok +fdivr_10 ... ok +fdivr_11 ... ok +fdivr_12 ... ok +fdivr_13 ... ok +fdivr_14 ... ok +fdivr_15 ... ok +fdivr_16 ... ok +fdivrp_1 ... ok +fdivrp_2 ... ok +fdivrp_3 ... ok +fdivrp_4 ... ok +fdivrp_5 ... ok +fdivrp_6 ... ok +fdivrp_7 ... ok +fdivrp_8 ... ok +fdivrp_9 ... ok +fdivrp_10 ... ok +fdivrp_11 ... ok +fdivrp_12 ... ok +fdivrp_13 ... ok +fdivrp_14 ... ok +fdivrp_15 ... ok +fdivrp_16 ... ok +fidivrs_1 ... ok +fidivrs_2 ... ok +fidivrs_3 ... ok +fidivrs_4 ... ok +fidivrs_5 ... ok +fidivrs_6 ... ok +fidivrs_7 ... ok +fidivrs_8 ... ok +fidivrl_1 ... ok +fidivrl_2 ... ok +fidivrl_3 ... ok +fidivrl_4 ... ok +fidivrl_5 ... ok +fidivrl_6 ... ok +fidivrl_7 ... ok +fidivrl_8 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -70,4 +182,60 @@ fldln2_1 ... ok fldz_1 ... ok +fmuls_1 ... ok +fmuls_2 ... ok +fmuls_3 ... ok +fmuls_4 ... ok +fmull_1 ... ok +fmull_2 ... ok +fmull_3 ... ok +fmull_4 ... ok +fmul_1 ... ok +fmul_2 ... ok +fmul_3 ... ok +fmul_4 ... ok +fmul_5 ... ok +fmul_6 ... ok +fmul_7 ... ok +fmul_8 ... ok +fmul_9 ... ok +fmul_10 ... ok +fmul_11 ... ok +fmul_12 ... ok +fmul_13 ... ok +fmul_14 ... ok +fmul_15 ... ok +fmul_16 ... ok +fmulp_1 ... ok +fmulp_2 ... ok +fmulp_3 ... ok +fmulp_4 ... ok +fmulp_5 ... ok +fmulp_6 ... ok +fmulp_7 ... ok +fmulp_8 ... ok +fmulp_9 ... ok +fmulp_10 ... ok +fmulp_11 ... ok +fmulp_12 ... ok +fmulp_13 ... ok +fmulp_14 ... ok +fmulp_15 ... ok +fmulp_16 ... ok +fimuls_1 ... ok +fimuls_2 ... ok +fimuls_3 ... ok +fimuls_4 ... ok +fimuls_5 ... ok +fimuls_6 ... ok +fimuls_7 ... ok +fimuls_8 ... ok +fimull_1 ... ok +fimull_2 ... ok +fimull_3 ... ok +fimull_4 ... ok +fimull_5 ... ok +fimull_6 ... ok +fimull_7 ... ok +fimull_8 ... ok fsubs_1 ... ok fsubs_2 ... ok --- valgrind/memcheck/tests/insn_fpu.stdout.exp #1.1:1.2 @@ -63,4 +63,116 @@ fchs_3 ... ok fchs_4 ... ok +fdivs_1 ... ok +fdivs_2 ... ok +fdivs_3 ... ok +fdivs_4 ... ok +fdivl_1 ... ok +fdivl_2 ... ok +fdivl_3 ... ok +fdivl_4 ... ok +fdiv_1 ... ok +fdiv_2 ... ok +fdiv_3 ... ok +fdiv_4 ... ok +fdiv_5 ... ok +fdiv_6 ... ok +fdiv_7 ... ok +fdiv_8 ... ok +fdiv_9 ... ok +fdiv_10 ... ok +fdiv_11 ... ok +fdiv_12 ... ok +fdiv_13 ... ok +fdiv_14 ... ok +fdiv_15 ... ok +fdiv_16 ... ok +fdivp_1 ... ok +fdivp_2 ... ok +fdivp_3 ... ok +fdivp_4 ... ok +fdivp_5 ... ok +fdivp_6 ... ok +fdivp_7 ... ok +fdivp_8 ... ok +fdivp_9 ... ok +fdivp_10 ... ok +fdivp_11 ... ok +fdivp_12 ... ok +fdivp_13 ... ok +fdivp_14 ... ok +fdivp_15 ... ok +fdivp_16 ... ok +fidivs_1 ... ok +fidivs_2 ... ok +fidivs_3 ... ok +fidivs_4 ... ok +fidivs_5 ... ok +fidivs_6 ... ok +fidivs_7 ... ok +fidivs_8 ... ok +fidivl_1 ... ok +fidivl_2 ... ok +fidivl_3 ... ok +fidivl_4 ... ok +fidivl_5 ... ok +fidivl_6 ... ok +fidivl_7 ... ok +fidivl_8 ... ok +fdivrs_1 ... ok +fdivrs_2 ... ok +fdivrs_3 ... ok +fdivrs_4 ... ok +fdivrl_1 ... ok +fdivrl_2 ... ok +fdivrl_3 ... ok +fdivrl_4 ... ok +fdivr_1 ... ok +fdivr_2 ... ok +fdivr_3 ... ok +fdivr_4 ... ok +fdivr_5 ... ok +fdivr_6 ... ok +fdivr_7 ... ok +fdivr_8 ... ok +fdivr_9 ... ok +fdivr_10 ... ok +fdivr_11 ... ok +fdivr_12 ... ok +fdivr_13 ... ok +fdivr_14 ... ok +fdivr_15 ... ok +fdivr_16 ... ok +fdivrp_1 ... ok +fdivrp_2 ... ok +fdivrp_3 ... ok +fdivrp_4 ... ok +fdivrp_5 ... ok +fdivrp_6 ... ok +fdivrp_7 ... ok +fdivrp_8 ... ok +fdivrp_9 ... ok +fdivrp_10 ... ok +fdivrp_11 ... ok +fdivrp_12 ... ok +fdivrp_13 ... ok +fdivrp_14 ... ok +fdivrp_15 ... ok +fdivrp_16 ... ok +fidivrs_1 ... ok +fidivrs_2 ... ok +fidivrs_3 ... ok +fidivrs_4 ... ok +fidivrs_5 ... ok +fidivrs_6 ... ok +fidivrs_7 ... ok +fidivrs_8 ... ok +fidivrl_1 ... ok +fidivrl_2 ... ok +fidivrl_3 ... ok +fidivrl_4 ... ok +fidivrl_5 ... ok +fidivrl_6 ... ok +fidivrl_7 ... ok +fidivrl_8 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -70,4 +182,60 @@ fldln2_1 ... ok fldz_1 ... ok +fmuls_1 ... ok +fmuls_2 ... ok +fmuls_3 ... ok +fmuls_4 ... ok +fmull_1 ... ok +fmull_2 ... ok +fmull_3 ... ok +fmull_4 ... ok +fmul_1 ... ok +fmul_2 ... ok +fmul_3 ... ok +fmul_4 ... ok +fmul_5 ... ok +fmul_6 ... ok +fmul_7 ... ok +fmul_8 ... ok +fmul_9 ... ok +fmul_10 ... ok +fmul_11 ... ok +fmul_12 ... ok +fmul_13 ... ok +fmul_14 ... ok +fmul_15 ... ok +fmul_16 ... ok +fmulp_1 ... ok +fmulp_2 ... ok +fmulp_3 ... ok +fmulp_4 ... ok +fmulp_5 ... ok +fmulp_6 ... ok +fmulp_7 ... ok +fmulp_8 ... ok +fmulp_9 ... ok +fmulp_10 ... ok +fmulp_11 ... ok +fmulp_12 ... ok +fmulp_13 ... ok +fmulp_14 ... ok +fmulp_15 ... ok +fmulp_16 ... ok +fimuls_1 ... ok +fimuls_2 ... ok +fimuls_3 ... ok +fimuls_4 ... ok +fimuls_5 ... ok +fimuls_6 ... ok +fimuls_7 ... ok +fimuls_8 ... ok +fimull_1 ... ok +fimull_2 ... ok +fimull_3 ... ok +fimull_4 ... ok +fimull_5 ... ok +fimull_6 ... ok +fimull_7 ... ok +fimull_8 ... ok fsubs_1 ... ok fsubs_2 ... ok --- valgrind/none/tests/insn_fpu.def #1.1:1.2 @@ -63,4 +63,116 @@ fchs st0.pd[12345678.87654321] : => st0.pd[-12345678.87654321] fchs st0.pd[-12345678.87654321] : => st0.pd[12345678.87654321] +fdivs st0.ps[1234.5678] : m32.ps[8765.4321] => st0.ps[0.140845058853402] +fdivs st0.ps[-1234.5678] : m32.ps[8765.4321] => st0.ps[-0.140845058853402] +fdivs st0.ps[1234.5678] : m32.ps[-8765.4321] => st0.ps[-0.140845058853402] +fdivs st0.ps[-1234.5678] : m32.ps[-8765.4321] => st0.ps[0.140845058853402] +fdivl st0.pd[1234567.7654321] : m64.pd[7654321.1234567] => st0.pd[0.16129030197711] +fdivl st0.pd[-1234567.7654321] : m64.pd[7654321.1234567] => st0.pd[-0.16129030197711] +fdivl st0.pd[1234567.7654321] : m64.pd[-7654321.1234567] => st0.pd[-0.16129030197711] +fdivl st0.pd[-1234567.7654321] : m64.pd[-7654321.1234567] => st0.pd[0.16129030197711] +fdiv st0.ps[1234.5678] st2.ps[8765.4321] => st2.ps[0.140845058853402] +fdiv st0.ps[-1234.5678] st2.ps[8765.4321] => st2.ps[-0.140845058853402] +fdiv st0.ps[1234.5678] st2.ps[-8765.4321] => st2.ps[-0.140845058853402] +fdiv st0.ps[-1234.5678] st2.ps[-8765.4321] => st2.ps[0.140845058853402] +fdiv st0.pd[1234567.7654321] st2.pd[7654321.1234567] => st2.pd[0.16129030197711] +fdiv st0.pd[-1234567.7654321] st2.pd[7654321.1234567] => st2.pd[-0.16129030197711] +fdiv st0.pd[1234567.7654321] st2.pd[-7654321.1234567] => st2.pd[-0.16129030197711] +fdiv st0.pd[-1234567.7654321] st2.pd[-7654321.1234567] => st2.pd[0.16129030197711] +fdiv st2.ps[1234.5678] st0.ps[8765.4321] => st0.ps[7.10000058320005] +fdiv st2.ps[-1234.5678] st0.ps[8765.4321] => st0.ps[-7.10000058320005] +fdiv st2.ps[1234.5678] st0.ps[-8765.4321] => st0.ps[-7.10000058320005] +fdiv st2.ps[-1234.5678] st0.ps[-8765.4321] => st0.ps[7.10000058320005] +fdiv st2.pd[1234567.7654321] st0.pd[7654321.1234567] => st0.pd[6.20000079200001] +fdiv st2.pd[-1234567.7654321] st0.pd[7654321.1234567] => st0.pd[-6.20000079200001] +fdiv st2.pd[1234567.7654321] st0.pd[-7654321.1234567] => st0.pd[-6.20000079200001] +fdiv st2.pd[-1234567.7654321] st0.pd[-7654321.1234567] => st0.pd[6.20000079200001] +fdivp st0.ps[1234.5678] st2.ps[8765.4321] => st1.ps[0.140845058853402] +fdivp st0.ps[-1234.5678] st2.ps[8765.4321] => st1.ps[-0.140845058853402] +fdivp st0.ps[1234.5678] st2.ps[-8765.4321] => st1.ps[-0.140845058853402] +fdivp st0.ps[-1234.5678] st2.ps[-8765.4321] => st1.ps[0.140845058853402] +fdivp st0.pd[1234567.7654321] st2.pd[7654321.1234567] => st1.pd[0.16129030197711] +fdivp st0.pd[-1234567.7654321] st2.pd[7654321.1234567] => st1.pd[-0.16129030197711] +fdivp st0.pd[1234567.7654321] st2.pd[-7654321.1234567] => st1.pd[-0.16129030197711] +fdivp st0.pd[-1234567.7654321] st2.pd[-7654321.1234567] => st1.pd[0.16129030197711] +fdivp st0.ps[1234.5678] st1.ps[8765.4321] : => st0.ps[0.140845058853402] +fdivp st0.ps[-1234.5678] st1.ps[8765.4321] : => st0.ps[-0.140845058853402] +fdivp st0.ps[1234.5678] st1.ps[-8765.4321] : => st0.ps[-0.140845058853402] +fdivp st0.ps[-1234.5678] st1.ps[-8765.4321] : => st0.ps[0.140845058853402] +fdivp st0.pd[1234567.7654321] st1.pd[7654321.1234567] : => st0.pd[0.16129030197711] +fdivp st0.pd[-1234567.7654321] st1.pd[7654321.1234567] : => st0.pd[-0.16129030197711] +fdivp st0.pd[1234567.7654321] st1.pd[-7654321.1234567] : => st0.pd[-0.16129030197711] +fdivp st0.pd[-1234567.7654321] st1.pd[-7654321.1234567] : => st0.pd[0.16129030197711] +fidivs st0.ps[1234.5678] : m16.sw[4321] => st0.ps[0.285713445961583] +fidivs st0.ps[-1234.5678] : m16.sw[4321] => st0.ps[-0.285713445961583] +fidivs st0.ps[1234.5678] : m16.sw[-4321] => st0.ps[-0.285713445961583] +fidivs st0.ps[-1234.5678] : m16.sw[-4321] => st0.ps[0.285713445961583] +fidivs st0.pd[1234567.7654321] : m16.sw[4321] => st0.pd[285.713437961606] +fidivs st0.pd[-1234567.7654321] : m16.sw[4321] => st0.pd[-285.713437961606] +fidivs st0.pd[1234567.7654321] : m16.sw[-4321] => st0.pd[-285.713437961606] +fidivs st0.pd[-1234567.7654321] : m16.sw[-4321] => st0.pd[285.713437961606] +fidivl st0.ps[1234.5678] : m32.sd[87654321] => st0.ps[0.0000140845058853402] +fidivl st0.ps[-1234.5678] : m32.sd[87654321] => st0.ps[-0.0000140845058853402] +fidivl st0.ps[1234.5678] : m32.sd[-87654321] => st0.ps[-0.0000140845058853402] +fidivl st0.ps[-1234.5678] : m32.sd[-87654321] => st0.ps[0.0000140845058853402] +fidivl st0.pd[1234567.7654321] : m32.sd[654321] => st0.pd[1.88679220968317] +fidivl st0.pd[-1234567.7654321] : m32.sd[654321] => st0.pd[-1.88679220968317] +fidivl st0.pd[1234567.7654321] : m32.sd[-654321] => st0.pd[-1.88679220968317] +fidivl st0.pd[-1234567.7654321] : m32.sd[-654321] => st0.pd[1.88679220968317] +fdivrs st0.ps[1234.5678] : m32.ps[8765.4321] => st0.ps[7.10000058320005] +fdivrs st0.ps[-1234.5678] : m32.ps[8765.4321] => st0.ps[-7.10000058320005] +fdivrs st0.ps[1234.5678] : m32.ps[-8765.4321] => st0.ps[-7.10000058320005] +fdivrs st0.ps[-1234.5678] : m32.ps[-8765.4321] => st0.ps[7.10000058320005] +fdivrl st0.pd[1234567.7654321] : m64.pd[7654321.1234567] => st0.pd[6.20000079200001] +fdivrl st0.pd[-1234567.7654321] : m64.pd[7654321.1234567] => st0.pd[-6.20000079200001] +fdivrl st0.pd[1234567.7654321] : m64.pd[-7654321.1234567] => st0.pd[-6.20000079200001] +fdivrl st0.pd[-1234567.7654321] : m64.pd[-7654321.1234567] => st0.pd[6.20000079200001] +fdivr st0.ps[1234.5678] st2.ps[8765.4321] => st2.ps[7.10000058320005] +fdivr st0.ps[-1234.5678] st2.ps[8765.4321] => st2.ps[-7.10000058320005] +fdivr st0.ps[1234.5678] st2.ps[-8765.4321] => st2.ps[-7.10000058320005] +fdivr st0.ps[-1234.5678] st2.ps[-8765.4321] => st2.ps[7.10000058320005] +fdivr st0.pd[1234567.7654321] st2.pd[7654321.1234567] => st2.pd[6.20000079200001] +fdivr st0.pd[-1234567.7654321] st2.pd[7654321.1234567] => st2.pd[-6.20000079200001] +fdivr st0.pd[1234567.7654321] st2.pd[-7654321.1234567] => st2.pd[-6.20000079200001] +fdivr st0.pd[-1234567.7654321] st2.pd[-7654321.1234567] => st2.pd[6.20000079200001] +fdivr st2.ps[1234.5678] st0.ps[8765.4321] => st0.ps[0.140845058853402] +fdivr st2.ps[-1234.5678] st0.ps[8765.4321] => st0.ps[-0.140845058853402] +fdivr st2.ps[1234.5678] st0.ps[-8765.4321] => st0.ps[-0.140845058853402] +fdivr st2.ps[-1234.5678] st0.ps[-8765.4321] => st0.ps[0.140845058853402] +fdivr st2.pd[1234567.7654321] st0.pd[7654321.1234567] => st0.pd[0.16129030197711] +fdivr st2.pd[-1234567.7654321] st0.pd[7654321.1234567] => st0.pd[-0.16129030197711] +fdivr st2.pd[1234567.7654321] st0.pd[-7654321.1234567] => st0.pd[-0.16129030197711] +fdivr st2.pd[-1234567.7654321] st0.pd[-7654321.1234567] => st0.pd[0.16129030197711] +fdivrp st0.ps[1234.5678] st2.ps[8765.4321] => st1.ps[7.10000058320005] +fdivrp st0.ps[-1234.5678] st2.ps[8765.4321] => st1.ps[-7.10000058320005] +fdivrp st0.ps[1234.5678] st2.ps[-8765.4321] => st1.ps[-7.10000058320005] +fdivrp st0.ps[-1234.5678] st2.ps[-8765.4321] => st1.ps[7.10000058320005] +fdivrp st0.pd[1234567.7654321] st2.pd[7654321.1234567] => st1.pd[6.20000079200001] +fdivrp st0.pd[-1234567.7654321] st2.pd[7654321.1234567] => st1.pd[-6.20000079200001] +fdivrp st0.pd[1234567.7654321] st2.pd[-7654321.1234567] => st1.pd[-6.20000079200001] +fdivrp st0.pd[-1234567.7654321] st2.pd[-7654321.1234567] => st1.pd[6.20000079200001] +fdivrp st0.ps[1234.5678] st1.ps[8765.4321] : => st0.ps[7.10000058320005] +fdivrp st0.ps[-1234.5678] st1.ps[8765.4321] : => st0.ps[-7.10000058320005] +fdivrp st0.ps[1234.5678] st1.ps[-8765.4321] : => st0.ps[-7.10000058320005] +fdivrp st0.ps[-1234.5678] st1.ps[-8765.4321] : => st0.ps[7.10000058320005] +fdivrp st0.pd[1234567.7654321] st1.pd[7654321.1234567] : => st0.pd[6.20000079200001] +fdivrp st0.pd[-1234567.7654321] st1.pd[7654321.1234567] : => st0.pd[-6.20000079200001] +fdivrp st0.pd[1234567.7654321] st1.pd[-7654321.1234567] : => st0.pd[-6.20000079200001] +fdivrp st0.pd[-1234567.7654321] st1.pd[-7654321.1234567] : => st0.pd[6.20000079200001] +fidivrs st0.ps[1234.5678] : m16.sw[4321] => st0.ps[3.50001028700084] +fidivrs st0.ps[-1234.5678] : m16.sw[4321] => st0.ps[-3.50001028700084] +fidivrs st0.ps[1234.5678] : m16.sw[-4321] => st0.ps[-3.50001028700084] +fidivrs st0.ps[-1234.5678] : m16.sw[-4321] => st0.ps[3.50001028700084] +fidivrs st0.pd[1234567.7654321] : m16.sw[4321] => st0.pd[0.00350001038500114] +fidivrs st0.pd[-1234567.7654321] : m16.sw[4321] => st0.pd[-0.00350001038500114] +fidivrs st0.pd[1234567.7654321] : m16.sw[-4321] => st0.pd[-0.00350001038500114] +fidivrs st0.pd[-1234567.7654321] : m16.sw[-4321] => st0.pd[0.00350001038500114] +fidivrl st0.ps[1234.5678] : m32.sd[87654321] => st0.ps[71000.0058320005] +fidivrl st0.ps[-1234.5678] : m32.sd[87654321] => st0.ps[-71000.0058320005] +fidivrl st0.ps[1234.5678] : m32.sd[-87654321] => st0.ps[-71000.0058320005] +fidivrl st0.ps[-1234.5678] : m32.sd[-87654321] => st0.ps[71000.0058320005] +fidivrl st0.pd[1234567.7654321] : m32.sd[654321] => st0.pd[0.530000068300007] +fidivrl st0.pd[-1234567.7654321] : m32.sd[654321] => st0.pd[-0.530000068300007] +fidivrl st0.pd[1234567.7654321] : m32.sd[-654321] => st0.pd[-0.530000068300007] +fidivrl st0.pd[-1234567.7654321] : m32.sd[-654321] => st0.pd[0.530000068300007] fld1 => st0.pd[1.0] fldl2t => st0.pd[3.321928094887362] @@ -70,4 +182,60 @@ fldln2 => st0.pd[0.6931471805599453] fldz => st0.pd[0.0] +fmuls st0.ps[1234.5678] : m32.ps[8765.4321] => st0.ps[10821520.2237464] +fmuls st0.ps[-1234.5678] : m32.ps[8765.4321] => st0.ps[-10821520.2237464] +fmuls st0.ps[1234.5678] : m32.ps[-8765.4321] => st0.ps[-10821520.2237464] +fmuls st0.ps[-1234.5678] : m32.ps[-8765.4321] => st0.ps[10821520.2237464] +fmull st0.pd[1234567.7654321] : m64.pd[7654321.1234567] => st0.pd[9449778125285.66] +fmull st0.pd[-1234567.7654321] : m64.pd[7654321.1234567] => st0.pd[-9449778125285.66] +fmull st0.pd[1234567.7654321] : m64.pd[-7654321.1234567] => st0.pd[-9449778125285.66] +fmull st0.pd[-1234567.7654321] : m64.pd[-7654321.1234567] => st0.pd[9449778125285.66] +fmul st0.ps[1234.5678] st2.ps[8765.4321] => st2.ps[10821520.2237464] +fmul st0.ps[-1234.5678] st2.ps[8765.4321] => st2.ps[-10821520.2237464] +fmul st0.ps[1234.5678] st2.ps[-8765.4321] => st2.ps[-10821520.2237464] +fmul st0.ps[-1234.5678] st2.ps[-8765.4321] => st2.ps[10821520.2237464] +fmul st0.pd[1234567.7654321] st2.pd[7654321.1234567] => st2.pd[9449778125285.66] +fmul st0.pd[-1234567.7654321] st2.pd[7654321.1234567] => st2.pd[-9449778125285.66] +fmul st0.pd[1234567.7654321] st2.pd[-7654321.1234567] => st2.pd[-9449778125285.66] +fmul st0.pd[-1234567.7654321] st2.pd[-7654321.1234567] => st2.pd[9449778125285.66] +fmul st2.ps[1234.5678] st0.ps[8765.4321] => st0.ps[10821520.2237464] +fmul st2.ps[-1234.5678] st0.ps[8765.4321] => st0.ps[-10821520.2237464] +fmul st2.ps[1234.5678] st0.ps[-8765.4321] => st0.ps[-10821520.2237464] +fmul st2.ps[-1234.5678] st0.ps[-8765.4321] => st0.ps[10821520.2237464] +fmul st2.pd[1234567.7654321] st0.pd[7654321.1234567] => st0.pd[9449778125285.66] +fmul st2.pd[-1234567.7654321] st0.pd[7654321.1234567] => st0.pd[-9449778125285.66] +fmul st2.pd[1234567.7654321] st0.pd[-7654321.1234567] => st0.pd[-9449778125285.66] +fmul st2.pd[-1234567.7654321] st0.pd[-7654321.1234567] => st0.pd[9449778125285.66] +fmulp st0.ps[1234.5678] st2.ps[8765.4321] => st1.ps[10821520.2237464] +fmulp st0.ps[-1234.5678] st2.ps[8765.4321] => st1.ps[-10821520.2237464] +fmulp st0.ps[1234.5678] st2.ps[-8765.4321] => st1.ps[-10821520.2237464] +fmulp st0.ps[-1234.5678] st2.ps[-8765.4321] => st1.ps[10821520.2237464] +fmulp st0.pd[1234567.7654321] st2.pd[7654321.1234567] => st1.pd[9449778125285.66] +fmulp st0.pd[-1234567.7654321] st2.pd[7654321.1234567] => st1.pd[-9449778125285.66] +fmulp st0.pd[1234567.7654321] st2.pd[-7654321.1234567] => st1.pd[-9449778125285.66] +fmulp st0.pd[-1234567.7654321] st2.pd[-7654321.1234567] => st1.pd[9449778125285.66] +fmulp st0.ps[1234.5678] st1.ps[8765.4321] : => st0.ps[10821520.2237464] +fmulp st0.ps[-1234.5678] st1.ps[8765.4321] : => st0.ps[-10821520.2237464] +fmulp st0.ps[1234.5678] st1.ps[-8765.4321] : => st0.ps[-10821520.2237464] +fmulp st0.ps[-1234.5678] st1.ps[-8765.4321] : => st0.ps[10821520.2237464] +fmulp st0.pd[1234567.7654321] st1.pd[7654321.1234567] : => st0.pd[9449778125285.66] +fmulp st0.pd[-1234567.7654321] st1.pd[7654321.1234567] : => st0.pd[-9449778125285.66] +fmulp st0.pd[1234567.7654321] st1.pd[-7654321.1234567] : => st0.pd[-9449778125285.66] +fmulp st0.pd[-1234567.7654321] st1.pd[-7654321.1234567] : => st0.pd[9449778125285.66] +fimuls st0.ps[1234.5678] : m16.sw[4321] => st0.ps[5334567.4638] +fimuls st0.ps[-1234.5678] : m16.sw[4321] => st0.ps[-5334567.4638] +fimuls st0.ps[1234.5678] : m16.sw[-4321] => st0.ps[-5334567.4638] +fimuls st0.ps[-1234.5678] : m16.sw[-4321] => st0.ps[5334567.4638] +fimuls st0.pd[1234567.7654321] : m16.sw[4321] => st0.pd[5334567314.4321] +fimuls st0.pd[-1234567.7654321] : m16.sw[4321] => st0.pd[-5334567314.4321] +fimuls st0.pd[1234567.7654321] : m16.sw[-4321] => st0.pd[-5334567314.4321] +fimuls st0.pd[-1234567.7654321] : m16.sw[-4321] => st0.pd[5334567314.4321] +fimull st0.ps[1234.5678] : m32.sd[87654321] => st0.ps[108215202237.464] +fimull st0.ps[-1234.5678] : m32.sd[87654321] => st0.ps[-108215202237.464] +fimull st0.ps[1234.5678] : m32.sd[-87654321] => st0.ps[-108215202237.464] +fimull st0.ps[-1234.5678] : m32.sd[-87654321] => st0.ps[108215202237.464] +fimull st0.pd[1234567.7654321] : m32.sd[654321] => st0.pd[807803614845.297] +fimull st0.pd[-1234567.7654321] : m32.sd[654321] => st0.pd[-807803614845.297] +fimull st0.pd[1234567.7654321] : m32.sd[-654321] => st0.pd[-807803614845.297] +fimull st0.pd[-1234567.7654321] : m32.sd[-654321] => st0.pd[807803614845.297] fsubs st0.ps[1234.5678] : m32.ps[8765.4321] => st0.ps[-7530.8643] fsubs st0.ps[-1234.5678] : m32.ps[8765.4321] => st0.ps[-9999.9990] --- valgrind/none/tests/insn_fpu.stdout.exp #1.1:1.2 @@ -63,4 +63,116 @@ fchs_3 ... ok fchs_4 ... ok +fdivs_1 ... ok +fdivs_2 ... ok +fdivs_3 ... ok +fdivs_4 ... ok +fdivl_1 ... ok +fdivl_2 ... ok +fdivl_3 ... ok +fdivl_4 ... ok +fdiv_1 ... ok +fdiv_2 ... ok +fdiv_3 ... ok +fdiv_4 ... ok +fdiv_5 ... ok +fdiv_6 ... ok +fdiv_7 ... ok +fdiv_8 ... ok +fdiv_9 ... ok +fdiv_10 ... ok +fdiv_11 ... ok +fdiv_12 ... ok +fdiv_13 ... ok +fdiv_14 ... ok +fdiv_15 ... ok +fdiv_16 ... ok +fdivp_1 ... ok +fdivp_2 ... ok +fdivp_3 ... ok +fdivp_4 ... ok +fdivp_5 ... ok +fdivp_6 ... ok +fdivp_7 ... ok +fdivp_8 ... ok +fdivp_9 ... ok +fdivp_10 ... ok +fdivp_11 ... ok +fdivp_12 ... ok +fdivp_13 ... ok +fdivp_14 ... ok +fdivp_15 ... ok +fdivp_16 ... ok +fidivs_1 ... ok +fidivs_2 ... ok +fidivs_3 ... ok +fidivs_4 ... ok +fidivs_5 ... ok +fidivs_6 ... ok +fidivs_7 ... ok +fidivs_8 ... ok +fidivl_1 ... ok +fidivl_2 ... ok +fidivl_3 ... ok +fidivl_4 ... ok +fidivl_5 ... ok +fidivl_6 ... ok +fidivl_7 ... ok +fidivl_8 ... ok +fdivrs_1 ... ok +fdivrs_2 ... ok +fdivrs_3 ... ok +fdivrs_4 ... ok +fdivrl_1 ... ok +fdivrl_2 ... ok +fdivrl_3 ... ok +fdivrl_4 ... ok +fdivr_1 ... ok +fdivr_2 ... ok +fdivr_3 ... ok +fdivr_4 ... ok +fdivr_5 ... ok +fdivr_6 ... ok +fdivr_7 ... ok +fdivr_8 ... ok +fdivr_9 ... ok +fdivr_10 ... ok +fdivr_11 ... ok +fdivr_12 ... ok +fdivr_13 ... ok +fdivr_14 ... ok +fdivr_15 ... ok +fdivr_16 ... ok +fdivrp_1 ... ok +fdivrp_2 ... ok +fdivrp_3 ... ok +fdivrp_4 ... ok +fdivrp_5 ... ok +fdivrp_6 ... ok +fdivrp_7 ... ok +fdivrp_8 ... ok +fdivrp_9 ... ok +fdivrp_10 ... ok +fdivrp_11 ... ok +fdivrp_12 ... ok +fdivrp_13 ... ok +fdivrp_14 ... ok +fdivrp_15 ... ok +fdivrp_16 ... ok +fidivrs_1 ... ok +fidivrs_2 ... ok +fidivrs_3 ... ok +fidivrs_4 ... ok +fidivrs_5 ... ok +fidivrs_6 ... ok +fidivrs_7 ... ok +fidivrs_8 ... ok +fidivrl_1 ... ok +fidivrl_2 ... ok +fidivrl_3 ... ok +fidivrl_4 ... ok +fidivrl_5 ... ok +fidivrl_6 ... ok +fidivrl_7 ... ok +fidivrl_8 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -70,4 +182,60 @@ fldln2_1 ... ok fldz_1 ... ok +fmuls_1 ... ok +fmuls_2 ... ok +fmuls_3 ... ok +fmuls_4 ... ok +fmull_1 ... ok +fmull_2 ... ok +fmull_3 ... ok +fmull_4 ... ok +fmul_1 ... ok +fmul_2 ... ok +fmul_3 ... ok +fmul_4 ... ok +fmul_5 ... ok +fmul_6 ... ok +fmul_7 ... ok +fmul_8 ... ok +fmul_9 ... ok +fmul_10 ... ok +fmul_11 ... ok +fmul_12 ... ok +fmul_13 ... ok +fmul_14 ... ok +fmul_15 ... ok +fmul_16 ... ok +fmulp_1 ... ok +fmulp_2 ... ok +fmulp_3 ... ok +fmulp_4 ... ok +fmulp_5 ... ok +fmulp_6 ... ok +fmulp_7 ... ok +fmulp_8 ... ok +fmulp_9 ... ok +fmulp_10 ... ok +fmulp_11 ... ok +fmulp_12 ... ok +fmulp_13 ... ok +fmulp_14 ... ok +fmulp_15 ... ok +fmulp_16 ... ok +fimuls_1 ... ok +fimuls_2 ... ok +fimuls_3 ... ok +fimuls_4 ... ok +fimuls_5 ... ok +fimuls_6 ... ok +fimuls_7 ... ok +fimuls_8 ... ok +fimull_1 ... ok +fimull_2 ... ok +fimull_3 ... ok +fimull_4 ... ok +fimull_5 ... ok +fimull_6 ... ok +fimull_7 ... ok +fimull_8 ... ok fsubs_1 ... ok fsubs_2 ... ok |
|
From: Tom H. <th...@cy...> - 2004-03-28 10:36:33
|
CVS commit by thughes: Added more floating point instruction tests. M +45 -0 addrcheck/tests/insn_fpu.stdout.exp 1.3 M +45 -0 cachegrind/tests/insn_fpu.stdout.exp 1.3 M +45 -0 helgrind/tests/insn_fpu.stdout.exp 1.3 M +45 -0 memcheck/tests/insn_fpu.stdout.exp 1.3 M +45 -0 none/tests/insn_fpu.def 1.3 M +45 -0 none/tests/insn_fpu.stdout.exp 1.3 --- valgrind/addrcheck/tests/insn_fpu.stdout.exp #1.2:1.3 @@ -59,4 +59,28 @@ fiaddl_7 ... ok fiaddl_8 ... ok +fcomi_1 ... ok +fcomi_2 ... ok +fcomi_3 ... ok +fcomi_4 ... ok +fcomi_5 ... ok +fcomi_6 ... ok +fcomip_1 ... ok +fcomip_2 ... ok +fcomip_3 ... ok +fcomip_4 ... ok +fcomip_5 ... ok +fcomip_6 ... ok +fucomi_1 ... ok +fucomi_2 ... ok +fucomi_3 ... ok +fucomi_4 ... ok +fucomi_5 ... ok +fucomi_6 ... ok +fucomip_1 ... ok +fucomip_2 ... ok +fucomip_3 ... ok +fucomip_4 ... ok +fucomip_5 ... ok +fucomip_6 ... ok fchs_1 ... ok fchs_2 ... ok @@ -175,4 +199,23 @@ fidivrl_7 ... ok fidivrl_8 ... ok +filds_1 ... ok +filds_2 ... ok +filds_3 ... ok +filds_4 ... ok +fildl_1 ... ok +fildl_2 ... ok +fildl_3 ... ok +fildl_4 ... ok +fildq_1 ... ok +fildq_2 ... ok +fildq_3 ... ok +fildq_4 ... ok +flds_1 ... ok +flds_2 ... ok +fldl_1 ... ok +fldl_2 ... ok +fld_1 ... ok +fld_2 ... ok +fld_3 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -350,2 +393,4 @@ fisubrl_7 ... ok fisubrl_8 ... ok +fxch_1 ... ok +fxch_2 ... ok --- valgrind/cachegrind/tests/insn_fpu.stdout.exp #1.2:1.3 @@ -59,4 +59,28 @@ fiaddl_7 ... ok fiaddl_8 ... ok +fcomi_1 ... ok +fcomi_2 ... ok +fcomi_3 ... ok +fcomi_4 ... ok +fcomi_5 ... ok +fcomi_6 ... ok +fcomip_1 ... ok +fcomip_2 ... ok +fcomip_3 ... ok +fcomip_4 ... ok +fcomip_5 ... ok +fcomip_6 ... ok +fucomi_1 ... ok +fucomi_2 ... ok +fucomi_3 ... ok +fucomi_4 ... ok +fucomi_5 ... ok +fucomi_6 ... ok +fucomip_1 ... ok +fucomip_2 ... ok +fucomip_3 ... ok +fucomip_4 ... ok +fucomip_5 ... ok +fucomip_6 ... ok fchs_1 ... ok fchs_2 ... ok @@ -175,4 +199,23 @@ fidivrl_7 ... ok fidivrl_8 ... ok +filds_1 ... ok +filds_2 ... ok +filds_3 ... ok +filds_4 ... ok +fildl_1 ... ok +fildl_2 ... ok +fildl_3 ... ok +fildl_4 ... ok +fildq_1 ... ok +fildq_2 ... ok +fildq_3 ... ok +fildq_4 ... ok +flds_1 ... ok +flds_2 ... ok +fldl_1 ... ok +fldl_2 ... ok +fld_1 ... ok +fld_2 ... ok +fld_3 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -350,2 +393,4 @@ fisubrl_7 ... ok fisubrl_8 ... ok +fxch_1 ... ok +fxch_2 ... ok --- valgrind/helgrind/tests/insn_fpu.stdout.exp #1.2:1.3 @@ -59,4 +59,28 @@ fiaddl_7 ... ok fiaddl_8 ... ok +fcomi_1 ... ok +fcomi_2 ... ok +fcomi_3 ... ok +fcomi_4 ... ok +fcomi_5 ... ok +fcomi_6 ... ok +fcomip_1 ... ok +fcomip_2 ... ok +fcomip_3 ... ok +fcomip_4 ... ok +fcomip_5 ... ok +fcomip_6 ... ok +fucomi_1 ... ok +fucomi_2 ... ok +fucomi_3 ... ok +fucomi_4 ... ok +fucomi_5 ... ok +fucomi_6 ... ok +fucomip_1 ... ok +fucomip_2 ... ok +fucomip_3 ... ok +fucomip_4 ... ok +fucomip_5 ... ok +fucomip_6 ... ok fchs_1 ... ok fchs_2 ... ok @@ -175,4 +199,23 @@ fidivrl_7 ... ok fidivrl_8 ... ok +filds_1 ... ok +filds_2 ... ok +filds_3 ... ok +filds_4 ... ok +fildl_1 ... ok +fildl_2 ... ok +fildl_3 ... ok +fildl_4 ... ok +fildq_1 ... ok +fildq_2 ... ok +fildq_3 ... ok +fildq_4 ... ok +flds_1 ... ok +flds_2 ... ok +fldl_1 ... ok +fldl_2 ... ok +fld_1 ... ok +fld_2 ... ok +fld_3 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -350,2 +393,4 @@ fisubrl_7 ... ok fisubrl_8 ... ok +fxch_1 ... ok +fxch_2 ... ok --- valgrind/memcheck/tests/insn_fpu.stdout.exp #1.2:1.3 @@ -59,4 +59,28 @@ fiaddl_7 ... ok fiaddl_8 ... ok +fcomi_1 ... ok +fcomi_2 ... ok +fcomi_3 ... ok +fcomi_4 ... ok +fcomi_5 ... ok +fcomi_6 ... ok +fcomip_1 ... ok +fcomip_2 ... ok +fcomip_3 ... ok +fcomip_4 ... ok +fcomip_5 ... ok +fcomip_6 ... ok +fucomi_1 ... ok +fucomi_2 ... ok +fucomi_3 ... ok +fucomi_4 ... ok +fucomi_5 ... ok +fucomi_6 ... ok +fucomip_1 ... ok +fucomip_2 ... ok +fucomip_3 ... ok +fucomip_4 ... ok +fucomip_5 ... ok +fucomip_6 ... ok fchs_1 ... ok fchs_2 ... ok @@ -175,4 +199,23 @@ fidivrl_7 ... ok fidivrl_8 ... ok +filds_1 ... ok +filds_2 ... ok +filds_3 ... ok +filds_4 ... ok +fildl_1 ... ok +fildl_2 ... ok +fildl_3 ... ok +fildl_4 ... ok +fildq_1 ... ok +fildq_2 ... ok +fildq_3 ... ok +fildq_4 ... ok +flds_1 ... ok +flds_2 ... ok +fldl_1 ... ok +fldl_2 ... ok +fld_1 ... ok +fld_2 ... ok +fld_3 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -350,2 +393,4 @@ fisubrl_7 ... ok fisubrl_8 ... ok +fxch_1 ... ok +fxch_2 ... ok --- valgrind/none/tests/insn_fpu.def #1.2:1.3 @@ -59,4 +59,28 @@ fiaddl st0.pd[1234567.7654321] : m32.sd[-87654321] => st0.pd[-86419753.2345679] fiaddl st0.pd[-1234567.7654321] : m32.sd[-87654321] => st0.pd[-88888888.7654321] +fcomi st2.ps[1234.5678] st0.ps[1234.5679] => st0.ps[1234.5678] st2.ps[1234.5679] eflags[0x45,0x00] +fcomi st2.ps[1234.5678] st0.ps[1234.5676] => st0.ps[1234.5678] st2.ps[1234.5676] eflags[0x45,0x01] +fcomi st2.ps[1234.5678] st0.ps[1234.5678] => st0.ps[1234.5678] st2.ps[1234.5678] eflags[0x45,0x40] +fcomi st2.pd[1234567.7654321] st0.pd[1234567.7654322] => st0.pd[1234567.7654322] st2.pd[1234567.7654321] eflags[0x45,0x00] +fcomi st2.pd[1234567.7654321] st0.pd[1234567.7654320] => st0.pd[1234567.7654320] st2.pd[1234567.7654321] eflags[0x45,0x01] +fcomi st2.pd[1234567.7654321] st0.pd[1234567.7654321] => st0.pd[1234567.7654321] st2.pd[1234567.7654321] eflags[0x45,0x40] +fcomip st2.ps[1234.5678] st0.ps[1234.5679] => st1.ps[1234.5679] eflags[0x45,0x00] +fcomip st2.ps[1234.5678] st0.ps[1234.5676] => st1.ps[1234.5676] eflags[0x45,0x01] +fcomip st2.ps[1234.5678] st0.ps[1234.5678] => st1.ps[1234.5678] eflags[0x45,0x40] +fcomip st2.pd[1234567.7654321] st0.pd[1234567.7654322] => st1.pd[1234567.7654321] eflags[0x45,0x00] +fcomip st2.pd[1234567.7654321] st0.pd[1234567.7654320] => st1.pd[1234567.7654321] eflags[0x45,0x01] +fcomip st2.pd[1234567.7654321] st0.pd[1234567.7654321] => st1.pd[1234567.7654321] eflags[0x45,0x40] +fucomi st2.ps[1234.5678] st0.ps[1234.5679] => st0.ps[1234.5678] st2.ps[1234.5679] eflags[0x45,0x00] +fucomi st2.ps[1234.5678] st0.ps[1234.5676] => st0.ps[1234.5678] st2.ps[1234.5676] eflags[0x45,0x01] +fucomi st2.ps[1234.5678] st0.ps[1234.5678] => st0.ps[1234.5678] st2.ps[1234.5678] eflags[0x45,0x40] +fucomi st2.pd[1234567.7654321] st0.pd[1234567.7654322] => st0.pd[1234567.7654322] st2.pd[1234567.7654321] eflags[0x45,0x00] +fucomi st2.pd[1234567.7654321] st0.pd[1234567.7654320] => st0.pd[1234567.7654320] st2.pd[1234567.7654321] eflags[0x45,0x01] +fucomi st2.pd[1234567.7654321] st0.pd[1234567.7654321] => st0.pd[1234567.7654321] st2.pd[1234567.7654321] eflags[0x45,0x40] +fucomip st2.ps[1234.5678] st0.ps[1234.5679] => st1.ps[1234.5679] eflags[0x45,0x00] +fucomip st2.ps[1234.5678] st0.ps[1234.5676] => st1.ps[1234.5676] eflags[0x45,0x01] +fucomip st2.ps[1234.5678] st0.ps[1234.5678] => st1.ps[1234.5678] eflags[0x45,0x40] +fucomip st2.pd[1234567.7654321] st0.pd[1234567.7654322] => st1.pd[1234567.7654321] eflags[0x45,0x00] +fucomip st2.pd[1234567.7654321] st0.pd[1234567.7654320] => st1.pd[1234567.7654321] eflags[0x45,0x01] +fucomip st2.pd[1234567.7654321] st0.pd[1234567.7654321] => st1.pd[1234567.7654321] eflags[0x45,0x40] fchs st0.ps[1234.5678] : => st0.ps[-1234.5678] fchs st0.ps[-1234.5678] : => st0.ps[1234.5678] @@ -175,4 +199,23 @@ fidivrl st0.pd[1234567.7654321] : m32.sd[-654321] => st0.pd[-0.530000068300007] fidivrl st0.pd[-1234567.7654321] : m32.sd[-654321] => st0.pd[0.530000068300007] +filds m16.sw[12345] => st0.ps[12345.0] +filds m16.sw[-12345] => st0.ps[-12345.0] +filds m16.sw[12345] => st0.pd[12345.0] +filds m16.sw[-12345] => st0.pd[-12345.0] +fildl m32.sd[12345678] => st0.ps[12345678.0] +fildl m32.sd[-12345678] => st0.ps[-12345678.0] +fildl m32.sd[12345678] => st0.pd[12345678.0] +fildl m32.sd[-12345678] => st0.pd[-12345678.0] +fildq m64.sq[123456787654321] => st0.ps[123456787654321.0] +fildq m64.sq[-123456787654321] => st0.ps[-123456787654321.0] +fildq m64.sq[123456787654321] => st0.pd[123456787654321.0] +fildq m64.sq[-123456787654321] => st0.pd[-123456787654321.0] +flds m32.ps[1234.5678] => st0.ps[1234.5678] +flds m32.ps[-1234.5678] => st0.ps[-1234.5678] +fldl m64.pd[1234567.7654321] => st0.pd[1234567.7654321] +fldl m64.pd[-1234567.7654321] => st0.pd[-1234567.7654321] +fld st2.ps[1234.5678] => st0.ps[1234.5678] st3.ps[1234.5678] +fld st2.ps[-1234.5678] => st0.ps[-1234.5678] st3.ps[-1234.5678] +fld st2.pd[1234567.7654321] => st0.pd[1234567.7654321] st3.pd[1234567.7654321] fld1 => st0.pd[1.0] fldl2t => st0.pd[3.321928094887362] @@ -350,2 +393,4 @@ fisubrl st0.pd[1234567.7654321] : m32.sd[-87654321] => st0.pd[-88888888.7654321] fisubrl st0.pd[-1234567.7654321] : m32.sd[-87654321] => st0.pd[-86419753.2345679] +fxch st0.ps[1234.5678] : st2.ps[8765.4321] => st0.ps[8765.4321] st2.ps[1234.5678] +fxch st0.pd[1234567.7654321] : st2.pd[7654321.1234567] => st0.pd[7654321.1234567] st2.pd[1234567.7654321] --- valgrind/none/tests/insn_fpu.stdout.exp #1.2:1.3 @@ -59,4 +59,28 @@ fiaddl_7 ... ok fiaddl_8 ... ok +fcomi_1 ... ok +fcomi_2 ... ok +fcomi_3 ... ok +fcomi_4 ... ok +fcomi_5 ... ok +fcomi_6 ... ok +fcomip_1 ... ok +fcomip_2 ... ok +fcomip_3 ... ok +fcomip_4 ... ok +fcomip_5 ... ok +fcomip_6 ... ok +fucomi_1 ... ok +fucomi_2 ... ok +fucomi_3 ... ok +fucomi_4 ... ok +fucomi_5 ... ok +fucomi_6 ... ok +fucomip_1 ... ok +fucomip_2 ... ok +fucomip_3 ... ok +fucomip_4 ... ok +fucomip_5 ... ok +fucomip_6 ... ok fchs_1 ... ok fchs_2 ... ok @@ -175,4 +199,23 @@ fidivrl_7 ... ok fidivrl_8 ... ok +filds_1 ... ok +filds_2 ... ok +filds_3 ... ok +filds_4 ... ok +fildl_1 ... ok +fildl_2 ... ok +fildl_3 ... ok +fildl_4 ... ok +fildq_1 ... ok +fildq_2 ... ok +fildq_3 ... ok +fildq_4 ... ok +flds_1 ... ok +flds_2 ... ok +fldl_1 ... ok +fldl_2 ... ok +fld_1 ... ok +fld_2 ... ok +fld_3 ... ok fld1_1 ... ok fldl2t_1 ... ok @@ -350,2 +393,4 @@ fisubrl_7 ... ok fisubrl_8 ... ok +fxch_1 ... ok +fxch_2 ... ok |
|
From: Tom H. <th...@cy...> - 2004-03-31 22:48:15
|
CVS commit by thughes:
Added more floating point instruction tests.
M +56 -0 addrcheck/tests/insn_fpu.stdout.exp 1.4
M +56 -0 cachegrind/tests/insn_fpu.stdout.exp 1.4
M +56 -0 helgrind/tests/insn_fpu.stdout.exp 1.4
M +56 -0 memcheck/tests/insn_fpu.stdout.exp 1.4
M +67 -15 none/tests/gen_insn_test.pl 1.7
M +56 -0 none/tests/insn_fpu.def 1.4
M +56 -0 none/tests/insn_fpu.stdout.exp 1.4
--- valgrind/addrcheck/tests/insn_fpu.stdout.exp #1.3:1.4
@@ -211,4 +211,44 @@
fildq_3 ... ok
fildq_4 ... ok
+fists_1 ... ok
+fists_2 ... ok
+fists_3 ... ok
+fists_4 ... ok
+fists_5 ... ok
+fists_6 ... ok
+fists_7 ... ok
+fists_8 ... ok
+fistl_1 ... ok
+fistl_2 ... ok
+fistl_3 ... ok
+fistl_4 ... ok
+fistl_5 ... ok
+fistl_6 ... ok
+fistl_7 ... ok
+fistl_8 ... ok
+fistps_1 ... ok
+fistps_2 ... ok
+fistps_3 ... ok
+fistps_4 ... ok
+fistps_5 ... ok
+fistps_6 ... ok
+fistps_7 ... ok
+fistps_8 ... ok
+fistpl_1 ... ok
+fistpl_2 ... ok
+fistpl_3 ... ok
+fistpl_4 ... ok
+fistpl_5 ... ok
+fistpl_6 ... ok
+fistpl_7 ... ok
+fistpl_8 ... ok
+fistpq_1 ... ok
+fistpq_2 ... ok
+fistpq_3 ... ok
+fistpq_4 ... ok
+fistpq_5 ... ok
+fistpq_6 ... ok
+fistpq_7 ... ok
+fistpq_8 ... ok
flds_1 ... ok
flds_2 ... ok
@@ -281,4 +321,20 @@
fimull_7 ... ok
fimull_8 ... ok
+frndint_1 ... ok
+frndint_2 ... ok
+frndint_3 ... ok
+frndint_4 ... ok
+frndint_5 ... ok
+frndint_6 ... ok
+frndint_7 ... ok
+frndint_8 ... ok
+frndint_9 ... ok
+frndint_10 ... ok
+frndint_11 ... ok
+frndint_12 ... ok
+frndint_13 ... ok
+frndint_14 ... ok
+frndint_15 ... ok
+frndint_16 ... ok
fsubs_1 ... ok
fsubs_2 ... ok
--- valgrind/cachegrind/tests/insn_fpu.stdout.exp #1.3:1.4
@@ -211,4 +211,44 @@
fildq_3 ... ok
fildq_4 ... ok
+fists_1 ... ok
+fists_2 ... ok
+fists_3 ... ok
+fists_4 ... ok
+fists_5 ... ok
+fists_6 ... ok
+fists_7 ... ok
+fists_8 ... ok
+fistl_1 ... ok
+fistl_2 ... ok
+fistl_3 ... ok
+fistl_4 ... ok
+fistl_5 ... ok
+fistl_6 ... ok
+fistl_7 ... ok
+fistl_8 ... ok
+fistps_1 ... ok
+fistps_2 ... ok
+fistps_3 ... ok
+fistps_4 ... ok
+fistps_5 ... ok
+fistps_6 ... ok
+fistps_7 ... ok
+fistps_8 ... ok
+fistpl_1 ... ok
+fistpl_2 ... ok
+fistpl_3 ... ok
+fistpl_4 ... ok
+fistpl_5 ... ok
+fistpl_6 ... ok
+fistpl_7 ... ok
+fistpl_8 ... ok
+fistpq_1 ... ok
+fistpq_2 ... ok
+fistpq_3 ... ok
+fistpq_4 ... ok
+fistpq_5 ... ok
+fistpq_6 ... ok
+fistpq_7 ... ok
+fistpq_8 ... ok
flds_1 ... ok
flds_2 ... ok
@@ -281,4 +321,20 @@
fimull_7 ... ok
fimull_8 ... ok
+frndint_1 ... ok
+frndint_2 ... ok
+frndint_3 ... ok
+frndint_4 ... ok
+frndint_5 ... ok
+frndint_6 ... ok
+frndint_7 ... ok
+frndint_8 ... ok
+frndint_9 ... ok
+frndint_10 ... ok
+frndint_11 ... ok
+frndint_12 ... ok
+frndint_13 ... ok
+frndint_14 ... ok
+frndint_15 ... ok
+frndint_16 ... ok
fsubs_1 ... ok
fsubs_2 ... ok
--- valgrind/helgrind/tests/insn_fpu.stdout.exp #1.3:1.4
@@ -211,4 +211,44 @@
fildq_3 ... ok
fildq_4 ... ok
+fists_1 ... ok
+fists_2 ... ok
+fists_3 ... ok
+fists_4 ... ok
+fists_5 ... ok
+fists_6 ... ok
+fists_7 ... ok
+fists_8 ... ok
+fistl_1 ... ok
+fistl_2 ... ok
+fistl_3 ... ok
+fistl_4 ... ok
+fistl_5 ... ok
+fistl_6 ... ok
+fistl_7 ... ok
+fistl_8 ... ok
+fistps_1 ... ok
+fistps_2 ... ok
+fistps_3 ... ok
+fistps_4 ... ok
+fistps_5 ... ok
+fistps_6 ... ok
+fistps_7 ... ok
+fistps_8 ... ok
+fistpl_1 ... ok
+fistpl_2 ... ok
+fistpl_3 ... ok
+fistpl_4 ... ok
+fistpl_5 ... ok
+fistpl_6 ... ok
+fistpl_7 ... ok
+fistpl_8 ... ok
+fistpq_1 ... ok
+fistpq_2 ... ok
+fistpq_3 ... ok
+fistpq_4 ... ok
+fistpq_5 ... ok
+fistpq_6 ... ok
+fistpq_7 ... ok
+fistpq_8 ... ok
flds_1 ... ok
flds_2 ... ok
@@ -281,4 +321,20 @@
fimull_7 ... ok
fimull_8 ... ok
+frndint_1 ... ok
+frndint_2 ... ok
+frndint_3 ... ok
+frndint_4 ... ok
+frndint_5 ... ok
+frndint_6 ... ok
+frndint_7 ... ok
+frndint_8 ... ok
+frndint_9 ... ok
+frndint_10 ... ok
+frndint_11 ... ok
+frndint_12 ... ok
+frndint_13 ... ok
+frndint_14 ... ok
+frndint_15 ... ok
+frndint_16 ... ok
fsubs_1 ... ok
fsubs_2 ... ok
--- valgrind/memcheck/tests/insn_fpu.stdout.exp #1.3:1.4
@@ -211,4 +211,44 @@
fildq_3 ... ok
fildq_4 ... ok
+fists_1 ... ok
+fists_2 ... ok
+fists_3 ... ok
+fists_4 ... ok
+fists_5 ... ok
+fists_6 ... ok
+fists_7 ... ok
+fists_8 ... ok
+fistl_1 ... ok
+fistl_2 ... ok
+fistl_3 ... ok
+fistl_4 ... ok
+fistl_5 ... ok
+fistl_6 ... ok
+fistl_7 ... ok
+fistl_8 ... ok
+fistps_1 ... ok
+fistps_2 ... ok
+fistps_3 ... ok
+fistps_4 ... ok
+fistps_5 ... ok
+fistps_6 ... ok
+fistps_7 ... ok
+fistps_8 ... ok
+fistpl_1 ... ok
+fistpl_2 ... ok
+fistpl_3 ... ok
+fistpl_4 ... ok
+fistpl_5 ... ok
+fistpl_6 ... ok
+fistpl_7 ... ok
+fistpl_8 ... ok
+fistpq_1 ... ok
+fistpq_2 ... ok
+fistpq_3 ... ok
+fistpq_4 ... ok
+fistpq_5 ... ok
+fistpq_6 ... ok
+fistpq_7 ... ok
+fistpq_8 ... ok
flds_1 ... ok
flds_2 ... ok
@@ -281,4 +321,20 @@
fimull_7 ... ok
fimull_8 ... ok
+frndint_1 ... ok
+frndint_2 ... ok
+frndint_3 ... ok
+frndint_4 ... ok
+frndint_5 ... ok
+frndint_6 ... ok
+frndint_7 ... ok
+frndint_8 ... ok
+frndint_9 ... ok
+frndint_10 ... ok
+frndint_11 ... ok
+frndint_12 ... ok
+frndint_13 ... ok
+frndint_14 ... ok
+frndint_15 ... ok
+frndint_16 ... ok
fsubs_1 ... ok
fsubs_2 ... ok
--- valgrind/none/tests/gen_insn_test.pl #1.6:1.7
@@ -17,4 +17,5 @@
eflags => "reg32_t",
st => "reg64_t",
+ fpucw => "reg16_t",
fpusw => "reg16_t"
);
@@ -195,4 +196,6 @@
my $eflagsmask;
my $eflagsset;
+ my $fpucwmask;
+ my $fpucwset;
my $fpuswmask;
my $fpuswset;
@@ -282,6 +285,17 @@
$values[1] = oct($values[1]) if $values[1] =~ /^0/;
- $eflagsmask = sprintf "0x%x", ~$values[0];
- $eflagsset = sprintf "0x%x", $values[1];
+ $eflagsmask = sprintf "0x%08x", $values[0] ^ 0xffffffff;
+ $eflagsset = sprintf "0x%08x", $values[1];
+ }
+ elsif ($preset =~ /^(fpucw)\[([^\]]+)\]$/)
+ {
+ my $type = $1;
+ my @values = split(/,/, $2);
+
+ $values[0] = oct($values[0]) if $values[0] =~ /^0/;
+ $values[1] = oct($values[1]) if $values[1] =~ /^0/;
+
+ $fpucwmask = sprintf "0x%04x", $values[0] ^ 0xffff;
+ $fpucwset = sprintf "0x%04x", $values[1];
}
elsif ($preset =~ /^(fpusw)\[([^\]]+)\]$/)
@@ -293,6 +307,6 @@
$values[1] = oct($values[1]) if $values[1] =~ /^0/;
- $fpuswmask = sprintf "0x%x", ~$values[0];
- $fpuswset = sprintf "0x%x", $values[1];
+ $fpuswmask = sprintf "0x%04x", $values[0] ^ 0xffff;
+ $fpuswset = sprintf "0x%04x", $values[1];
}
else
@@ -513,5 +527,5 @@
type => "eflags",
subtype => "ud",
- values => [ map { sprintf "0x%x", $_ } @values ]
+ values => [ map { sprintf "0x%08x", $_ } @values ]
};
@@ -522,6 +536,30 @@
if (!defined($eflagsmask) && !defined($eflagsset))
{
- $eflagsmask = sprintf "0x%x", ~$values[0];
- $eflagsset = sprintf "0x%x", $values[0] & ~$values[1];
+ $eflagsmask = sprintf "0x%08x", $values[0] ^ 0xffffffff;
+ $eflagsset = sprintf "0x%08x", $values[0] & ~$values[1];
+ }
+ }
+ elsif ($result =~ /^fpucw\[([^\]]+)\]$/)
+ {
+ my @values = split(/,/, $1);
+
+ $values[0] = oct($values[0]) if $values[0] =~ /^0/;
+ $values[1] = oct($values[1]) if $values[1] =~ /^0/;
+
+ my $result = {
+ name => $name,
+ type => "fpucw",
+ subtype => "ud",
+ values => [ map { sprintf "0x%04x", $_ } @values ]
+ };
+
+ push @results, $result;
+
+ print qq| $ArgTypes{fpucw} $name;\n|;
+
+ if (!defined($fpucwmask) && !defined($fpucwset))
+ {
+ $fpucwmask = sprintf "0x%04x", $values[0] ^ 0xffff;
+ $fpucwset = sprintf "0x%04x", $values[0] & ~$values[1];
}
}
@@ -537,5 +575,5 @@
type => "fpusw",
subtype => "ud",
- values => [ map { sprintf "0x%x", $_ } @values ]
+ values => [ map { sprintf "0x%04x", $_ } @values ]
};
@@ -546,6 +584,6 @@
if (!defined($fpuswmask) && !defined($fpuswset))
{
- $fpuswmask = sprintf "0x%x", ~$values[0];
- $fpuswset = sprintf "0x%x", $values[0] & ~$values[1];
+ $fpuswmask = sprintf "0x%04x", $values[0] ^ 0xffff;
+ $fpuswset = sprintf "0x%04x", $values[0] & ~$values[1];
}
}
@@ -562,5 +600,5 @@
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpusw)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w)$/)
{
$result->{argnum} = $argnum++;
@@ -651,4 +689,14 @@
}
+ if (defined($fpucwmask) || defined($fpucwset))
+ {
+ print qq| \"subl \$2, %%esp\\n\"\n|;
+ print qq| \"fstcw (%%esp)\\n\"\n|;
+ print qq| \"andw \$$fpucwmask, (%%esp)\\n\"\n| if defined($fpucwmask);
+ print qq| \"orw \$$fpucwset, (%%esp)\\n\"\n| if defined($fpucwset);
+ print qq| \"fldcw (%%esp)\\n\"\n|;
+ print qq| \"addl \$2, %%esp\\n\"\n|;
+ }
+
print qq| \"$insn|;
@@ -726,4 +774,8 @@
print qq| \"popl %$result->{argnum}\\n\"\n|;
}
+ elsif ($result->{type} eq "fpucw")
+ {
+ print qq| \"fstcw %$result->{argnum}\\n\"\n|;
+ }
elsif ($result->{type} eq "fpusw")
{
@@ -759,5 +811,5 @@
foreach my $result (@results)
{
- if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpusw)$/)
+ if ($result->{type} =~ /^(m(8|16|32|64|128)|st|eflags|fpu[cs]w)$/)
{
print qq|$prefix\"=m\" \($result->{name}\)|;
@@ -821,5 +873,5 @@
print qq|${prefix}\($result->{name}.ud[0] & $values[0]UL\) == $values[1]UL|;
}
- elsif ($type eq "fpusw")
+ elsif ($type =~ /^fpu[cs]w$/)
{
print qq|${prefix}\($result->{name}.uw[0] & $values[0]\) == $values[1]|;
@@ -868,7 +920,7 @@
print qq| printf(" eflags & 0x%lx = 0x%lx (expected 0x%lx)\\n", $values[0]UL, $result->{name}.ud\[0\] & $values[0]UL, $values[1]UL);\n|;
}
- elsif ($type eq "fpusw")
+ elsif ($type =~ /^fpu[cs]w$/)
{
- print qq| printf(" fpusw & 0x%x = 0x%x (expected 0x%x)\\n", $values[0], $result->{name}.uw\[0\] & $values[0], $values[1]);\n|;
+ print qq| printf(" $type & 0x%x = 0x%x (expected 0x%x)\\n", $values[0], $result->{name}.uw\[0\] & $values[0], $values[1]);\n|;
}
else
--- valgrind/none/tests/insn_fpu.def #1.3:1.4
@@ -211,4 +211,44 @@
fildq m64.sq[123456787654321] => st0.pd[123456787654321.0]
fildq m64.sq[-123456787654321] => st0.pd[-123456787654321.0]
+fists fpucw[0xc00,0x000] st0.ps[1234.5678] : m16.sw[0] => 0.sw[1235] st0.ps[1234.5678]
+fists fpucw[0xc00,0x000] st0.ps[-1234.5678] : m16.sw[0] => 0.sw[-1235] st0.ps[-1234.5678]
+fists fpucw[0xc00,0x400] st0.ps[1234.5678] : m16.sw[0] => 0.sw[1234] st0.ps[1234.5678]
+fists fpucw[0xc00,0x400] st0.ps[-1234.5678] : m16.sw[0] => 0.sw[-1235] st0.ps[-1234.5678]
+fists fpucw[0xc00,0x800] st0.ps[1234.5678] : m16.sw[0] => 0.sw[1235] st0.ps[1234.5678]
+fists fpucw[0xc00,0x800] st0.ps[-1234.5678] : m16.sw[0] => 0.sw[-1234] st0.ps[-1234.5678]
+fists fpucw[0xc00,0xc00] st0.ps[1234.5678] : m16.sw[0] => 0.sw[1234] st0.ps[1234.5678]
+fists fpucw[0xc00,0xc00] st0.ps[-1234.5678] : m16.sw[0] => 0.sw[-1234] st0.ps[-1234.5678]
+fistl fpucw[0xc00,0x000] st0.pd[1234567.7654321] : m32.sd[0] => 0.sd[1234568] st0.pd[1234567.7654321]
+fistl fpucw[0xc00,0x000] st0.pd[-1234567.7654321] : m32.sd[0] => 0.sd[-1234568] st0.pd[-1234567.7654321]
+fistl fpucw[0xc00,0x400] st0.pd[1234567.7654321] : m32.sd[0] => 0.sd[1234567] st0.pd[1234567.7654321]
+fistl fpucw[0xc00,0x400] st0.pd[-1234567.7654321] : m32.sd[0] => 0.sd[-1234568] st0.pd[-1234567.7654321]
+fistl fpucw[0xc00,0x800] st0.pd[1234567.7654321] : m32.sd[0] => 0.sd[1234568] st0.pd[1234567.7654321]
+fistl fpucw[0xc00,0x800] st0.pd[-1234567.7654321] : m32.sd[0] => 0.sd[-1234567] st0.pd[-1234567.7654321]
+fistl fpucw[0xc00,0xc00] st0.pd[1234567.7654321] : m32.sd[0] => 0.sd[1234567] st0.pd[1234567.7654321]
+fistl fpucw[0xc00,0xc00] st0.pd[-1234567.7654321] : m32.sd[0] => 0.sd[-1234567] st0.pd[-1234567.7654321]
+fistps fpucw[0xc00,0x000] st0.ps[1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[1235] st0.ps[1111.1111]
+fistps fpucw[0xc00,0x000] st0.ps[-1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[-1235] st0.ps[1111.1111]
+fistps fpucw[0xc00,0x400] st0.ps[1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[1234] st0.ps[1111.1111]
+fistps fpucw[0xc00,0x400] st0.ps[-1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[-1235] st0.ps[1111.1111]
+fistps fpucw[0xc00,0x800] st0.ps[1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[1235] st0.ps[1111.1111]
+fistps fpucw[0xc00,0x800] st0.ps[-1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[-1234] st0.ps[1111.1111]
+fistps fpucw[0xc00,0xc00] st0.ps[1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[1234] st0.ps[1111.1111]
+fistps fpucw[0xc00,0xc00] st0.ps[-1234.5678] st1.ps[1111.1111] : m16.sw[0] => 0.sw[-1234] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0x000] st0.pd[1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[1234568] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0x000] st0.pd[-1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[-1234568] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0x400] st0.pd[1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[1234567] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0x400] st0.pd[-1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[-1234568] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0x800] st0.pd[1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[1234568] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0x800] st0.pd[-1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[-1234567] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0xc00] st0.pd[1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[1234567] st0.ps[1111.1111]
+fistpl fpucw[0xc00,0xc00] st0.pd[-1234567.7654321] st1.ps[1111.1111] : m32.sd[0] => 0.sd[-1234567] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0x000] st0.pd[123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[123456787654322] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0x000] st0.pd[-123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[-123456787654322] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0x400] st0.pd[123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[123456787654321] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0x400] st0.pd[-123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[-123456787654322] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0x800] st0.pd[123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[123456787654322] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0x800] st0.pd[-123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[-123456787654321] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0xc00] st0.pd[123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[123456787654321] st0.ps[1111.1111]
+fistpq fpucw[0xc00,0xc00] st0.pd[-123456787654321.6] st1.ps[1111.1111] : m64.sq[0] => 0.sq[-123456787654321] st0.ps[1111.1111]
flds m32.ps[1234.5678] => st0.ps[1234.5678]
flds m32.ps[-1234.5678] => st0.ps[-1234.5678]
@@ -281,4 +321,20 @@
fimull st0.pd[1234567.7654321] : m32.sd[-654321] => st0.pd[-807803614845.297]
fimull st0.pd[-1234567.7654321] : m32.sd[-654321] => st0.pd[807803614845.297]
+frndint fpucw[0xc00,0x000] st0.ps[1234.5678] : => st0.ps[1235.0]
+frndint fpucw[0xc00,0x000] st0.ps[-1234.5678] : => st0.ps[-1235.0]
+frndint fpucw[0xc00,0x400] st0.ps[1234.5678] : => st0.ps[1234.0]
+frndint fpucw[0xc00,0x400] st0.ps[-1234.5678] : => st0.ps[-1235.0]
+frndint fpucw[0xc00,0x800] st0.ps[1234.5678] : => st0.ps[1235.0]
+frndint fpucw[0xc00,0x800] st0.ps[-1234.5678] : => st0.ps[-1234.0]
+frndint fpucw[0xc00,0xc00] st0.ps[1234.5678] : => st0.ps[1234.0]
+frndint fpucw[0xc00,0xc00] st0.ps[-1234.5678] : => st0.ps[-1234.0]
+frndint fpucw[0xc00,0x000] st0.pd[1234567.7654321] : => st0.pd[1234568.0]
+frndint fpucw[0xc00,0x000] st0.pd[-1234567.7654321] : => st0.pd[-1234568.0]
+frndint fpucw[0xc00,0x400] st0.pd[1234567.7654321] : => st0.pd[1234567.0]
+frndint fpucw[0xc00,0x400] st0.pd[-1234567.7654321] : => st0.pd[-1234568.0]
+frndint fpucw[0xc00,0x800] st0.pd[1234567.7654321] : => st0.pd[1234568.0]
+frndint fpucw[0xc00,0x800] st0.pd[-1234567.7654321] : => st0.pd[-1234567.0]
+frndint fpucw[0xc00,0xc00] st0.pd[1234567.7654321] : => st0.pd[1234567.0]
+frndint fpucw[0xc00,0xc00] st0.pd[-1234567.7654321] : => st0.pd[-1234567.0]
fsubs st0.ps[1234.5678] : m32.ps[8765.4321] => st0.ps[-7530.8643]
fsubs st0.ps[-1234.5678] : m32.ps[8765.4321] => st0.ps[-9999.9990]
--- valgrind/none/tests/insn_fpu.stdout.exp #1.3:1.4
@@ -211,4 +211,44 @@
fildq_3 ... ok
fildq_4 ... ok
+fists_1 ... ok
+fists_2 ... ok
+fists_3 ... ok
+fists_4 ... ok
+fists_5 ... ok
+fists_6 ... ok
+fists_7 ... ok
+fists_8 ... ok
+fistl_1 ... ok
+fistl_2 ... ok
+fistl_3 ... ok
+fistl_4 ... ok
+fistl_5 ... ok
+fistl_6 ... ok
+fistl_7 ... ok
+fistl_8 ... ok
+fistps_1 ... ok
+fistps_2 ... ok
+fistps_3 ... ok
+fistps_4 ... ok
+fistps_5 ... ok
+fistps_6 ... ok
+fistps_7 ... ok
+fistps_8 ... ok
+fistpl_1 ... ok
+fistpl_2 ... ok
+fistpl_3 ... ok
+fistpl_4 ... ok
+fistpl_5 ... ok
+fistpl_6 ... ok
+fistpl_7 ... ok
+fistpl_8 ... ok
+fistpq_1 ... ok
+fistpq_2 ... ok
+fistpq_3 ... ok
+fistpq_4 ... ok
+fistpq_5 ... ok
+fistpq_6 ... ok
+fistpq_7 ... ok
+fistpq_8 ... ok
flds_1 ... ok
flds_2 ... ok
@@ -281,4 +321,20 @@
fimull_7 ... ok
fimull_8 ... ok
+frndint_1 ... ok
+frndint_2 ... ok
+frndint_3 ... ok
+frndint_4 ... ok
+frndint_5 ... ok
+frndint_6 ... ok
+frndint_7 ... ok
+frndint_8 ... ok
+frndint_9 ... ok
+frndint_10 ... ok
+frndint_11 ... ok
+frndint_12 ... ok
+frndint_13 ... ok
+frndint_14 ... ok
+frndint_15 ... ok
+frndint_16 ... ok
fsubs_1 ... ok
fsubs_2 ... ok
|
|
From: Nicholas N. <nj...@ca...> - 2004-04-10 00:30:10
|
CVS commit by nethercote: Revamped. Split into sections, added stuff about the name "Valgrind" (where it comes from, pronunciation), removed some obsolete questions, added some new ones. M +315 -244 FAQ.txt 1.21 --- valgrind/FAQ.txt #1.20:1.21 @@ -1,12 +1,70 @@ +Valgrind FAQ, version 2.1.2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Last revised 6 April 2004 +~~~~~~~~~~~~~~~~~~~~~~~~~ -A mini-FAQ for valgrind, version 1.9.6 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Last revised 5 May 2003 -~~~~~~~~~~~~~~~~~~~~~~~ +1. Background +2. Compiling, installing and configuring +3. Valgrind aborts unexpectedly +4. Valgrind behaves unexpectedly +5. Memcheck doesn't find my bug +6. Miscellaneous + +----------------------------------------------------------------- +1. Background ----------------------------------------------------------------- -Q1. Programs run OK on valgrind, but at exit produce a bunch - of errors a bit like this +1.1. How do you pronounce "Valgrind"? + +The "Val" as in the world "value". The "grind" is pronounced with a +short 'i' -- ie. "grinned" (rhymes with "tinned") rather than "grined" +(rhymes with "find"). + +Don't feel bad: almost everyone gets it wrong at first. + +----------------------------------------------------------------- + +1.2. Where does the name "Valgrind" come from? + +From Nordic mythology. Originally (before release) the project was +named Heimdall, after the watchman of the Nordic gods. He could "see a +hundred miles by day or night, hear the grass growing, see the wool +growing on a sheep's back" (etc). This would have been a great name, +but it was already taken by a security package "Heimdal". + +Keeping with the Nordic theme, Valgrind was chosen. Valgrind is the +name of the main entrance to Valhalla (the Hall of the Chosen Slain in +Asgard). Over this entrance there resides a wolf and over it there is +the head of a boar and on it perches a huge eagle, whose eyes can see to +the far regions of the nine worlds. Only those judged worthy by the +guardians are allowed to pass through Valgrind. All others are refused +entrance. + +It's not short for "value grinder", although that's not a bad guess. + + +----------------------------------------------------------------- +2. Compiling, installing and configuring +----------------------------------------------------------------- + +2.1. When I trying building Valgrind, 'make' dies partway with an + assertion failure, something like this: make: expand.c:489: + + allocated_variable_append: Assertion + `current_variable_set_list->next != 0' failed. + +It's probably a bug in 'make'. Some, but not all, instances of version 3.79.1 +have this bug, see www.mail-archive.com/bug...@gn.../msg01658.html. Try +upgrading to a more recent version of 'make'. Alternatively, we have heard +that unsetting the CFLAGS environment variable avoids the problem. + + +----------------------------------------------------------------- +3. Valgrind aborts unexpectedly +----------------------------------------------------------------- + +3.1. Programs run OK on Valgrind, but at exit produce a bunch of errors a bit + like this ==20755== Invalid read of size 4 @@ -24,336 +82,349 @@ and then die with a segmentation fault. -A1. When the program exits, valgrind runs the procedure - __libc_freeres() in glibc. This is a hook for memory debuggers, - so they can ask glibc to free up any memory it has used. Doing - that is needed to ensure that valgrind doesn't incorrectly - report space leaks in glibc. - - Problem is that running __libc_freeres() in older glibc versions - causes this crash. +When the program exits, Valgrind runs the procedure __libc_freeres() in +glibc. This is a hook for memory debuggers, so they can ask glibc to +free up any memory it has used. Doing that is needed to ensure that +Valgrind doesn't incorrectly report space leaks in glibc. - WORKAROUND FOR 1.1.X and later versions of valgrind: use the - --run-libc-freeres=no flag. You may then get space leak - reports for glibc-allocations (please _don't_ report these - to the glibc people, since they are not real leaks), but at - least the program runs. - ------------------------------------------------------------------ +Problem is that running __libc_freeres() in older glibc versions causes +this crash. -Q2. [Question erased, as it is no longer relevant] +WORKAROUND FOR 1.1.X and later versions of Valgrind: use the +--run-libc-freeres=no flag. You may then get space leak reports for +glibc-allocations (please _don't_ report these to the glibc people, +since they are not real leaks), but at least the program runs. ----------------------------------------------------------------- -Q3. My (buggy) program dies like this: +3.2. My (buggy) program dies like this: valgrind: vg_malloc2.c:442 (bszW_to_pszW): Assertion `pszW >= 0' failed. - And/or my (buggy) program runs OK on valgrind, but dies like - this on cachegrind. -A3. If valgrind shows any invalid reads, invalid writes and invalid - frees in your program, the above may happen. Reason is that your - program may trash valgrind's low-level memory manager, which then - dies with the above assertion, or something like this. The cure - is to fix your program so that it doesn't do any illegal memory - accesses. The above failure will hopefully go away after that. +If Memcheck (the memory checker) shows any invalid reads, invalid writes +and invalid frees in your program, the above may happen. Reason is that +your program may trash Valgrind's low-level memory manager, which then +dies with the above assertion, or something like this. The cure is to +fix your program so that it doesn't do any illegal memory accesses. The +above failure will hopefully go away after that. ----------------------------------------------------------------- -Q4. I'm running Red Hat Advanced Server. Valgrind always segfaults at - startup. +3.3. My program dies, printing a message like this along the way: -A4. Known issue with RHAS 2.1, due to funny stack permissions at - startup. However, valgrind-1.9.4 and later automatically handle - this correctly, and should not segfault. + disInstr: unhandled instruction bytes: 0x66 0xF 0x2E 0x5 + +Older versions did not support some x86 instructions, particularly +SSE/SSE2 instructions. Try a newer Valgrind; we now support almost all +instructions. If it still happens with newer versions, if the failing +instruction is an SSE/SSE2 instruction, you might be able to recompile +your progrma without it by using the flag -march to gcc. Either way, +let us know and we'll try to fix it. ----------------------------------------------------------------- -Q5. I try running "valgrind my_program", but my_program runs normally, - and Valgrind doesn't emit any output at all. +3.4. My program dies like this: -A5. Valgrind doesn't work out-of-the-box with programs that are entirely - statically linked. It does a quick test at startup, and if it detects - that the program is statically linked, it aborts with an explanation. - - This test may fail in some obscure cases, eg. if you run a script - under Valgrind and the script interpreter is statically linked. + error: /lib/librt.so.1: symbol __pthread_clock_settime, version + GLIBC_PRIVATE not defined in file libpthread.so.0 with link time + reference - If you still want static linking, you can ask gcc to link certain - libraries statically. Try the following options: +This is a total swamp. Nevertheless there is a way out. It's a problem +which is not easy to fix. Really the problem is that /lib/librt.so.1 +refers to some symbols __pthread_clock_settime and +__pthread_clock_gettime in /lib/libpthread.so which are not intended to +be exported, ie they are private. - -Wl,-Bstatic -lmyLibrary1 -lotherLibrary -Wl,-Bdynamic +Best solution is to ensure your program does not use /lib/librt.so.1. - Just make sure you end with -Wl,-Bdynamic so that libc is dynamically - linked. +However .. since you're probably not using it directly, or even +knowingly, that's hard to do. You might instead be able to fix it by +playing around with coregrind/vg_libpthread.vs. Things to try: - If you absolutely cannot use dynamic libraries, you can try statically - linking together all the .o files in coregrind/, all the .o files of the - tool of your choice (eg. those in memcheck/), and the .o files of your - program. You'll end up with a statically linked binary that runs - permanently under Valgrind's control. Note that we haven't tested this - procedure thoroughly. +Remove this ------------------------------------------------------------------ + GLIBC_PRIVATE { + __pthread_clock_gettime; + __pthread_clock_settime; + }; -Q6. I try running "valgrind my_program" and get Valgrind's startup message, - but I don't get any errors and I know my program has errors. - -A6. By default, Valgrind only traces the top-level process. So if your - program spawns children, they won't be traced by Valgrind by default. - Also, if your program is started by a shell script, Perl script, or - something similar, Valgrind will trace the shell, or the Perl - interpreter, or equivalent. +or maybe remove this - To trace child processes, use the --trace-children=yes option. + GLIBC_2.2.3 { + __pthread_clock_gettime; + __pthread_clock_settime; + } GLIBC_2.2; - If you are tracing large trees of processes, it can be less - disruptive to have the output sent over the network. Give - valgrind the flag --logsocket=127.0.0.1:12345 (if you want - logging output sent to port 12345 on localhost). You can - use the valgrind-listener program to listen on that port: - valgrind-listener 12345 - Obviously you have to start the listener process first. - See the documentation for more details. +or maybe add this ------------------------------------------------------------------ + GLIBC_2.2.4 { + __pthread_clock_gettime; + __pthread_clock_settime; + } GLIBC_2.2; -Q7. My threaded server process runs unbelievably slowly on - valgrind. So slowly, in fact, that at first I thought it - had completely locked up. + GLIBC_2.2.5 { + __pthread_clock_gettime; + __pthread_clock_settime; + } GLIBC_2.2; -A7. We are not completely sure about this, but one possibility - is that laptops with power management fool valgrind's - timekeeping mechanism, which is (somewhat in error) based - on the x86 RDTSC instruction. A "fix" which is claimed to - work is to run some other cpu-intensive process at the same - time, so that the laptop's power-management clock-slowing - does not kick in. We would be interested in hearing more - feedback on this. +or some combination of the above. After each change you need to delete +coregrind/libpthread.so and do make && make install. - Another possible cause is that versions prior to 1.9.6 - did not support threading on glibc 2.3.X systems well. - Hopefully the situation is much improved with 1.9.6. +I just don't know if any of the above will work. If you can find a +solution which works, I would be interested to hear it. ------------------------------------------------------------------ +To which someone replied: -Q8. My program dies, printing a message like this along the way: + I deleted this: - disInstr: unhandled instruction bytes: 0x66 0xF 0x2E 0x5 + GLIBC_2.2.3 { + __pthread_clock_gettime; + __pthread_clock_settime; + } GLIBC_2.2; + + and it worked. -A8. Valgrind doesn't support the full x86 instruction set, although - it now supports many SSE and SSE2 instructions. If you know - the failing instruction is an SSE/SSE2 instruction, you might - be able to recompile your progrma without it by using the flag - -march to gcc. Either way, let us know and we'll try to fix it. ----------------------------------------------------------------- +4. Valgrind behaves unexpectedly +----------------------------------------------------------------- -Q9. My program dies complaining that __libc_current_sigrtmin - is unimplemented. +4.1. I try running "valgrind my_program", but my_program runs normally, + and Valgrind doesn't emit any output at all. -A9. Should be fixed in 1.9.6. I would appreciate confirmation - of that. +For versions prior to 2.1.1: ------------------------------------------------------------------ +Valgrind doesn't work out-of-the-box with programs that are entirely +statically linked. It does a quick test at startup, and if it detects +that the program is statically linked, it aborts with an explanation. + +This test may fail in some obscure cases, eg. if you run a script under +Valgrind and the script interpreter is statically linked. -Q10. I upgraded to Red Hat 9 and threaded programs now act - strange / deadlock when they didn't before. +If you still want static linking, you can ask gcc to link certain +libraries statically. Try the following options: -A10. Thread support on glibc 2.3.2+ with NPTL is not as - good as on older LinuxThreads-based systems. We have - this under consideration. Avoid Red Hat >= 8.1 for - the time being, if you can. + -Wl,-Bstatic -lmyLibrary1 -lotherLibrary -Wl,-Bdynamic - 5 May 03: 1.9.6 should be significantly improved on - Red Hat 9, SuSE 8.2 and other glibc-2.3.2 systems. +Just make sure you end with -Wl,-Bdynamic so that libc is dynamically +linked. ------------------------------------------------------------------ +If you absolutely cannot use dynamic libraries, you can try statically +linking together all the .o files in coregrind/, all the .o files of the +tool of your choice (eg. those in memcheck/), and the .o files of your +program. You'll end up with a statically linked binary that runs +permanently under Valgrind's control. Note that we haven't tested this +procedure thoroughly. -Q11. I really need to use the NVidia libGL.so in my app. - Help! -A11. NVidia also noticed this it seems, and the "latest" drivers - (version 4349, apparently) come with this text +For versions 2.1.1 and later: - DISABLING CPU SPECIFIC FEATURES +Valgrind does now work with static binaries, although beware that some +of the tools won't operate as well as normal, because they have access +to less information about how the program runs. Eg. Memcheck will miss +some errors that it would otherwise find. This is because Valgrind +doesn't replace malloc() and friends with its own versions. It's best +if your program is dynamically linked with glibc. - Setting the environment variable __GL_FORCE_GENERIC_CPU to a - non-zero value will inhibit the use of CPU specific features - such as MMX, SSE, or 3DNOW!. Use of this option may result in - performance loss. This option may be useful in conjunction with - software such as the Valgrind memory debugger. +----------------------------------------------------------------- - Set __GL_FORCE_GENERIC_CPU=1 and Valgrind should work. This has - been confirmed by various people. Thanks NVidia! +4.2. My threaded server process runs unbelievably slowly on Valgrind. + So slowly, in fact, that at first I thought it had completely + locked up. ------------------------------------------------------------------ +We are not completely sure about this, but one possibility is that +laptops with power management fool Valgrind's timekeeping mechanism, +which is (somewhat in error) based on the x86 RDTSC instruction. A +"fix" which is claimed to work is to run some other cpu-intensive +process at the same time, so that the laptop's power-management +clock-slowing does not kick in. We would be interested in hearing more +feedback on this. -Q12. My program dies like this (often at exit): +Another possible cause is that versions prior to 1.9.6 did not support +threading on glibc 2.3.X systems well. Hopefully the situation is much +improved with 1.9.6 and later versions. - VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH): internal error: - (loads of text) +----------------------------------------------------------------- -A12. One possible cause is that your program modifies its - environment variables, possibly including zeroing them - all. Valgrind relies on the LD_PRELOAD, LD_LIBRARY_PATH and - VG_ARGS variables. Zeroing them will break things. +4.3. My program uses the C++ STL and string classes. Valgrind + reports 'still reachable' memory leaks involving these classes + at the exit of the program, but there should be none. - As of 1.9.6, Valgrind only uses these variables with - --trace-children=no or when executing execve(). This should - reduce the potential for problems. +First of all: relax, it's probably not a bug, but a feature. Many +implementations of the C++ standard libraries use their own memory pool +allocators. Memory for quite a number of destructed objects is not +immediately freed and given back to the OS, but kept in the pool(s) for +later re-use. The fact that the pools are not freed at the exit() of +the program cause Valgrind to report this memory as still reachable. +The behaviour not to free pools at the exit() could be called a bug of +the library though. ------------------------------------------------------------------ +Using gcc, you can force the STL to use malloc and to free memory as +soon as possible by globally disabling memory caching. Beware! Doing +so will probably slow down your program, sometimes drastically. -Q13. My program dies like this: +- With gcc 2.91, 2.95, 3.0 and 3.1, compile all source using the STL + with -D__USE_MALLOC. Beware! This is removed from gcc starting with + version 3.3. - error: /lib/librt.so.1: symbol __pthread_clock_settime, version - GLIBC_PRIVATE not defined in file libpthread.so.0 with link time - reference +- With 3.2.2 and later, you should export the environment variable + GLIBCPP_FORCE_NEW before running your program. -A13. This is a total swamp. Nevertheless there is a way out. - It's a problem which is not easy to fix. Really the problem is - that /lib/librt.so.1 refers to some symbols - __pthread_clock_settime and __pthread_clock_gettime in - /lib/libpthread.so which are not intended to be exported, ie - they are private. +There are other ways to disable memory pooling: using the malloc_alloc +template with your objects (not portable, but should work for gcc) or +even writing your own memory allocators. But all this goes beyond the +scope of this FAQ. Start by reading +http://gcc.gnu.org/onlinedocs/libstdc++/ext/howto.html#3 if you +absolutely want to do that. But beware: - Best solution is to ensure your program does not use - /lib/librt.so.1. +1) there are currently changes underway for gcc which are not totally + reflected in the docs right now ("now" == 26 Apr 03) - However .. since you're probably not using it directly, or even - knowingly, that's hard to do. You might instead be able to fix - it by playing around with coregrind/vg_libpthread.vs. Things to - try: +2) allocators belong to the more messy parts of the STL and people went + at great lengths to make it portable across platforms. Chances are + good that your solution will work on your platform, but not on + others. - Remove this +----------------------------------------------------------------------------- +4.4. The stack traces given by Memcheck (or another tool) aren't helpful. + How can I improve them? - GLIBC_PRIVATE { - __pthread_clock_gettime; - __pthread_clock_settime; - }; +If they're not long enough, use --num-callers to make them longer. - or maybe remove this +If they're not detailed enough, make sure you are compiling with -g to add +debug information. And don't strip symbol tables (programs should be +unstripped unless you run 'strip' on them; some libraries ship stripped). - GLIBC_2.2.3 { - __pthread_clock_gettime; - __pthread_clock_settime; - } GLIBC_2.2; +Also, -fomit-frame-pointer and -fstack-check can make stack traces worse. - or maybe add this +Some example sub-traces: - GLIBC_2.2.4 { - __pthread_clock_gettime; - __pthread_clock_settime; - } GLIBC_2.2; + With debug information and unstripped (best): - GLIBC_2.2.5 { - __pthread_clock_gettime; - __pthread_clock_settime; - } GLIBC_2.2; + Invalid write of size 1 + at 0x80483BF: really (malloc1.c:20) + by 0x8048370: main (malloc1.c:9) - or some combination of the above. After each change you need to - delete coregrind/libpthread.so and do make && make install. + With no debug information, unstripped: - I just don't know if any of the above will work. If you can - find a solution which works, I would be interested to hear it. + Invalid write of size 1 + at 0x80483BF: really (in /auto/homes/njn25/grind/head5/a.out) + by 0x8048370: main (in /auto/homes/njn25/grind/head5/a.out) - To which someone replied: + With no debug information, stripped: - I deleted this: + Invalid write of size 1 + at 0x80483BF: (within /auto/homes/njn25/grind/head5/a.out) + by 0x8048370: (within /auto/homes/njn25/grind/head5/a.out) + by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so) + by 0x80482CC: (within /auto/homes/njn25/grind/head5/a.out) - GLIBC_2.2.3 { - __pthread_clock_gettime; - __pthread_clock_settime; - } GLIBC_2.2; + With debug information and -fomit-frame-pointer: - and it worked. + Invalid write of size 1 + at 0x80483C4: really (malloc1.c:20) + by 0x42015703: __libc_start_main (in /lib/tls/libc-2.3.2.so) + by 0x80482CC: ??? (start.S:81) ----------------------------------------------------------------- +5. Memcheck doesn't find my bug +----------------------------------------------------------------- + +5.1. I try running "valgrind --tool=memcheck my_program" and get + Valgrind's startup message, but I don't get any errors and I know + my program has errors. + +By default, Valgrind only traces the top-level process. So if your +program spawns children, they won't be traced by Valgrind by default. +Also, if your program is started by a shell script, Perl script, or +something similar, Valgrind will trace the shell, or the Perl +interpreter, or equivalent. -Q14. My program uses the C++ STL and string classes. Valgrind - reports 'still reachable' memory leaks involving these classes - at the exit of the program, but there should be none. +To trace child processes, use the --trace-children=yes option. -A14. First of all: relax, it's probably not a bug, but a feature. - Many implementations of the C++ standard libraries use their own - memory pool allocators. Memory for quite a number of destructed - objects is not immediately freed and given back to the OS, but - kept in the pool(s) for later re-use. The fact that the pools - are not freed at the exit() of the program cause valgrind to - report this memory as still reachable. The behaviour not to - free pools at the exit() could be called a bug of the library - though. +If you are tracing large trees of processes, it can be less disruptive +to have the output sent over the network. Give Valgrind the flag +--logsocket=127.0.0.1:12345 (if you want logging output sent to port +12345 on localhost). You can use the valgrind-listener program to +listen on that port: - Using gcc, you can force the STL to use malloc and to free - memory as soon as possible by globally disabling memory caching. - Beware! Doing so will probably slow down your program, - sometimes drastically. + valgrind-listener 12345 + +Obviously you have to start the listener process first. See the +documentation for more details. + +----------------------------------------------------------------- - - With gcc 2.91, 2.95, 3.0 and 3.1, compile all source using the - STL with -D__USE_MALLOC. Beware! This is removed from gcc - starting with version 3.3. +5.2. Why doesn't Memcheck find the array overruns in this program? - - With 3.2.2 and later, you should export the environment - variable GLIBCPP_FORCE_NEW before running your program. + int static[5]; - There are other ways to disable memory pooling: using the - malloc_alloc template with your objects (not portable, but - should work for gcc) or even writing your own memory - allocators. But all this goes beyond the scope of this - FAQ. Start by reading - http://gcc.gnu.org/onlinedocs/libstdc++/ext/howto.html#3 - if you absolutely want to do that. But beware: + int main(void) + { + int stack[5]; - 1) there are currently changes underway for gcc which are not - totally reflected in the docs right now - ("now" == 26 Apr 03) + static[5] = 0; + stack [5] = 0; + + return 0; + } - 2) allocators belong to the more messy parts of the STL and - people went at great lengths to make it portable across - platforms. Chances are good that your solution will work - on your platform, but not on others. +Unfortunately, Memcheck doesn't do bounds checking on static or stack +arrays. We'd like to, but it's just not possible to do in a reasonable +way that fits with how Memcheck works. Sorry. ----------------------------------------------------------------- -Q15. My program dies with a segmentation fault, but Valgrind doesn't give - any error messages before it, or none that look related. +5.3. My program dies with a segmentation fault, but Memcheck doesn't give + any error messages before it, or none that look related. -A15. The one kind of segmentation fault that Valgrind won't give any - warnings about is writes to read-only memory. Maybe your program is - writing to a static string like this: +One possibility is that your program accesses to memory with +inappropriate permissions set, such as writing to read-only memory. +Maybe your program is writing to a static string like this: - char* s = "hello"; - s[0] = 'j'; + char* s = "hello"; + s[0] = 'j'; - or something similar. Writing to read-only memory can also apparently - make LinuxThreads behave strangely. +or something similar. Writing to read-only memory can also apparently +make LinuxThreads behave strangely. + +----------------------------------------------------------------- +6. Miscellaneous ----------------------------------------------------------------- -Q16. When I trying building Valgrind, 'make' dies partway with an - assertion failure, something like this: make: expand.c:489: - - allocated_variable_append: Assertion - `current_variable_set_list->next != 0' failed. - -A16. It's probably a bug in 'make'. Some, but not all, instances of - version 3.79.1 have this bug, see - www.mail-archive.com/bug...@gn.../msg01658.html. Try upgrading to a - more recent version of 'make'. Alternatively, we have heard that - unsetting the CFLAGS environment variable avoids the problem. +6.1. I tried writing a suppression but it didn't work. Can you + write my suppression for me? + +Yes! Use the --gen-suppressions=yes feature to spit out suppressions +automatically for you. You can then edit them if you like, eg. +combining similar automatically generated suppressions using wildcards +like '*'. + +If you really want to write suppressions by hand, read the manual +carefully. Note particularly that C++ function names must be _mangled_. ----------------------------------------------------------------- -Q17. I tried writing a suppression but it didn't work. Can you - write my suppression for me? +6.2. With Memcheck/Addrcheck's memory leak detector, what's the + difference between "definitely lost", "possibly lost", "still + reachable", and "suppressed"? + +The details are in section 3.6 of the manual. + +In short: + + - "definitely lost" means your program is leaking memory -- fix it! + + - "possibly lost" means your program is probably leaking memory, + unless you're doing funny things with pointers. -A17. Yes! Use the --gen-suppressions=yes feature to spit out - suppressions automatically for you. You can then edit them - if you like, eg. combining similar automatically generated - suppressions using wildcards like '*'. + - "still reachable" means your program is probably ok -- it didn't + free some memory it could have. This is quite common and often + reasonable. Don't use --show-reachable=yes if you don't want to see + these reports. - If you really want to write suppressions by hand, read the - manual carefully. Note particularly that C++ function names - must be _mangled_. + - "suppressed" means that a leak error has been suppressed. There are + some suppressions in the default suppression files. You can ignore + suppressed errors. ----------------------------------------------------------------- |
|
From: Nicholas N. <nj...@ca...> - 2004-04-10 00:36:35
|
CVS commit by nethercote: Update for having added Massif. M +2 -2 README 1.16 M +3 -3 valgrind.spec.in 1.13 --- valgrind/valgrind.spec.in #1.12:1.13 @@ -18,7 +18,7 @@ detailed profiling to help speed up your programs. -The Valgrind distribution includes four tools: two memory error -detectors, a thread error detector, and a cache profiler. Several other -tools have been built with Valgrind. +The Valgrind distribution includes five tools: two memory error +detectors, a thread error detector, a cache profiler and a heap profiler. +Several other tools have been built with Valgrind. %prep --- valgrind/README #1.15:1.16 @@ -22,6 +22,6 @@ The Valgrind distribution includes four tools: two memory error -detectors, a thread error detector, and a cache profiler. Several other -tools have been built with Valgrind. +detectors, a thread error detector, a cache profiler and a heap profiler. +Several other tools have been built with Valgrind. To give you an idea of what Valgrind tools do, when a program is run |
|
From: Nicholas N. <nj...@ca...> - 2004-04-12 09:09:32
|
CVS commit by nethercote: Remove illegal '-' in @VERSION@. M +1 -1 configure.in 1.108 --- valgrind/configure.in #1.107:1.108 @@ -2,5 +2,5 @@ AC_INIT(coregrind/vg_main.c) # give me a source file, any source file... AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(valgrind, 2.1.2-CVS) +AM_INIT_AUTOMAKE(valgrind, 2.1.2.CVS) AM_MAINTAINER_MODE |
|
From: Nicholas N. <nj...@ca...> - 2004-04-13 08:36:42
|
CVS commit by nethercote:
Changed error message from:
Address 0x%x is not stack'd, malloc'd or free'd
to
Address 0x%x is not stack'd, malloc'd or (recently) free'd
This makes things clearer in some circumstances, particularly when bogusly
accessing heap memory that has been freed, but Memcheck is no longer tracking.
M +1 -1 addrcheck/tests/fprw.stderr.exp 1.4
M +1 -1 helgrind/hg_main.c 1.75
M +1 -1 memcheck/mac_needs.c 1.23
M +1 -1 memcheck/tests/badfree-2trace.stderr.exp 1.6
M +1 -1 memcheck/tests/badfree.stderr.exp 1.10
M +1 -1 memcheck/tests/badjump.stderr.exp 1.9
M +1 -1 memcheck/tests/buflen_check.stderr.exp 1.8
M +1 -1 memcheck/tests/custom_alloc.stderr.exp 1.5
M +3 -3 memcheck/tests/execve.stderr.exp 1.2
M +1 -1 memcheck/tests/fprw.stderr.exp 1.10
M +1 -1 memcheck/tests/signal2.stderr.exp 1.9
M +3 -3 memcheck/tests/writev.stderr.exp 1.6
--- valgrind/addrcheck/tests/fprw.stderr.exp #1.3:1.4
@@ -26,5 +26,5 @@
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (fprw.c:22)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Invalid write of size 8
--- valgrind/helgrind/hg_main.c #1.74:1.75
@@ -2586,5 +2586,5 @@ static void pp_AddrInfo ( Addr a, AddrIn
} else {
VG_(message)(Vg_UserMsg,
- " Address %p is not stack'd, malloc'd or free'd", a);
+ " Address %p is not stack'd, malloc'd or (recently) free'd", a);
}
break;
--- valgrind/memcheck/mac_needs.c #1.22:1.23
@@ -239,5 +239,5 @@ void MAC_(pp_AddrInfo) ( Addr a, AddrInf
} else {
VG_(message)(Vg_UserMsg,
- " Address 0x%x is not stack'd, malloc'd or free'd", a);
+ " Address 0x%x is not stack'd, malloc'd or (recently) free'd",a);
}
break;
--- valgrind/memcheck/tests/badfree-2trace.stderr.exp #1.5:1.6
@@ -2,5 +2,5 @@
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (badfree.c:12)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Invalid free() / delete / delete[]
--- valgrind/memcheck/tests/badfree.stderr.exp #1.9:1.10
@@ -2,5 +2,5 @@
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (badfree.c:12)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Invalid free() / delete / delete[]
--- valgrind/memcheck/tests/badjump.stderr.exp #1.8:1.9
@@ -4,5 +4,5 @@
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Process terminating with default action of signal 11 (SIGSEGV)
--- valgrind/memcheck/tests/buflen_check.stderr.exp #1.7:1.8
@@ -3,5 +3,5 @@
by 0x........: __libc_start_main (...libc...)
by 0x........: ...
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param socketcall.getsockname(namelen_in) contains uninitialised or unaddressable byte(s)
--- valgrind/memcheck/tests/custom_alloc.stderr.exp #1.4:1.5
@@ -9,5 +9,5 @@
at 0x........: custom_free (custom_alloc.c:54)
by 0x........: main (custom_alloc.c:83)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Mismatched free() / delete / delete []
--- valgrind/memcheck/tests/execve.stderr.exp #1.1:1.2
@@ -2,13 +2,13 @@
at 0x........: execve (in /...libc...)
by 0x........: main (execve.c:8)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param execve(argv[i]) contains uninitialised or unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: main (execve.c:8)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Syscall param execve(envp[i]) contains uninitialised or unaddressable byte(s)
at 0x........: execve (in /...libc...)
by 0x........: main (execve.c:8)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
--- valgrind/memcheck/tests/fprw.stderr.exp #1.9:1.10
@@ -38,5 +38,5 @@
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (fprw.c:22)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Invalid write of size 8
--- valgrind/memcheck/tests/signal2.stderr.exp #1.8:1.9
@@ -1,3 +1,3 @@
Invalid write of size 4
at 0x........: main (signal2.c:17)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
--- valgrind/memcheck/tests/writev.stderr.exp #1.5:1.6
@@ -4,5 +4,5 @@
at 0x........: writev (in /...libc...)
by 0x........: main (writev.c:56)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EFAULT as expected
@@ -10,5 +10,5 @@
at 0x........: writev (in /...libc...)
by 0x........: main (writev.c:68)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected
@@ -16,5 +16,5 @@
at 0x........: readv (in /...libc...)
by 0x........: main (writev.c:76)
- Address 0x........ is not stack'd, malloc'd or free'd
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
Received EINVAL as expected
|
|
From: Nicholas N. <nj...@ca...> - 2004-04-16 07:25:37
|
CVS commit by nethercote: Fix typo, and update bug-reporting procedure. M +3 -3 README 1.17 --- valgrind/README #1.16:1.17 @@ -21,5 +21,5 @@ detailed profiling to help speed up your programs. -The Valgrind distribution includes four tools: two memory error +The Valgrind distribution includes five tools: two memory error detectors, a thread error detector, a cache profiler and a heap profiler. Several other tools have been built with Valgrind. @@ -87,6 +87,6 @@ 6. See if it works. Try "valgrind ls -l". Either this works, - or it bombs out complaining it can't find argc/argv/envp. - In that case, mail me a bug report. + or it bombs out with some complaint. In that case, please let + us know (see valgrind.kde.org/bugs.html). Important! Do not move the valgrind installation into a place |
|
From: Nicholas N. <nj...@ca...> - 2004-04-18 12:23:10
|
CVS commit by nethercote:
Introduce uWiden, similar to uCCall, uCond, etc.
M +9 -24 coregrind/vg_to_ucode.c 1.136
M +11 -0 coregrind/vg_translate.c 1.77
M +2 -0 include/vg_skin.h.base 1.17
--- valgrind/coregrind/vg_to_ucode.c #1.135:1.136
@@ -562,10 +562,4 @@ static void setFlagsFromUOpcode ( UCodeB
}
-__inline__
-void VG_(set_cond_field) ( UCodeBlock* cb, Condcode cond )
-{
- LAST_UINSTR(cb).cond = cond;
-}
-
/*------------------------------------------------------------*/
/*--- JMP helpers ---*/
@@ -1330,6 +1324,5 @@ Addr dis_movx_E_G ( UCodeBlock* cb,
uInstr2(cb, GET, szs, ArchReg, eregOfRM(rm), TempReg, tmpv);
uInstr1(cb, WIDEN, szd, TempReg, tmpv);
- LAST_UINSTR(cb).extra4b = szs;
- LAST_UINSTR(cb).signed_widen = sign_extend;
+ uWiden(cb, szs, sign_extend);
uInstr2(cb, PUT, szd, TempReg, tmpv, ArchReg, gregOfRM(rm));
DIP("mov%c%c%c %s,%s\n", sign_extend ? 's' : 'z',
@@ -1346,6 +1339,5 @@ Addr dis_movx_E_G ( UCodeBlock* cb,
uInstr2(cb, LOAD, szs, TempReg, tmpa, TempReg, tmpa);
uInstr1(cb, WIDEN, szd, TempReg, tmpa);
- LAST_UINSTR(cb).extra4b = szs;
- LAST_UINSTR(cb).signed_widen = sign_extend;
+ uWiden(cb, szs, sign_extend);
uInstr2(cb, PUT, szd, TempReg, tmpa, ArchReg, gregOfRM(rm));
DIP("mov%c%c%c %s,%s\n", sign_extend ? 's' : 'z',
@@ -2720,6 +2712,5 @@ Addr dis_bt_G_E ( UCodeBlock* cb,
if (sz == 2) {
uInstr1(cb, WIDEN, 4, TempReg, t_bitno);
- LAST_UINSTR(cb).extra4b = 2;
- LAST_UINSTR(cb).signed_widen = False;
+ uWiden(cb, 2, False);
}
@@ -5351,6 +5342,5 @@ static Addr disInstr ( UCodeBlock* cb, A
/* Widen %AL to 32 bits, so it's all defined when we push it. */
uInstr1(cb, WIDEN, 4, TempReg, t1);
- LAST_UINSTR(cb).extra4b = 1;
- LAST_UINSTR(cb).signed_widen = False;
+ uWiden(cb, 1, False);
uInstr0(cb, CALLM_S, 0);
uInstr1(cb, PUSH, 4, TempReg, t1);
@@ -5370,6 +5360,5 @@ static Addr disInstr ( UCodeBlock* cb, A
/* Widen %AL to 32 bits, so it's all defined when we push it. */
uInstr1(cb, WIDEN, 4, TempReg, t1);
- LAST_UINSTR(cb).extra4b = 2;
- LAST_UINSTR(cb).signed_widen = False;
+ uWiden(cb, 2, False);
uInstr0(cb, CALLM_S, 0);
uInstr1(cb, PUSH, 4, TempReg, t1);
@@ -5391,6 +5380,5 @@ static Addr disInstr ( UCodeBlock* cb, A
/* Widen %AX to 32 bits, so it's all defined when we push it. */
uInstr1(cb, WIDEN, 4, TempReg, t1);
- LAST_UINSTR(cb).extra4b = 2;
- LAST_UINSTR(cb).signed_widen = False;
+ uWiden(cb, 2, False);
uInstr0(cb, CALLM_S, 0);
uInstr1(cb, PUSH, 4, TempReg, t1);
@@ -5411,6 +5399,5 @@ static Addr disInstr ( UCodeBlock* cb, A
uInstr2(cb, GET, 2, ArchReg, R_EAX, TempReg, t1);
uInstr1(cb, WIDEN, 4, TempReg, t1); /* 4 == dst size */
- LAST_UINSTR(cb).extra4b = 2; /* the source size */
- LAST_UINSTR(cb).signed_widen = True;
+ uWiden(cb, 2, True);
uInstr2(cb, PUT, 4, TempReg, t1, ArchReg, R_EAX);
DIP("cwd\n");
@@ -5419,6 +5406,5 @@ static Addr disInstr ( UCodeBlock* cb, A
uInstr2(cb, GET, 1, ArchReg, R_EAX, TempReg, t1);
uInstr1(cb, WIDEN, 2, TempReg, t1); /* 2 == dst size */
- LAST_UINSTR(cb).extra4b = 1; /* the source size */
- LAST_UINSTR(cb).signed_widen = True;
+ uWiden(cb, 1, True);
uInstr2(cb, PUT, 2, TempReg, t1, ArchReg, R_EAX);
DIP("cbw\n");
@@ -6344,6 +6330,5 @@ static Addr disInstr ( UCodeBlock* cb, A
/* Widen %AL to 32 bits, so it's all defined when we add it. */
uInstr1(cb, WIDEN, 4, TempReg, t2);
- LAST_UINSTR(cb).extra4b = 1;
- LAST_UINSTR(cb).signed_widen = False;
+ uWiden(cb, 1, False);
uInstr2(cb, ADD, sz, TempReg, t2, TempReg, t1); /* add AL to eBX */
uInstr2(cb, LOAD, 1, TempReg, t1, TempReg, t2); /* get byte at t1 into t2 */
--- valgrind/coregrind/vg_translate.c #1.76:1.77
@@ -235,4 +235,15 @@ void VG_(set_flag_fields) ( UCodeBlock*
}
+void VG_(set_cond_field) ( UCodeBlock* cb, Condcode cond )
+{
+ LAST_UINSTR(cb).cond = cond;
+}
+
+void VG_(set_widen_fields) ( UCodeBlock* cb, UInt szs, Bool is_signed )
+{
+ LAST_UINSTR(cb).extra4b = szs;
+ LAST_UINSTR(cb).signed_widen = is_signed;
+}
+
Bool VG_(any_flag_use) ( UInstr* u )
--- valgrind/include/vg_skin.h.base #1.16:1.17
@@ -1103,4 +1103,5 @@
UChar regparms_n, Bool has_ret_val );
extern void VG_(set_cond_field) ( UCodeBlock* cb, Condcode code );
+extern void VG_(set_widen_fields) ( UCodeBlock* cb, UInt szs, Bool is_signed );
extern void VG_(copy_UInstr) ( UCodeBlock* cb, UInstr* instr );
@@ -1116,4 +1117,5 @@
#define uCCall VG_(set_ccall_fields)
#define uCond VG_(set_cond_field)
+#define uWiden VG_(set_widen_fields)
#define uFlagsRWU VG_(set_flag_fields)
#define newTemp VG_(get_new_temp)
|
|
From: Nicholas N. <nj...@ca...> - 2004-04-21 07:22:54
|
CVS commit by nethercote:
Update for compulsory --tool
M +3 -3 README 1.18
--- valgrind/README #1.17:1.18
@@ -86,7 +86,7 @@
require that.
- 6. See if it works. Try "valgrind ls -l". Either this works,
- or it bombs out with some complaint. In that case, please let
- us know (see valgrind.kde.org/bugs.html).
+ 6. See if it works. Try "valgrind --tool-memcheck ls -l". Either
+ this works, or it bombs out with some complaint. In that case,
+ please let us know (see valgrind.kde.org/bugs.html).
Important! Do not move the valgrind installation into a place
|
|
From: Doug R. <df...@nl...> - 2004-04-21 09:12:54
|
On Wednesday 21 April 2004 08:22, Nicholas Nethercote wrote: > CVS commit by nethercote: > > Update for compulsory --tool > > > M +3 -3 README 1.18 > > > --- valgrind/README #1.17:1.18 > @@ -86,7 +86,7 @@ > require that. > > - 6. See if it works. Try "valgrind ls -l". Either this works, > - or it bombs out with some complaint. In that case, please let > - us know (see valgrind.kde.org/bugs.html). > + 6. See if it works. Try "valgrind --tool-memcheck ls -l". Either > + this works, or it bombs out with some complaint. In that case, > + please let us know (see valgrind.kde.org/bugs.html). > > Important! Do not move the valgrind installation into a place Shouldn't that be --tool=memcheck? |
|
From: Nicholas N. <nj...@ca...> - 2004-04-21 09:17:29
|
On Wed, 21 Apr 2004, Doug Rabson wrote: > Shouldn't that be --tool=memcheck? yep, fixed, thanks |
|
From: Nicholas N. <nj...@ca...> - 2004-04-21 09:17:24
|
CVS commit by nethercote:
fix typo
M +1 -1 README 1.19
--- valgrind/README #1.18:1.19
@@ -86,5 +86,5 @@
require that.
- 6. See if it works. Try "valgrind --tool-memcheck ls -l". Either
+ 6. See if it works. Try "valgrind --tool=memcheck ls -l". Either
this works, or it bombs out with some complaint. In that case,
please let us know (see valgrind.kde.org/bugs.html).
|
|
From: Tom H. <th...@cy...> - 2004-04-22 07:56:54
|
CVS commit by thughes:
Make support for the FBIOGET ioctls conditional on linux/fb.h being
present at compile time.
M +1 -1 configure.in 1.109
M +4 -0 coregrind/vg_syscalls.c 1.95
M +2 -0 coregrind/vg_unsafe.h 1.27
--- valgrind/configure.in #1.108:1.109
@@ -332,5 +332,5 @@
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h sys/statfs.h sys/time.h sys/endian.h endian.h termios.h unistd.h utime.h])
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h sys/statfs.h sys/time.h sys/endian.h endian.h termios.h unistd.h utime.h linux/fb.h])
# Checks for typedefs, structures, and compiler characteristics.
--- valgrind/coregrind/vg_syscalls.c #1.94:1.95
@@ -3232,4 +3232,5 @@ PRE(ioctl)
break;
+#ifdef HAVE_LINUX_FB_H
case FBIOGET_VSCREENINFO: /* 0x4600 */
SYSCALL_TRACK( pre_mem_write,tid,
@@ -3242,4 +3243,5 @@ PRE(ioctl)
sizeof(struct fb_fix_screeninfo));
break;
+#endif
/* We don't have any specific information on it, so
@@ -3596,4 +3598,5 @@ POST(ioctl)
break;
+#ifdef HAVE_LINUX_FB_H
case FBIOGET_VSCREENINFO: //0x4600
if (res == 0)
@@ -3604,4 +3607,5 @@ POST(ioctl)
VG_TRACK( post_mem_write,arg3, sizeof(struct fb_fix_screeninfo));
break;
+#endif
/* We don't have any specific information on it, so
--- valgrind/coregrind/vg_unsafe.h #1.26:1.27
@@ -64,5 +64,7 @@
#include <signal.h> /* for siginfo_t */
#include <linux/timex.h> /* for adjtimex */
+#ifdef HAVE_LINUX_FB_H
#include <linux/fb.h> /* for fb_* structs */
+#endif
#define __USE_LARGEFILE64
|
|
From: Nicholas N. <nj...@ca...> - 2004-04-25 12:36:08
|
CVS commit by nethercote:
Fix supps for Valgrind's own libpthread leak.
M +1 -0 glibc-2.1.supp 1.11
M +1 -0 glibc-2.2.supp 1.24
M +1 -0 glibc-2.3.supp 1.12
--- valgrind/glibc-2.1.supp #1.10:1.11
@@ -177,4 +177,5 @@
my_malloc/get_or_allocate_specifics_ptr/pthread_key_create(Leak)
Memcheck:Leak
+ fun:malloc
fun:my_malloc
fun:get_or_allocate_specifics_ptr
--- valgrind/glibc-2.2.supp #1.23:1.24
@@ -455,4 +455,5 @@
my_malloc/get_or_allocate_specifics_ptr/pthread_key_create(Leak)
Memcheck:Leak
+ fun:malloc
fun:my_malloc
fun:get_or_allocate_specifics_ptr
--- valgrind/glibc-2.3.supp #1.11:1.12
@@ -173,4 +173,5 @@
my_malloc/get_or_allocate_specifics_ptr/pthread_key_create(Leak)
Memcheck:Leak
+ fun:malloc
fun:my_malloc
fun:get_or_allocate_specifics_ptr
|
|
From: Robert W. <rj...@du...> - 2004-04-29 08:50:48
|
CVS commit by rjwalsh:
Suppressions for Fedora Core 2.
M +15 -0 glibc-2.3.supp 1.13
--- valgrind/glibc-2.3.supp #1.12:1.13
@@ -115,4 +115,12 @@
}
+#-------- glibc 2.3.3/ Fedora Core 2
+{
+ dl_relocate_object/dl_main
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_main
+}
+
#-------- Data races
{
@@ -124,4 +132,11 @@
}
{
+ _dl_lookup_symbol_x/fixup/_dl_runtime_resolve
+ Helgrind:Eraser
+ fun:_dl_lookup_symbol_x
+ fun:fixup
+ fun:_dl_runtime_resolve
+}
+{
_dl_lookup_versioned_symbol_internal/fixup/_dl_runtime_resolve
Helgrind:Eraser
|
|
From: Nicholas N. <nj...@ca...> - 2004-05-05 10:46:27
|
CVS commit by nethercote:
Fix for bug #80942.
Addrcheck wasn't doing overlap checking as it should. This is because
mac_replace_strmem.o was being linked with vgskin_addrcheck.so instead of
vgpreload_addrcheck.so. I fixed the Makefile, and also moved
_VG_USERREQ__MEMCHECK_GET_RECORD_OVERLAP so Addrcheck could see it. And I
added the 'overlap' test (from memcheck/tests/) to Addrcheck's regression
suite.
A addrcheck/tests/overlap.stderr.exp 1.1
A addrcheck/tests/overlap.stdout.exp 1.1
A addrcheck/tests/overlap.vgtest 1.1
M +7 -4 addrcheck/Makefile.am 1.49
M +2 -1 addrcheck/tests/Makefile.am 1.8
M +4 -0 memcheck/mac_needs.c 1.25
M +0 -4 memcheck/mc_clientreqs.c 1.19
--- valgrind/addrcheck/Makefile.am #1.48:1.49
@@ -18,10 +18,13 @@
../memcheck/mac_leakcheck.o \
../memcheck/mac_malloc_wrappers.o \
- ../memcheck/mac_needs.o \
- ../memcheck/mac_replace_strmem.o
+ ../memcheck/mac_needs.o
vgpreload_addrcheck_so_SOURCES =
-vgpreload_addrcheck_so_LDADD = $(top_builddir)/coregrind/vg_replace_malloc.o
-vgpreload_addrcheck_so_DEPENDENCIES = $(top_builddir)/coregrind/vg_replace_malloc.o
+vgpreload_addrcheck_so_LDADD = \
+ $(top_builddir)/coregrind/vg_replace_malloc.o \
+ ../memcheck/mac_replace_strmem.o
+vgpreload_addrcheck_so_DEPENDENCIES = \
+ $(top_builddir)/coregrind/vg_replace_malloc.o \
+ ../memcheck/mac_replace_strmem.o
vgpreload_addrcheck_so_LDFLAGS = -shared -Wl,-z,interpose,-z,initfirst
--- valgrind/addrcheck/tests/Makefile.am #1.7:1.8
@@ -9,3 +9,4 @@
$(addsuffix .stderr.exp,$(INSN_TESTS)) \
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
- $(addsuffix .vgtest,$(INSN_TESTS))
+ $(addsuffix .vgtest,$(INSN_TESTS)) \
+ overlap.stderr.exp overlap.stdout.exp overlap.vgtest
--- valgrind/memcheck/mac_needs.c #1.24:1.25
@@ -874,4 +874,8 @@ Bool MAC_(handle_common_client_requests)
}
+ case _VG_USERREQ__MEMCHECK_GET_RECORD_OVERLAP:
+ *ret = (Addr)MAC_(record_overlap_error);
+ return True;
+
default:
return False;
--- valgrind/memcheck/mc_clientreqs.c #1.18:1.19
@@ -233,8 +233,4 @@ Bool SK_(handle_client_request) ( Thread
break;
- case _VG_USERREQ__MEMCHECK_GET_RECORD_OVERLAP:
- *ret = (Addr)MAC_(record_overlap_error);
- break;
-
default:
if (MAC_(handle_common_client_requests)(tid, arg, ret )) {
|
|
From: Jeremy F. <je...@go...> - 2004-06-03 10:01:30
|
CVS commit by fitzhardinge:
Partial fix for bug 76869. This fixes the problem with returning from
a signal handler when VDSOs are turned off in FC2. Note that we don't
(yet) support VDSOs being on (use "echo 0 > /proc/sys/kernel/vdso").
M +1 -0 coregrind/vg_include.h 1.191
M +5 -1 coregrind/vg_signals.c 1.68
M +5 -0 coregrind/vg_syscall.S 1.12
M +1 -1 include/vg_kerneliface.h 1.17
--- valgrind/coregrind/vg_include.h #1.190:1.191
@@ -1668,4 +1668,5 @@ extern Int VG_(do_syscall) ( UInt, ... )
extern Int VG_(clone) ( Int (*fn)(void *), void *stack, Int flags, void *arg,
Int *child_tid, Int *parent_tid);
+extern void VG_(sigreturn)(void);
/* ---------------------------------------------------------------------
--- valgrind/coregrind/vg_syscall.S #1.11:1.12
@@ -113,4 +113,9 @@
pop %ebx
ret
+
+.globl VG_(sigreturn)
+VG_(sigreturn):
+ movl $__NR_rt_sigreturn, %eax
+ int $0x80
##--------------------------------------------------------------------##
--- valgrind/coregrind/vg_signals.c #1.67:1.68
@@ -354,4 +354,7 @@ void calculate_SKSS_from_SCSS ( SKSS* ds
skss_flags |= VKI_SA_SIGINFO;
+ /* use our own restorer */
+ skss_flags |= VKI_SA_RESTORER;
+
/* Create SKSS entry for this signal. */
@@ -411,9 +414,10 @@ void VG_(handle_SCSS_change) ( Bool forc
ksa.ksa_handler = vg_skss.skss_per_sig[sig].skss_handler;
ksa.ksa_flags = vg_skss.skss_per_sig[sig].skss_flags;
+ ksa.ksa_restorer = VG_(sigreturn);
+
vg_assert(ksa.ksa_flags & VKI_SA_ONSTACK);
VG_(ksigfillset)( &ksa.ksa_mask );
VG_(ksigdelset)( &ksa.ksa_mask, VKI_SIGKILL );
VG_(ksigdelset)( &ksa.ksa_mask, VKI_SIGSTOP );
- ksa.ksa_restorer = NULL;
if (VG_(clo_trace_signals))
--- valgrind/include/vg_kerneliface.h #1.16:1.17
@@ -250,7 +250,7 @@ struct vki_ucontext {
#define VKI_SA_NOMASK VKI_SA_NODEFER
#define VKI_SA_NOCLDWAIT 0x00000002
+#define VKI_SA_RESTORER 0x04000000
#if 0
#define VKI_SA_INTERRUPT 0x20000000 /* dummy -- ignored */
-#define VKI_SA_RESTORER 0x04000000
#endif
|
|
From: Nicholas N. <nj...@ca...> - 2004-06-03 10:20:43
|
On Thu, 3 Jun 2004, Jeremy Fitzhardinge wrote: > CVS commit by fitzhardinge: > > Partial fix for bug 76869. This fixes the problem with returning from > a signal handler when VDSOs are turned off in FC2. Note that we don't > (yet) support VDSOs being on (use "echo 0 > /proc/sys/kernel/vdso"). Next time, can you run the regression tests before committing? I just did, and went from no errors (pre-check in) to this: == 153 tests, 5 stderr failures, 1 stdout failure ================= corecheck/tests/sigkill (stderr) none/tests/coolo_sigaction (stdout) none/tests/coolo_sigaction (stderr) none/tests/syscall-restart1 (stderr) none/tests/syscall-restart2 (stderr) none/tests/system (stderr) All of them died with this error: valgrind: vg_signals.c:444 (vgPlain_handle_SCSS_change): Assertion `ksa_old.ksa_restorer == ((void *)0)' failed. at 0xB802A535: vgPlain_skin_assert_fail (vg_mylibc.c:1211) by 0xB802A534: assert_fail (vg_mylibc.c:1207) by 0xB802A572: vgPlain_core_assert_fail (vg_mylibc.c:1218) by 0xB802E0C3: vgPlain_handle_SCSS_change (vg_signals.c:447) sched status: Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 at 0xABFFF042: ??? by 0x4202780D: sigaction (in /lib/tls/libc-2.3.2.so) by 0x4203FA94: do_system (in /lib/tls/libc-2.3.2.so) by 0x8048344: main (system.c:8) N |
|
From: Tom H. <th...@cy...> - 2004-06-03 18:42:40
|
CVS commit by thughes:
Add an extra suppression for Fedora Core 2/glibc 2.3.3 systems.
M +6 -0 glibc-2.3.supp 1.14
--- valgrind/glibc-2.3.supp #1.13:1.14
@@ -122,4 +122,10 @@
fun:dl_main
}
+{
+ _dl_relocate_object/dl_open_worker
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_open_worker
+}
#-------- Data races
|