You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(26) |
2
(24) |
|
3
(21) |
4
(23) |
5
(19) |
6
(24) |
7
(27) |
8
(28) |
9
(18) |
|
10
(15) |
11
(14) |
12
(17) |
13
(18) |
14
(24) |
15
(27) |
16
(17) |
|
17
(26) |
18
(22) |
19
(27) |
20
(25) |
21
(19) |
22
(22) |
23
(17) |
|
24
(30) |
25
(21) |
26
(14) |
27
(20) |
28
(25) |
29
(23) |
30
(22) |
|
From: Sunny D. <int...@ya...> - 2012-06-07 20:23:16
|
Those invalid reads are from pth and are understood to be safe to ignore. I had tried 3.7.0 while debugging the earlier issue but reverted back to stable to reduce the moving parts. May be, now that I am past the backdoor, I can go back to 3.7.0. -Sunny ----- Original Message ----- From: Philippe Waroquiers <phi...@sk...> To: Sunny Das <int...@ya...> Cc: "val...@li..." <val...@li...> Sent: Thursday, June 7, 2012 1:17 PM Subject: Re: [Valgrind-developers] vmware backdoor patch On Thu, 2012-06-07 at 12:33 -0700, Sunny Das wrote: > Looks like process died, not the valgrind. Other than that message in the end, > the log file consists of backtraces of usual 'invalid reads' Also, invalid reads should better be fixed (or at least understood and proved "safe"), as these invalid reads might cause e.g. access to unmapped memory, causing a SEGV. Again, the 3.7.0 V gdbserver will help to understand what is going on. Philippe |
|
From: Philippe W. <phi...@sk...> - 2012-06-07 20:17:54
|
On Thu, 2012-06-07 at 12:33 -0700, Sunny Das wrote: > Looks like process died, not the valgrind. Other than that message in the end, > the log file consists of backtraces of usual 'invalid reads' Also, invalid reads should better be fixed (or at least understood and proved "safe"), as these invalid reads might cause e.g. access to unmapped memory, causing a SEGV. Again, the 3.7.0 V gdbserver will help to understand what is going on. Philippe |
|
From: Philippe W. <phi...@sk...> - 2012-06-07 20:09:12
|
On Thu, 2012-06-07 at 12:33 -0700, Sunny Das wrote: > Philippe, > > I am using valgrind-3.6.1, which is the stable version on Gentoo. > > Here is the message: > ==5377== Process terminating with default action of signal 11 (SIGSEGV): dumping core > ==5377== Access not within mapped region at address 0x100000008 This might be caused by a bug in your program. > Do u think its died in tricky JITted code? How do I debug this? > I am slipping deadlines here...:( I have used valgrind for a very > long time and never gotten stuck like this. JITted code will be the translation of the application code. To debug it, you must upgrade to Valgrind 3.7.0. This version has an embedded gdbserver, which means you can debug your application under Valgrind and e.g. understand where this 0x100000008 is coming from. Just start Valgrind as usual, but give option --vgdb-error=0 and follow the instructions on the screen. The 3.7.0 user manual has a specific chapter about how to use the V gdbserver. It contains a lot of useful information. Philippe |
|
From: Sunny D. <int...@ya...> - 2012-06-07 19:34:43
|
Philippe, I am using valgrind-3.6.1, which is the stable version on Gentoo. Here is the message: ==5377== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==5377== Access not within mapped region at address 0x100000008 Looks like process died, not the valgrind. Other than that message in the end, the log file consists of backtraces of usual 'invalid reads' and some non-leak leaks etc. There is a core file created which when I do a 'file' on, it says core was generated by valgrind, but gdb'ing it with valgrind or my binary doesn't produce a valid backtrace. Note that I can gdb both valgrind and my binary with line numbers and all debugs perfectly fine. Do u think its died in tricky JITted code? How do I debug this? I am slipping deadlines here...:( I have used valgrind for a very long time and never gotten stuck like this. Thanks for all the help. I appreciate it. -Sunny ----- Original Message ----- From: Philippe Waroquiers <phi...@sk...> To: Sunny Das <int...@ya...> Cc: "val...@li..." <val...@li...> Sent: Thursday, June 7, 2012 10:37 AM Subject: Re: [Valgrind-developers] vmware backdoor patch On Wed, 2012-06-06 at 16:08 -0700, Sunny Das wrote: > I went ahead and ripped all the 8 functions out and replaced the > part which does backdoor assembly into their own functions with correct signature, > handling the returns properly. And I went past that issue of backdoor. That is good news. > > Now, I am running into another weird issue where valgrind crashed > somewhere and I can't figure out where because the backtrace is > all '??'. This happens even if I run the program inline inside > the gdb. valgrind was built with splitdebug in gentoo and so was glibc. > The valgrind debug symbols are all in /usr/lib/debug/usr/lib64/valgrind/ > and /usr/lib/debug/usr/bin/valgrind.debug and glibc debug symbols are > in/usr/lib/debug/lib64. Why is gdb refusing to give me a proper backtrace? Might be because the problem happens in JITted code (i.e. the code dynamically generated by Valgrind starting from your application code). GDB then does not have any information about what these program counters could be. Now, if Valgrind is "internally" crashing, usually (at least for me), it outputs a nice crash message, giving its own backtrace, and a backtrace for all the "application threads". It would help to have some info such as: * which Valgrind version * what is the exact crash message you get If you obtain no stacktrace at all, I would suggest to avoid compiling V with separate debug info. Philippe |
|
From: Maynard J. <may...@us...> - 2012-06-07 18:53:21
|
Hi, Julian, Do you have a date yet that you're targeting for the next release? Thanks. -Maynard |
|
From: Philippe W. <phi...@sk...> - 2012-06-07 17:37:58
|
On Wed, 2012-06-06 at 16:08 -0700, Sunny Das wrote: > I went ahead and ripped all the 8 functions out and replaced the > part which does backdoor assembly into their own functions with correct signature, > handling the returns properly. And I went past that issue of backdoor. That is good news. > > Now, I am running into another weird issue where valgrind crashed > somewhere and I can't figure out where because the backtrace is > all '??'. This happens even if I run the program inline inside > the gdb. valgrind was built with splitdebug in gentoo and so was glibc. > The valgrind debug symbols are all in /usr/lib/debug/usr/lib64/valgrind/ > and /usr/lib/debug/usr/bin/valgrind.debug and glibc debug symbols are > in/usr/lib/debug/lib64. Why is gdb refusing to give me a proper backtrace? Might be because the problem happens in JITted code (i.e. the code dynamically generated by Valgrind starting from your application code). GDB then does not have any information about what these program counters could be. Now, if Valgrind is "internally" crashing, usually (at least for me), it outputs a nice crash message, giving its own backtrace, and a backtrace for all the "application threads". It would help to have some info such as: * which Valgrind version * what is the exact crash message you get If you obtain no stacktrace at all, I would suggest to avoid compiling V with separate debug info. Philippe |
|
From: <sv...@va...> - 2012-06-07 16:52:51
|
petarj 2012-06-07 17:52:41 +0100 (Thu, 07 Jun 2012)
New Revision: 2377
Log:
Small improvement for getIReg on MIPS when reading from r0.
zero register on MIPS is actually a constant, and front end should be aware of
that. MIPS port is currently tracked as bug #270777.
Modified files:
trunk/priv/guest_mips_toIR.c
Modified: trunk/priv/guest_mips_toIR.c (+7 -3)
===================================================================
--- trunk/priv/guest_mips_toIR.c 2012-06-07 09:59:53 +01:00 (rev 2376)
+++ trunk/priv/guest_mips_toIR.c 2012-06-07 17:52:41 +01:00 (rev 2377)
@@ -701,9 +701,13 @@
static IRExpr *getIReg(UInt iregNo)
{
- IRType ty = mode64 ? Ity_I64 : Ity_I32;
- vassert(iregNo < 32);
- return IRExpr_Get(integerGuestRegOffset(iregNo), ty);
+ if (0 == iregNo) {
+ return mode64 ? mkU64(0x0) : mkU32(0x0);
+ } else {
+ IRType ty = mode64 ? Ity_I64 : Ity_I32;
+ vassert(iregNo < 32);
+ return IRExpr_Get(integerGuestRegOffset(iregNo), ty);
+ }
}
static IRExpr *getHI(void)
|
|
From: <sv...@va...> - 2012-06-07 11:38:49
|
sewardj 2012-06-07 12:38:40 +0100 (Thu, 07 Jun 2012)
New Revision: 12619
Log:
mips32-linux port: add missing (empty) stderr.exp files.
Added files:
trunk/none/tests/mips32/FPUarithmetic.stderr.exp
trunk/none/tests/mips32/LoadStore.stderr.exp
trunk/none/tests/mips32/LoadStore1.stderr.exp
trunk/none/tests/mips32/MIPS32int.stderr.exp
trunk/none/tests/mips32/MemCpyTest.stderr.exp
trunk/none/tests/mips32/MoveIns.stderr.exp
trunk/none/tests/mips32/branches.stderr.exp
trunk/none/tests/mips32/round.stderr.exp
trunk/none/tests/mips32/vfp.stderr.exp
Added: trunk/none/tests/mips32/MoveIns.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/LoadStore1.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/branches.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/FPUarithmetic.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/vfp.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/MemCpyTest.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/MIPS32int.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/LoadStore.stderr.exp (+0 -0)
===================================================================
Added: trunk/none/tests/mips32/round.stderr.exp (+0 -0)
===================================================================
|
|
From: Sunny D. <int...@ya...> - 2012-06-07 11:31:00
|
I forgot to mention that I can gdb my daemons perfectly fine with all the debug information like line numbers, local variables and code listing etc. Its only when valgrind crashes, the backtrace is all '??'.
-Sunny
----- Original Message -----
From: Sunny Das <int...@ya...>
To: Philippe Waroquiers <phi...@sk...>
Cc: "val...@li..." <val...@li...>
Sent: Wednesday, June 6, 2012 4:08 PM
Subject: Re: [Valgrind-developers] vmware backdoor patch
I went ahead and ripped all the 8 functions out and replaced the part which does backdoor assembly into their own functions with correct signature, handling the returns properly. And I went past that issue of backdoor.
Now, I am running into another weird issue where valgrind crashed somewhere and I can't figure out where because the backtrace is all '??'. This happens even if I run the program inline inside the gdb. valgrind was built with splitdebug in gentoo and so was glibc. The valgrind debug symbols are all in /usr/lib/debug/usr/lib64/valgrind/ and /usr/lib/debug/usr/bin/valgrind.debug and glibc debug symbols are in/usr/lib/debug/lib64. Why is gdb refusing to give me a proper backtrace?
-Sunny
----- Original Message -----
From: Philippe Waroquiers <phi...@sk...>
To: Sunny Das <int...@ya...>
Cc: "val...@li..." <val...@li...>
Sent: Wednesday, June 6, 2012 10:02 AM
Subject: Re: [Valgrind-developers] vmware backdoor patch
On Wed, 2012-06-06 at 07:14 -0700, Sunny Das wrote:
> So, basically, I can't do simple things like strlen, malloc....:( Man that sucks big time.
> How do I segregate the darn thing like that? And its someone else's code I am ripping apart.
Depending on the structure of this code, it might be easy or might be
very tricky.
If the special sequence(s) of instruction that triggers the vmware
backdoor is at well isolated and specific place(s), then it is should
be trivial to put an "if" around it.
So, something like:
...
surrounding code doing malloc/free/....
...
asm("... special instruction sequence of vmware")
...
some other code doing malloc/free/...
Then just replace the asm by:
if RUNNING_ON_VALGRIND
SIMD_CALL (valgrind_vmware_backdoor_fn, ...)
else
asm ("...")
keep all the rest as is,
and have your function valgrind_vmware_backdoor_fn doing the magical
instructions with the same asm sequence, and returning the values
as expected by the inline asm.
If there are several tricky interactions between the surrounding code
and the special asm, then I think it is still possible but more
of these valgrind specific fn will have to be written.
If you do not have access to the above code and cannot modify it (so,
if you just have a "vmware closed source library", then
you need to ask vmware developpers to do this for you.
Philippe
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-developers mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: <sv...@va...> - 2012-06-07 09:32:58
|
sewardj 2012-06-07 10:32:40 +0100 (Thu, 07 Jun 2012)
New Revision: 12618
Log:
Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mip...@rt..., Bug 270777.
Valgrind: new non-test files for mips32-linux.
Added directories:
trunk/none/tests/mips32/
trunk/none/tests/mips32/.deps/
Added files:
trunk/none/tests/mips32/.deps/FPUarithmetic.Po
trunk/none/tests/mips32/.deps/LoadStore.Po
trunk/none/tests/mips32/.deps/LoadStore1.Po
trunk/none/tests/mips32/.deps/MIPS32int.Po
trunk/none/tests/mips32/.deps/MemCpyTest.Po
trunk/none/tests/mips32/.deps/MoveIns.Po
trunk/none/tests/mips32/.deps/allexec-allexec.Po
trunk/none/tests/mips32/.deps/branches.Po
trunk/none/tests/mips32/.deps/round.Po
trunk/none/tests/mips32/.deps/vfp.Po
trunk/none/tests/mips32/FPUarithmetic.c
trunk/none/tests/mips32/FPUarithmetic.stdout.exp
trunk/none/tests/mips32/FPUarithmetic.vgtest
trunk/none/tests/mips32/LoadStore.c
trunk/none/tests/mips32/LoadStore.stdout.exp
trunk/none/tests/mips32/LoadStore.stdout.exp-BE
trunk/none/tests/mips32/LoadStore.vgtest
trunk/none/tests/mips32/LoadStore1.c
trunk/none/tests/mips32/LoadStore1.stdout.exp
trunk/none/tests/mips32/LoadStore1.stdout.exp-LE
trunk/none/tests/mips32/LoadStore1.vgtest
trunk/none/tests/mips32/MIPS32int.c
trunk/none/tests/mips32/MIPS32int.stdout.exp
trunk/none/tests/mips32/MIPS32int.stdout.exp-BE
trunk/none/tests/mips32/MIPS32int.vgtest
trunk/none/tests/mips32/Makefile.am
trunk/none/tests/mips32/MemCpyTest.c
trunk/none/tests/mips32/MemCpyTest.stdout.exp
trunk/none/tests/mips32/MemCpyTest.vgtest
trunk/none/tests/mips32/MoveIns.c
trunk/none/tests/mips32/MoveIns.stdout.exp
trunk/none/tests/mips32/MoveIns.stdout.exp-BE
trunk/none/tests/mips32/MoveIns.vgtest
trunk/none/tests/mips32/allexec.c
trunk/none/tests/mips32/branches.c
trunk/none/tests/mips32/branches.stdout.exp
trunk/none/tests/mips32/branches.vgtest
trunk/none/tests/mips32/filter_stderr
trunk/none/tests/mips32/round.c
trunk/none/tests/mips32/round.stdout.exp
trunk/none/tests/mips32/round.vgtest
trunk/none/tests/mips32/vfp.c
trunk/none/tests/mips32/vfp.stdout.exp
trunk/none/tests/mips32/vfp.stdout.exp-BE
trunk/none/tests/mips32/vfp.vgtest
Added: trunk/none/tests/mips32/
Added: trunk/none/tests/mips32/.deps/
Added: trunk/none/tests/mips32/vfp.stdout.exp (+182 -0)
===================================================================
--- trunk/none/tests/mips32/vfp.stdout.exp 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/vfp.stdout.exp 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,182 @@
+LDC1
+ldc1 $f0, 0($t1) :: ft 0x4095a26666666666
+ldc1 $f0, 8($t1) :: ft 0xbff000000
+ldc1 $f0, 16($t1) :: ft 0x3ff000000
+ldc1 $f0, 24($t1) :: ft 0x252a2e2b262d2d2a
+ldc1 $f0, 32($t1) :: ft 0xffffffffffffffff
+ldc1 $f0, 40($t1) :: ft 0x41d26580b487e5c9
+ldc1 $f0, 48($t1) :: ft 0x42026580b750e388
+ldc1 $f0, 56($t1) :: ft 0x3e45798ee2308c3a
+ldc1 $f0, 64($t1) :: ft 0x3fbf9add3746f65f
+ldc1 $f0, 0($t1) :: ft 0x4095a26666666666
+ldc1 $f0, 8($t1) :: ft 0xbff000000
+ldc1 $f0, 16($t1) :: ft 0x3ff000000
+ldc1 $f0, 24($t1) :: ft 0x252a2e2b262d2d2a
+ldc1 $f0, 32($t1) :: ft 0xffffffffffffffff
+ldc1 $f0, 40($t1) :: ft 0x41d26580b487e5c9
+ldc1 $f0, 48($t1) :: ft 0x42026580b750e388
+ldc1 $f0, 56($t1) :: ft 0x3e45798ee2308c3a
+ldc1 $f0, 0($t1) :: ft 0x4095a26666666666
+ldc1 $f0, 8($t1) :: ft 0xbff000000
+ldc1 $f0, 16($t1) :: ft 0x3ff000000
+ldc1 $f0, 24($t1) :: ft 0x252a2e2b262d2d2a
+ldc1 $f0, 32($t1) :: ft 0xffffffffffffffff
+ldc1 $f0, 40($t1) :: ft 0x41d26580b487e5c9
+ldc1 $f0, 48($t1) :: ft 0x42026580b750e388
+ldc1 $f0, 56($t1) :: ft 0x3e45798ee2308c3a
+ldc1 $f0, 64($t1) :: ft 0x3fbf9add3746f65f
+ldc1 $f0, 0($t1) :: ft 0x4095a26666666666
+LWC1
+lwc1 $f0, 0($t1) :: ft 0x4095a266
+lwc1 $f0, 4($t1) :: ft 0x66666666
+lwc1 $f0, 8($t1) :: ft 0xbff00000
+lwc1 $f0, 12($t1) :: ft 0x0
+lwc1 $f0, 16($t1) :: ft 0x3ff00000
+lwc1 $f0, 20($t1) :: ft 0x0
+lwc1 $f0, 24($t1) :: ft 0x252a2e2b
+lwc1 $f0, 28($t1) :: ft 0x262d2d2a
+lwc1 $f0, 32($t1) :: ft 0xffffffff
+lwc1 $f0, 36($t1) :: ft 0xffffffff
+lwc1 $f0, 40($t1) :: ft 0x41d26580
+lwc1 $f0, 44($t1) :: ft 0xb487e5c9
+lwc1 $f0, 48($t1) :: ft 0x42026580
+lwc1 $f0, 52($t1) :: ft 0xb750e388
+lwc1 $f0, 56($t1) :: ft 0x3e45798e
+lwc1 $f0, 60($t1) :: ft 0xe2308c3a
+lwc1 $f0, 64($t1) :: ft 0x3fbf9add
+lwc1 $f0, 0($t1) :: ft 0x4095a266
+lwc1 $f0, 8($t1) :: ft 0xbff00000
+lwc1 $f0, 16($t1) :: ft 0x3ff00000
+lwc1 $f0, 24($t1) :: ft 0x252a2e2b
+lwc1 $f0, 32($t1) :: ft 0xffffffff
+lwc1 $f0, 40($t1) :: ft 0x41d26580
+lwc1 $f0, 48($t1) :: ft 0x42026580
+lwc1 $f0, 56($t1) :: ft 0x3e45798e
+lwc1 $f0, 64($t1) :: ft 0x3fbf9add
+lwc1 $f0, 0($t1) :: ft 0x4095a266
+LWXC1
+lwxc1 $f0, $a3($v0) :: ft 0x4095a266
+lwxc1 $f0, $a3($v0) :: ft 0x66666666
+lwxc1 $f0, $a3($v0) :: ft 0xbff00000
+lwxc1 $f0, $a3($v0) :: ft 0x0
+lwxc1 $f0, $a3($v0) :: ft 0x3ff00000
+lwxc1 $f0, $a3($v0) :: ft 0x0
+lwxc1 $f0, $a3($v0) :: ft 0x252a2e2b
+lwxc1 $f0, $a3($v0) :: ft 0x262d2d2a
+lwxc1 $f0, $a3($v0) :: ft 0xffffffff
+lwxc1 $f0, $a3($v0) :: ft 0xffffffff
+lwxc1 $f0, $a3($v0) :: ft 0x41d26580
+lwxc1 $f0, $a3($v0) :: ft 0xb487e5c9
+lwxc1 $f0, $a3($v0) :: ft 0x42026580
+lwxc1 $f0, $a3($v0) :: ft 0xb750e388
+lwxc1 $f0, $a3($v0) :: ft 0x3e45798e
+lwxc1 $f0, $a3($v0) :: ft 0xe2308c3a
+lwxc1 $f0, $a3($v0) :: ft 0x3fbf9add
+lwxc1 $f0, $a3($v0) :: ft 0x4095a266
+lwxc1 $f0, $a3($v0) :: ft 0x66666666
+lwxc1 $f0, $a3($v0) :: ft 0xbff00000
+lwxc1 $f0, $a3($v0) :: ft 0x0
+lwxc1 $f0, $a3($v0) :: ft 0x3ff00000
+lwxc1 $f0, $a3($v0) :: ft 0x0
+lwxc1 $f0, $a3($v0) :: ft 0x252a2e2b
+lwxc1 $f0, $a3($v0) :: ft 0x262d2d2a
+lwxc1 $f0, $a3($v0) :: ft 0xffffffff
+lwxc1 $f0, $a3($v0) :: ft 0xffffffff
+lwxc1 $f0, $a3($v0) :: ft 0x41d26580
+lwxc1 $f0, $a3($v0) :: ft 0xb487e5c9
+lwxc1 $f0, $a3($v0) :: ft 0x42026580
+lwxc1 $f0, $a3($v0) :: ft 0xb750e388
+lwxc1 $f0, $a3($v0) :: ft 0x3e45798e
+LDXC1
+ldxc1 $f0, $a3($v0) :: ft 0x4095a266
+ldxc1 $f0, $a3($v0) :: ft 0xbff00000
+ldxc1 $f0, $a3($v0) :: ft 0x3ff00000
+ldxc1 $f0, $a3($v0) :: ft 0x252a2e2b
+ldxc1 $f0, $a3($v0) :: ft 0xffffffff
+ldxc1 $f0, $a3($v0) :: ft 0x41d26580
+ldxc1 $f0, $a3($v0) :: ft 0x42026580
+ldxc1 $f0, $a3($v0) :: ft 0x3e45798e
+ldxc1 $f0, $a3($v0) :: ft 0x3fbf9add
+ldxc1 $f0, $a3($v0) :: ft 0x4095a266
+ldxc1 $f0, $a3($v0) :: ft 0xbff00000
+ldxc1 $f0, $a3($v0) :: ft 0x3ff00000
+ldxc1 $f0, $a3($v0) :: ft 0x252a2e2b
+ldxc1 $f0, $a3($v0) :: ft 0xffffffff
+ldxc1 $f0, $a3($v0) :: ft 0x41d26580
+ldxc1 $f0, $a3($v0) :: ft 0x42026580
+ldxc1 $f0, $a3($v0) :: ft 0x3e45798e
+ldxc1 $f0, $a3($v0) :: ft 0x3fbf9add
+ldxc1 $f0, $a3($v0) :: ft 0x4095a266
+ldxc1 $f0, $a3($v0) :: ft 0xbff00000
+ldxc1 $f0, $a3($v0) :: ft 0x3ff00000
+ldxc1 $f0, $a3($v0) :: ft 0x252a2e2b
+ldxc1 $f0, $a3($v0) :: ft 0xffffffff
+ldxc1 $f0, $a3($v0) :: ft 0x41d26580
+ldxc1 $f0, $a3($v0) :: ft 0x42026580
+ldxc1 $f0, $a3($v0) :: ft 0x3e45798e
+ldxc1 $f0, $a3($v0) :: ft 0x3fbf9add
+ldxc1 $f0, $a3($v0) :: ft 0x4095a266
+ldxc1 $f0, $a3($v0) :: ft 0xbff00000
+ldxc1 $f0, $a3($v0) :: ft 0x3ff00000
+ldxc1 $f0, $a3($v0) :: ft 0x252a2e2b
+ldxc1 $f0, $a3($v0) :: ft 0xffffffff
+SDC1
+sdc1 $f0, 0($t0) :: out: 0x0
+sdc1 $f0, 0($t0) :: out: 0xb97f122f
+sdc1 $f0, 0($t0) :: out: 0x0
+sdc1 $f0, 0($t0) :: out: 0x0
+sdc1 $f0, 0($t0) :: out: 0x66666666
+sdc1 $f0, 0($t0) :: out: 0x2101d847
+sdc1 $f0, 0($t0) :: out: 0x0
+sdc1 $f0, 0($t0) :: out: 0x51eb851f
+sdc1 $f0, 0($t0) :: out: 0x0
+MEM1:
+0.000000, 456.248956, 3.000000, -1.000000
+1384.600000, -7.294568, 1000000000.000000, -5786.470000
+1752.000000, 0.000000, 0.000000, 0.000000
+0.000000, 0.000000, 0.000000, 0.000000
+SDXC1
+sdc1 $f0, #t2($t0) :: out: 0x0 : out1: 0x0
+sdc1 $f0, #t2($t0) :: out: 0xb97f122f : out1: 0x407c83fb
+sdc1 $f0, #t2($t0) :: out: 0x0 : out1: 0x40080000
+sdc1 $f0, #t2($t0) :: out: 0x0 : out1: 0xbff00000
+sdc1 $f0, #t2($t0) :: out: 0x66666666 : out1: 0x4095a266
+sdc1 $f0, #t2($t0) :: out: 0x2101d847 : out1: 0xc01d2da3
+sdc1 $f0, #t2($t0) :: out: 0x0 : out1: 0x41cdcd65
+sdc1 $f0, #t2($t0) :: out: 0x51eb851f : out1: 0xc0b69a78
+sdc1 $f0, #t2($t0) :: out: 0x0 : out1: 0x409b6000
+MEM1:
+0.000000, 456.248956, 3.000000, -1.000000
+1384.600000, -7.294568, 1000000000.000000, -5786.470000
+1752.000000, 0.000000, 0.000000, 0.000000
+0.000000, 0.000000, 0.000000, 0.000000
+SWC1
+swc1 $f0, 0($t0) :: out: 0x0
+swc1 $f0, 0($t0) :: out: 0x40400000
+swc1 $f0, 0($t0) :: out: 0x44ad1333
+swc1 $f0, 0($t0) :: out: 0x4e6e6b28
+swc1 $f0, 0($t0) :: out: 0x44db0000
+swc1 $f0, 0($t0) :: out: 0x322bcc77
+swc1 $f0, 0($t0) :: out: 0xc732da7a
+swc1 $f0, 0($t0) :: out: 0x42080079
+swc1 $f0, 0($t0) :: out: 0x49d5e008
+MEM1:
+0.000000, 0.000000, 3.000000, 0.000000
+1384.599976, 0.000000, 1000000000.000000, 0.000000
+1752.000000, 0.000000, 0.000000, 0.000000
+-45786.476562, 0.000000, 34.000462, 0.000000
+SWXC1
+swxc1 $f0, 0($t0) :: out: 0x0
+swxc1 $f0, 0($t0) :: out: 0x40400000
+swxc1 $f0, 0($t0) :: out: 0x44ad1333
+swxc1 $f0, 0($t0) :: out: 0x4e6e6b28
+swxc1 $f0, 0($t0) :: out: 0x44db0000
+swxc1 $f0, 0($t0) :: out: 0x322bcc77
+swxc1 $f0, 0($t0) :: out: 0xc732da7a
+swxc1 $f0, 0($t0) :: out: 0x42080079
+swxc1 $f0, 0($t0) :: out: 0x49d5e008
+MEM1:
+0.000000, 0.000000, 3.000000, 0.000000
+1384.599976, 0.000000, 1000000000.000000, 0.000000
+1752.000000, 0.000000, 0.000000, 0.000000
+-45786.476562, 0.000000, 34.000462, 0.000000
Added: trunk/none/tests/mips32/vfp.c (+404 -0)
===================================================================
--- trunk/none/tests/mips32/vfp.c 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/vfp.c 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,404 @@
+#include <stdio.h>
+
+unsigned int mem[] = {
+ 0x4095A266, 0x66666666,
+ 0xBFF00000, 0x00000000,
+ 0x3FF00000, 0x00000000,
+ 0x252a2e2b, 0x262d2d2a,
+ 0xFFFFFFFF, 0xFFFFFFFF,
+ 0x41D26580, 0xB487E5C9,
+ 0x42026580, 0xB750E388,
+ 0x3E45798E, 0xE2308C3A,
+ 0x3FBF9ADD, 0x3746F65F
+};
+
+float fs_f[] = {
+ 0, 456.2489562, 3, -1,
+ 1384.6, -7.2945676, 1000000000, -5786.47,
+ 1752, 0.0024575, 0.00000001, -248562.76,
+ -45786.476, 456.2489562, 34.00046, 45786.476,
+ 1752065, 107, -45667.24, -7.2945676,
+ -347856.475, 356047.56, -1.0, 23.04
+};
+
+double fs_d[] = {
+ 0, 456.2489562, 3, -1,
+ 1384.6, -7.2945676, 1000000000, -5786.47,
+ 1752, 0.0024575, 0.00000001, -248562.76,
+ -45786.476, 456.2489562, 34.00046, 45786.476,
+ 1752065, 107, -45667.24, -7.2945676,
+ -347856.475, 356047.56, -1.0, 23.04
+};
+
+double mem1[] = {
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+
+float mem1f[] = {
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+// ldc1 $f0, 0($t1)
+#define TESTINSN5LOAD(instruction, RTval, offset, RT) \
+{ \
+ double out; \
+ int out1; \
+ int out2; \
+ __asm__ volatile( \
+ "move $t1, %3\n\t" \
+ "li $t0, " #RTval"\n\t" \
+ instruction "\n\t" \
+ "mov.d %0, $" #RT "\n\t" \
+ "mfc1 %1, $" #RT "\n\t" \
+ "mfc1 %2, $f1\n\t" \
+ : "=&f" (out), "=&r" (out1), "=&r" (out2) \
+ : "r" (mem), "r" (RTval) \
+ : "cc", "memory" \
+ ); \
+ printf("%s :: ft 0x%x%x\n", \
+ instruction, out1, out2); \
+}
+
+// lwc1 $f0, 0($t1)
+#define TESTINSN5LOADw(instruction, RTval, offset, RT) \
+{ \
+ double out; \
+ int out1; \
+ __asm__ volatile( \
+ "move $t1, %2\n\t" \
+ "li $t0, " #RTval"\n\t" \
+ instruction "\n\t" \
+ "mov.d %0, $" #RT "\n\t" \
+ "mfc1 %1, $" #RT "\n\t" \
+ : "=&f" (out), "=&r" (out1) \
+ : "r" (mem), "r" (RTval) \
+ : "cc", "memory" \
+ ); \
+ printf("%s :: ft 0x%x\n", \
+ instruction, out1); \
+}
+
+// lwxc1 $f0, $a3($v0)
+#define TESTINSN6LOADw(instruction, indexVal, fd, index, base) \
+{ \
+ int out; \
+ __asm__ volatile( \
+ "move $" #base ", %1\n\t" \
+ "li $" #index ", " #indexVal"\n\t" \
+ instruction "\n\t" \
+ "mfc1 %0, $" #fd "\n\t" \
+ : "=&r" (out) \
+ : "r" (mem) \
+ : "cc", "memory" \
+ ); \
+ printf("%s :: ft 0x%x\n", \
+ instruction, out); \
+}
+
+// ldxc1 $f0, $a3($v0)
+#define TESTINSN6LOADd(instruction, indexVal, fd, index, base) \
+{ \
+ int out; \
+ int out1; \
+ int out2; \
+ __asm__ volatile( \
+ "move $" #base ", %3\n\t" \
+ "li $" #index ", " #indexVal"\n\t" \
+ instruction "\n\t" \
+ "mov.d %0, $" #fd "\n\t" \
+ "mfc1 %1, $" #fd "\n\t" \
+ "mfc1 %2, $f1\n\t" \
+ : "=&f" (out), "=&r" (out1), "=&r" (out2) \
+ : "r" (mem) \
+ : "cc", "memory" \
+ ); \
+ printf("%s :: ft 0x%x\n", \
+ instruction, out); \
+}
+// sdc1 $f0, 0($t0)
+#define TESTINST1(offset) \
+{ \
+ unsigned int out; \
+ __asm__ volatile( \
+ "move $t0, %1\n\t" \
+ "move $t1, %2\n\t" \
+ "ldc1 $f0, "#offset"($t1)\n\t" \
+ "sdc1 $f0, "#offset"($t0) \n\t" \
+ "lw %0, "#offset"($t0)\n\t" \
+ : "=&r" (out) \
+ : "r" (mem1), "r" (fs_d) \
+ : "t1", "t0", "cc", "memory" \
+ ); \
+ printf("sdc1 $f0, 0($t0) :: out: 0x%x\n", \
+ out); \
+}
+
+// sdxc1 $f0, $t2($t0)
+#define TESTINST1a(offset) \
+{ \
+ unsigned int out; \
+ unsigned int out1; \
+ __asm__ volatile( \
+ "move $t0, %2\n\t" \
+ "move $t1, %3\n\t" \
+ "li $t2, "#offset"\n\t" \
+ "ldc1 $f0, "#offset"($t1)\n\t" \
+ "sdxc1 $f0, $t2($t0) \n\t" \
+ "lw %0, "#offset"($t0)\n\t" \
+ "addi $t0, $t0, 4 \n\t" \
+ "lw %1, "#offset"($t0)\n\t" \
+ : "=&r" (out), "=&r" (out1) \
+ : "r" (mem1), "r" (fs_d) \
+ : "t2", "t1", "t0", "cc", "memory" \
+ ); \
+ printf("sdc1 $f0, #t2($t0) :: out: 0x%x : out1: 0x%x\n", \
+ out, out1); \
+}
+
+// swc1 $f0, 0($t0)
+#define TESTINST2(offset) \
+{ \
+ unsigned int out; \
+ __asm__ volatile( \
+ "move $t0, %1\n\t" \
+ "move $t1, %2\n\t" \
+ "lwc1 $f0, "#offset"($t1)\n\t" \
+ "swc1 $f0, "#offset"($t0) \n\t" \
+ "lw %0, "#offset"($t0)\n\t" \
+ : "=&r" (out) \
+ : "r" (mem1f), "r" (fs_f) \
+ : "t1", "t0", "cc", "memory" \
+ ); \
+ printf("swc1 $f0, 0($t0) :: out: 0x%x\n", \
+ out); \
+}
+
+// SWXC1 $f0, $t2($t0)
+#define TESTINST2a(offset) \
+{ \
+ unsigned int out; \
+ __asm__ volatile( \
+ "move $t0, %1\n\t" \
+ "move $t1, %2\n\t" \
+ "li $t2, "#offset" \n\t" \
+ "lwc1 $f0, "#offset"($t1)\n\t" \
+ "swxc1 $f0, $t2($t0) \n\t" \
+ "lw %0, "#offset"($t0)\n\t" \
+ : "=&r" (out) \
+ : "r" (mem1f), "r" (fs_f) \
+ : "t2", "t1", "t0", "cc", "memory" \
+ ); \
+ printf("swxc1 $f0, 0($t0) :: out: 0x%x\n", \
+ out); \
+}
+void ppMem(double *mem, int len)
+{
+ int i;
+ printf("MEM1:\n");
+ for (i = 0; i < len; i=i+4)
+ {
+ printf("%lf, %lf, %lf, %lf\n", mem[i], mem[i+1], mem[i+2], mem[i+3]);
+ mem[i] = 0;
+ mem[i+1] = 0;
+ mem[i+2] = 0;
+ mem[i+3] = 0;
+ }
+}
+
+void ppMemF(float *mem, int len)
+{
+ int i;
+ printf("MEM1:\n");
+ for (i = 0; i < len; i=i+4)
+ {
+ printf("%lf, %lf, %lf, %lf\n", mem[i], mem[i+1], mem[i+2], mem[i+3]);
+ mem[i] = 0;
+ mem[i+1] = 0;
+ mem[i+2] = 0;
+ mem[i+3] = 0;
+ }
+}
+
+int main()
+{
+ printf("LDC1\n");
+ TESTINSN5LOAD("ldc1 $f0, 0($t1)", 0, 0, f0);
+ TESTINSN5LOAD("ldc1 $f0, 8($t1)", 0, 8, f0);
+ TESTINSN5LOAD("ldc1 $f0, 16($t1)", 0, 16, f0);
+ TESTINSN5LOAD("ldc1 $f0, 24($t1)", 0, 24, f0);
+ TESTINSN5LOAD("ldc1 $f0, 32($t1)", 0, 32, f0);
+ TESTINSN5LOAD("ldc1 $f0, 40($t1)", 0, 40, f0);
+ TESTINSN5LOAD("ldc1 $f0, 48($t1)", 0, 48, f0);
+ TESTINSN5LOAD("ldc1 $f0, 56($t1)", 0, 56, f0);
+ TESTINSN5LOAD("ldc1 $f0, 64($t1)", 0, 64, f0);
+ TESTINSN5LOAD("ldc1 $f0, 0($t1)", 0, 0, f0);
+ TESTINSN5LOAD("ldc1 $f0, 8($t1)", 0, 8, f0);
+ TESTINSN5LOAD("ldc1 $f0, 16($t1)", 0, 16, f0);
+ TESTINSN5LOAD("ldc1 $f0, 24($t1)", 0, 24, f0);
+ TESTINSN5LOAD("ldc1 $f0, 32($t1)", 0, 32, f0);
+ TESTINSN5LOAD("ldc1 $f0, 40($t1)", 0, 40, f0);
+ TESTINSN5LOAD("ldc1 $f0, 48($t1)", 0, 48, f0);
+ TESTINSN5LOAD("ldc1 $f0, 56($t1)", 0, 56, f0);
+ TESTINSN5LOAD("ldc1 $f0, 0($t1)", 0, 0, f0);
+ TESTINSN5LOAD("ldc1 $f0, 8($t1)", 0, 8, f0);
+ TESTINSN5LOAD("ldc1 $f0, 16($t1)", 0, 16, f0);
+ TESTINSN5LOAD("ldc1 $f0, 24($t1)", 0, 24, f0);
+ TESTINSN5LOAD("ldc1 $f0, 32($t1)", 0, 32, f0);
+ TESTINSN5LOAD("ldc1 $f0, 40($t1)", 0, 40, f0);
+ TESTINSN5LOAD("ldc1 $f0, 48($t1)", 0, 48, f0);
+ TESTINSN5LOAD("ldc1 $f0, 56($t1)", 0, 56, f0);
+ TESTINSN5LOAD("ldc1 $f0, 64($t1)", 0, 64, f0);
+ TESTINSN5LOAD("ldc1 $f0, 0($t1)", 0, 0, f0);
+
+ printf("LWC1\n");
+ TESTINSN5LOADw("lwc1 $f0, 0($t1)", 0, 0, f0);
+ TESTINSN5LOADw("lwc1 $f0, 4($t1)", 0, 4, f0);
+ TESTINSN5LOADw("lwc1 $f0, 8($t1)", 0, 8, f0);
+ TESTINSN5LOADw("lwc1 $f0, 12($t1)", 0, 12, f0);
+ TESTINSN5LOADw("lwc1 $f0, 16($t1)", 0, 16, f0);
+ TESTINSN5LOADw("lwc1 $f0, 20($t1)", 0, 20, f0);
+ TESTINSN5LOADw("lwc1 $f0, 24($t1)", 0, 24, f0);
+ TESTINSN5LOADw("lwc1 $f0, 28($t1)", 0, 28, f0);
+ TESTINSN5LOADw("lwc1 $f0, 32($t1)", 0, 32, f0);
+ TESTINSN5LOADw("lwc1 $f0, 36($t1)", 0, 36, f0);
+ TESTINSN5LOADw("lwc1 $f0, 40($t1)", 0, 40, f0);
+ TESTINSN5LOADw("lwc1 $f0, 44($t1)", 0, 44, f0);
+ TESTINSN5LOADw("lwc1 $f0, 48($t1)", 0, 48, f0);
+ TESTINSN5LOADw("lwc1 $f0, 52($t1)", 0, 52, f0);
+ TESTINSN5LOADw("lwc1 $f0, 56($t1)", 0, 56, f0);
+ TESTINSN5LOADw("lwc1 $f0, 60($t1)", 0, 60, f0);
+ TESTINSN5LOADw("lwc1 $f0, 64($t1)", 0, 64, f0);
+ TESTINSN5LOADw("lwc1 $f0, 0($t1)", 0, 0, f0);
+ TESTINSN5LOADw("lwc1 $f0, 8($t1)", 0, 8, f0);
+ TESTINSN5LOADw("lwc1 $f0, 16($t1)", 0, 16, f0);
+ TESTINSN5LOADw("lwc1 $f0, 24($t1)", 0, 24, f0);
+ TESTINSN5LOADw("lwc1 $f0, 32($t1)", 0, 32, f0);
+ TESTINSN5LOADw("lwc1 $f0, 40($t1)", 0, 40, f0);
+ TESTINSN5LOADw("lwc1 $f0, 48($t1)", 0, 48, f0);
+ TESTINSN5LOADw("lwc1 $f0, 56($t1)", 0, 56, f0);
+ TESTINSN5LOADw("lwc1 $f0, 64($t1)", 0, 64, f0);
+ TESTINSN5LOADw("lwc1 $f0, 0($t1)", 0, 0, f0);
+
+ printf("LWXC1\n");
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 0, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 4, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 8, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 12, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 16, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 20, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 24, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 28, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 32, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 36, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 40, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 44, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 48, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 52, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 56, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 60, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 64, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 0, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 4, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 8, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 12, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 16, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 20, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 24, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 28, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 32, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 36, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 40, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 44, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 48, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 52, f0, a3, v0);
+ TESTINSN6LOADw("lwxc1 $f0, $a3($v0)", 56, f0, a3, v0);
+
+ printf("LDXC1\n");
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 0, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 8, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 16, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 24, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 32, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 40, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 48, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 56, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 64, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 0, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 8, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 16, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 24, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 32, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 40, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 48, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 56, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 64, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 0, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 8, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 16, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 24, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 32, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 40, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 48, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 56, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 64, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 0, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 8, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 16, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 24, f0, a3, v0);
+ TESTINSN6LOADd("ldxc1 $f0, $a3($v0)", 32, f0, a3, v0);
+
+ printf("SDC1\n");
+ TESTINST1(0);
+ TESTINST1(8);
+ TESTINST1(16);
+ TESTINST1(24);
+ TESTINST1(32);
+ TESTINST1(40);
+ TESTINST1(48);
+ TESTINST1(56);
+ TESTINST1(64);
+ ppMem(mem1, 16);
+
+ printf("SDXC1\n");
+ TESTINST1a(0);
+ TESTINST1a(8);
+ TESTINST1a(16);
+ TESTINST1a(24);
+ TESTINST1a(32);
+ TESTINST1a(40);
+ TESTINST1a(48);
+ TESTINST1a(56);
+ TESTINST1a(64);
+ ppMem(mem1, 16);
+
+ printf("SWC1\n");
+ TESTINST2(0);
+ TESTINST2(8);
+ TESTINST2(16);
+ TESTINST2(24);
+ TESTINST2(32);
+ TESTINST2(40);
+ TESTINST2(48);
+ TESTINST2(56);
+ TESTINST2(64);
+ ppMemF(mem1f, 16);
+
+ printf("SWXC1\n");
+ TESTINST2a(0);
+ TESTINST2a(8);
+ TESTINST2a(16);
+ TESTINST2a(24);
+ TESTINST2a(32);
+ TESTINST2a(40);
+ TESTINST2a(48);
+ TESTINST2a(56);
+ TESTINST2a(64);
+ ppMemF(mem1f, 16);
+
+ return 0;
+}
Added: trunk/none/tests/mips32/MIPS32int.vgtest (+2 -0)
===================================================================
--- trunk/none/tests/mips32/MIPS32int.vgtest 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/MIPS32int.vgtest 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,2 @@
+prog: MIPS32int
+vgopts: -q
Added: trunk/none/tests/mips32/LoadStore1.c (+354 -0)
===================================================================
--- trunk/none/tests/mips32/LoadStore1.c 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/LoadStore1.c 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,354 @@
+#include <stdio.h>
+
+unsigned int mem[] = {
+ 0x121f1e1f, 0, 3, -1,
+ 0x232f2e2f, 0x242c2b2b, 0x252a2e2b, 0x262d2d2a,
+ 0x3f343f3e, 0x3e353d3c, 0x363a3c3b, 0x3b373b3a,
+ 0x454f4e45, 0x4e464d46, 0x474d474c, 0x4a484a4c
+};
+
+unsigned int mem1[] = {
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0xffffffff, 0, 0, 0,
+ 0, 0, 0, 0
+};
+
+unsigned int mem2[] = {
+0x0000e680, 0x00010700, 0x0000e7dc, 0x0000b0d0,
+0x2ab05fd0, 0x0000b6a0, 0x0000be80, 0x0000de10,
+0x0000df20, 0x2ab05fe0, 0x0000dfd0, 0x00010300
+};
+
+// sb $t0, 0($t1)
+#define TESTINST1(instruction, RTval, offset, RT, RS) \
+{ \
+ unsigned int out; \
+ __asm__ volatile( \
+ "move $" #RS", %1\n\t" \
+ "li $" #RT", " #RTval"\n\t" \
+ instruction "\n\t" \
+ "lw %0, "#offset"($"#RS")\n\t" \
+ : "=&r" (out) \
+ : "r" (mem1), "r" (RTval) \
+ : #RT, "cc", "memory" \
+ ); \
+ printf("%s :: RTval: 0x%x, out: 0x%x\n", \
+ instruction, RTval, out); \
+ out = 0; \
+ __asm__ volatile( \
+ "move $" #RS", %1\n\t" \
+ "li $" #RT", " #RTval"\n\t" \
+ instruction "\n\t" \
+ "lw %0, "#offset"($"#RS")\n\t" \
+ : "=&r" (out) \
+ : "r" (mem), "r" (RTval) \
+ : #RT, "cc", "memory" \
+ ); \
+ printf("%s :: RTval: 0x%x, out: 0x%x\n", \
+ instruction, RTval, out); \
+}
+
+// swl $t0, 3($t1)
+// swr $t0, 0($t1)
+#define TESTINSTsw(RTval, offset, RT, RS) \
+{ \
+ unsigned int out; \
+ __asm__ volatile( \
+ "move $" #RS", %1\n\t" \
+ "addiu $"#RS", $"#RS", "#offset"\n\t" \
+ "li $" #RT", " #RTval"\n\t" \
+ "swl $t0, 3($t1) \n\t" \
+ "swr $t0, 0($t1) \n\t" \
+ "lw %0, 0($"#RS")\n\t" \
+ : "=&r" (out) \
+ : "r" (mem2), "r" (RTval) \
+ : #RT, #RS, "cc", "memory" \
+ ); \
+ printf("swl $t0, 3($t1)\nswr $t0, 0($t1)\n :: RTval: 0x%x, out: 0x%x\n", \
+ RTval, out); \
+}
+
+void ppMem(unsigned int* mem, int len)
+{
+ int i;
+ printf("MEM1:\n");
+ for (i = 0; i < len; i=i+4)
+ {
+ printf("0x%x, 0x%x, 0x%x, 0x%x\n", mem[i], mem[i+1], mem[i+2], mem[i+3]);
+ mem[i] = 0;
+ mem[i+1] = 0;
+ mem[i+2] = 0;
+ mem[i+3] = 0;
+ if (i == 2)
+ {
+ mem[i] = 0xffffffff;
+ mem[i+1] = 0;
+ mem[i+2] = 0;
+ mem[i+3] = 0;
+ }
+ }
+}
+
+void ppMem1(unsigned int* mem, int len)
+{
+ int i;
+ printf("MEM:\n");
+ for (i = 0; i < len; i=i+4)
+ {
+ printf("0x%x, 0x%x, 0x%x, 0x%x\n", mem[i], mem[i+1], mem[i+2], mem[i+3]);
+ }
+ mem[0] = 0x121f1e1f;
+ mem[1] = 0;
+ mem[2] = 3;
+ mem[3] = -1;
+ mem[4] = 0x232f2e2f;
+ mem[5] = 0x242c2b2b;
+ mem[6] = 0x252a2e2b;
+ mem[7] = 0x262d2d2a;
+ mem[8] = 0x3f343f3e;
+ mem[9] = 0x3e353d3c;
+ mem[10] = 0x363a3c3b;
+ mem[11] = 0x3b373b3a;
+ mem[12] = 0x454f4e45;
+ mem[13] = 0x4e464d46;
+ mem[14] = 0x474d474c;
+ mem[15] = 0x4a484a4c;
+}
+
+void ppMem0(unsigned int* mem, int len)
+{
+ int i;
+ printf("MEM:\n");
+ for (i = 0; i < len; i=i+4)
+ {
+ printf("0x%x, 0x%x, 0x%x, 0x%x\n", mem[i], mem[i+1], mem[i+2], mem[i+3]);
+ }
+
+ mem[0] = 0x0000e680;
+ mem[1] = 0x00010700;
+ mem[2] = 0x0000e7dc;
+ mem[3] = 0x0000b0d0;
+ mem[4] = 0x2ab05fd0;
+ mem[5] = 0x0000b6a0;
+ mem[6] = 0x0000be80;
+ mem[7] = 0x0000de10;
+ mem[8] = 0x0000df20;
+ mem[9] = 0x2ab05fe0;
+ mem[10] = 0x0000dfd0;
+ mem[11] = 0x00010300;
+}
+
+int main()
+{
+ printf("sb\n");
+ TESTINST1("sb $t0, 3($t1)", 0, 3, t0, t1);
+ TESTINST1("sb $t0, 5($t1)", 0x31415927, 5, t0, t1);
+ TESTINST1("sb $t0, 7($t1)", 0x7fffffff, 7, t0, t1);
+ TESTINST1("sb $t0, 1($t1)", 0x80000000, 1, t0, t1);
+ TESTINST1("sb $t0, 2($t1)", 0x80000000, 2, t0, t1);
+ TESTINST1("sb $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("sb $t0, 11($t1)", 0x7fffffff, 11, t0, t1);
+ TESTINST1("sb $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("sb $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("sb $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("sb $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("sb $t0, 31($t1)", 0xffffffff, 31, t0, t1);
+ TESTINST1("sb $t0, 35($t1)", 0xffffffff, 35, t0, t1);
+ TESTINST1("sb $t0, 41($t1)", 0x31415927, 41, t0, t1);
+ TESTINST1("sb $t0, 42($t1)", 0x7fffffff, 42, t0, t1);
+ TESTINST1("sb $t0, 45($t1)", 0x80000000, 45, t0, t1);
+ TESTINST1("sb $t0, 51($t1)", 655, 51, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("sh\n");
+ TESTINST1("sh $t0, 1($t1)", 0, 1, t0, t1);
+ TESTINST1("sh $t0, 3($t1)", 0x31415927, 3, t0, t1);
+ TESTINST1("sh $t0, 5($t1)", 0x7fffffff, 5, t0, t1);
+ TESTINST1("sh $t0, 7($t1)", 0x80000000, 7, t0, t1);
+ TESTINST1("sh $t0, 9($t1)", 0x80000000, 9, t0, t1);
+ TESTINST1("sh $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("sh $t0, 11($t1)", 0x7fffffff, 11, t0, t1);
+ TESTINST1("sh $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("sh $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("sh $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("sh $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("sh $t0, 31($t1)", 0xffffffff, 31, t0, t1);
+ TESTINST1("sh $t0, 35($t1)", 0xffffffff, 35, t0, t1);
+ TESTINST1("sh $t0, 41($t1)", 0x31415927, 41, t0, t1);
+ TESTINST1("sh $t0, 47($t1)", 0x7fffffff, 47, t0, t1);
+ TESTINST1("sh $t0, 49($t1)", 0x80000000, 49, t0, t1);
+ TESTINST1("sh $t0, 51($t1)", 655, 51, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("sw\n");
+ TESTINST1("sw $t0, 1($t1)", 0, 1, t0, t1);
+ TESTINST1("sw $t0, 3($t1)", 0x31415927, 3, t0, t1);
+ TESTINST1("sw $t0, 5($t1)", 0x7fffffff, 5, t0, t1);
+ TESTINST1("sw $t0, 7($t1)", 0x80000000, 7, t0, t1);
+ TESTINST1("sw $t0, 9($t1)", 0x80000000, 9, t0, t1);
+ TESTINST1("sw $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("sw $t0, 15($t1)", 0x7fffffff, 11, t0, t1);
+ TESTINST1("sw $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("sw $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("sw $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("sw $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("sw $t0, 31($t1)", 0xffffffff, 31, t0, t1);
+ TESTINST1("sw $t0, 37($t1)", 0xffffffff, 37, t0, t1);
+ TESTINST1("sw $t0, 49($t1)", 0x31415927, 49, t0, t1);
+ TESTINST1("sw $t0, 41($t1)", 0x7fffffff, 41, t0, t1);
+ TESTINST1("sw $t0, 43($t1)", 0x80000000, 43, t0, t1);
+ TESTINST1("sw $t0, 51($t1)", 655, 51, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("swl\n");
+ TESTINST1("swl $t0, 1($t1)", 0, 1, t0, t1);
+ TESTINST1("swl $t0, 3($t1)", 0x31415927, 3, t0, t1);
+ TESTINST1("swl $t0, 5($t1)", 0x7fffffff, 5, t0, t1);
+ TESTINST1("swl $t0, 7($t1)", 0x80000000, 7, t0, t1);
+ TESTINST1("swl $t0, 9($t1)", 0x80000000, 9, t0, t1);
+ TESTINST1("swl $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("swl $t0, 11($t1)", 0x7fffffff, 11, t0, t1);
+ TESTINST1("swl $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("swl $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("swl $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("swl $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("swl $t0, 33($t1)", 0xffffffff, 33, t0, t1);
+ TESTINST1("swl $t0, 35($t1)", 0xffffffff, 35, t0, t1);
+ TESTINST1("swl $t0, 41($t1)", 0x31415927, 41, t0, t1);
+ TESTINST1("swl $t0, 45($t1)", 0x7fffffff, 45, t0, t1);
+ TESTINST1("swl $t0, 49($t1)", 0x80000000, 49, t0, t1);
+ TESTINST1("swl $t0, 51($t1)", 655, 51, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("swr\n");
+ TESTINST1("swr $t0, 1($t1)", 0, 1, t0, t1);
+ TESTINST1("swr $t0, 3($t1)", 0x31415927, 3, t0, t1);
+ TESTINST1("swr $t0, 5($t1)", 0x7fffffff, 5, t0, t1);
+ TESTINST1("swr $t0, 7($t1)", 0x80000000, 7, t0, t1);
+ TESTINST1("swr $t0, 9($t1)", 0x80000000, 9, t0, t1);
+ TESTINST1("swr $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("swr $t0, 11($t1)", 0x7fffffff, 11, t0, t1);
+ TESTINST1("swr $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("swr $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("swr $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("swr $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("swr $t0, 31($t1)", 0xffffffff, 31, t0, t1);
+ TESTINST1("swr $t0, 33($t1)", 0xffffffff, 33, t0, t1);
+ TESTINST1("swr $t0, 45($t1)", 0x31415927, 45, t0, t1);
+ TESTINST1("swr $t0, 47($t1)", 0x7fffffff, 47, t0, t1);
+ TESTINST1("swr $t0, 49($t1)", 0x80000000, 49, t0, t1);
+ TESTINST1("swr $t0, 51($t1)", 655, 51, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("ulw\n");
+ TESTINST1("ulw $t0, 0($t1)", 0, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 0x7fffffff, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 0x80000000, 0, t0, t1);
+ TESTINST1("ulw $t0, 2($t1)", 0x80000000, 2, t0, t1);
+ TESTINST1("ulw $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("ulw $t0, 10($t1)", 0x7fffffff, 10, t0, t1);
+ TESTINST1("ulw $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("ulw $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("ulw $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("ulw $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("ulw $t0, 32($t1)", 0xffffffff, 32, t0, t1);
+ TESTINST1("ulw $t0, 36($t1)", 0xffffffff, 36, t0, t1);
+ TESTINST1("ulw $t0, 40($t1)", 0x31415927, 40, t0, t1);
+ TESTINST1("ulw $t0, 44($t1)", 0x7fffffff, 44, t0, t1);
+ TESTINST1("ulw $t0, 48($t1)", 0x80000000, 48, t0, t1);
+ TESTINST1("ulw $t0, 52($t1)", 655, 52, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("usw\n");
+ TESTINST1("usw $t0, 0($t1)", 0, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 0x7fffffff, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 0x80000000, 0, t0, t1);
+ TESTINST1("usw $t0, 2($t1)", 0x80000000, 2, t0, t1);
+ TESTINST1("usw $t0, 6($t1)", 0x7fffffff, 6, t0, t1);
+ TESTINST1("usw $t0, 10($t1)", 0x7fffffff, 10, t0, t1);
+ TESTINST1("usw $t0, 8($t1)", -1, 8, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 0x31415927, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 0x0dd00000, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 655, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", -655, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 15, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 1, 0, t0, t1);
+ TESTINST1("usw $t0, 0($t1)", 53, 0, t0, t1);
+ TESTINST1("usw $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("usw $t0, 2($t1)", 0xffffffff, 2, t0, t1);
+ TESTINST1("usw $t0, 32($t1)", 0xffffffff, 32, t0, t1);
+ TESTINST1("usw $t0, 36($t1)", 0xffffffff, 36, t0, t1);
+ TESTINST1("usw $t0, 40($t1)", 0x31415927, 40, t0, t1);
+ TESTINST1("usw $t0, 44($t1)", 0x7fffffff, 44, t0, t1);
+ TESTINST1("usw $t0, 48($t1)", 0x80000000, 48, t0, t1);
+ TESTINST1("usw $t0, 52($t1)", 655, 52, t0, t1);
+ ppMem(mem1, 16);
+ ppMem1(mem, 16);
+
+ printf("swl $t0, 3($t0)\nswr $t0, 0($t0)\n");
+ TESTINSTsw(0x4853000, 0, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x4853000, 4, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x4863700, 8, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x48aedd0, 12, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x2aaee700, 16, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x2aaee7ff, 20, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x2aaeffff, 24, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x4863700, 28, t0, t1);
+ ppMem0(mem2, 12);
+ TESTINSTsw(0x2aaee700, 32, t0, t1);
+ ppMem0(mem2, 12);
+ return 0;
+}
+
Added: trunk/none/tests/mips32/.deps/vfp.Po (+1 -0)
===================================================================
--- trunk/none/tests/mips32/.deps/vfp.Po 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/.deps/vfp.Po 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1 @@
+# dummy
Added: trunk/none/tests/mips32/.deps/FPUarithmetic.Po (+1 -0)
===================================================================
--- trunk/none/tests/mips32/.deps/FPUarithmetic.Po 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/.deps/FPUarithmetic.Po 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1 @@
+# dummy
Added: trunk/none/tests/mips32/round.stdout.exp (+794 -0)
===================================================================
--- trunk/none/tests/mips32/round.stdout.exp 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/round.stdout.exp 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,794 @@
+-------------------------- test FPU Conversion Operations Using a Directed Rounding Mode --------------------------
+ceil.w.s 0 0.000000
+ceil.w.s 457 456.248962
+ceil.w.s 3 3.000000
+ceil.w.s -1 -1.000000
+ceil.w.s 1385 1384.599976
+ceil.w.s -7 -7.294568
+ceil.w.s 1000000000 1000000000.000000
+ceil.w.s -5786 -5786.470215
+ceil.w.s 1752 1752.000000
+ceil.w.s 1 0.002457
+ceil.w.s 1 0.000000
+ceil.w.s -248562 -248562.765625
+ceil.w.s -45786 -45786.476562
+ceil.w.s 457 456.248962
+ceil.w.s 35 34.000462
+ceil.w.s 45787 45786.476562
+ceil.w.s 1752065 1752065.000000
+ceil.w.s 107 107.000000
+ceil.w.s -45667 -45667.238281
+ceil.w.s -7 -7.294568
+ceil.w.s -347856 -347856.468750
+ceil.w.s 356048 356047.562500
+ceil.w.s -1 -1.000000
+ceil.w.s 24 23.040001
+ceil.w.d 0 0.000000
+ceil.w.d 457 456.248956
+ceil.w.d 3 3.000000
+ceil.w.d -1 -1.000000
+ceil.w.d 1385 1384.600000
+ceil.w.d -7 -7.294568
+ceil.w.d 1000000000 1000000000.000000
+ceil.w.d -5786 -5786.470000
+ceil.w.d 1752 1752.000000
+ceil.w.d 1 0.002458
+ceil.w.d 1 0.000000
+ceil.w.d -248562 -248562.760000
+ceil.w.d -45786 -45786.476000
+ceil.w.d 457 456.248956
+ceil.w.d 35 34.000460
+ceil.w.d 45787 45786.476000
+ceil.w.d 1752065 1752065.000000
+ceil.w.d 107 107.000000
+ceil.w.d -45667 -45667.240000
+ceil.w.d -7 -7.294568
+ceil.w.d -347856 -347856.475000
+ceil.w.d 356048 356047.560000
+ceil.w.d -1 -1.000000
+ceil.w.d 24 23.040000
+floor.w.s 0 0.000000
+floor.w.s 456 456.248962
+floor.w.s 3 3.000000
+floor.w.s -1 -1.000000
+floor.w.s 1384 1384.599976
+floor.w.s -8 -7.294568
+floor.w.s 1000000000 1000000000.000000
+floor.w.s -5787 -5786.470215
+floor.w.s 1752 1752.000000
+floor.w.s 0 0.002457
+floor.w.s 0 0.000000
+floor.w.s -248563 -248562.765625
+floor.w.s -45787 -45786.476562
+floor.w.s 456 456.248962
+floor.w.s 34 34.000462
+floor.w.s 45786 45786.476562
+floor.w.s 1752065 1752065.000000
+floor.w.s 107 107.000000
+floor.w.s -45668 -45667.238281
+floor.w.s -8 -7.294568
+floor.w.s -347857 -347856.468750
+floor.w.s 356047 356047.562500
+floor.w.s -1 -1.000000
+floor.w.s 23 23.040001
+floor.w.d 0 0.000000
+floor.w.d 456 456.248956
+floor.w.d 3 3.000000
+floor.w.d -1 -1.000000
+floor.w.d 1384 1384.600000
+floor.w.d -8 -7.294568
+floor.w.d 1000000000 1000000000.000000
+floor.w.d -5787 -5786.470000
+floor.w.d 1752 1752.000000
+floor.w.d 0 0.002458
+floor.w.d 0 0.000000
+floor.w.d -248563 -248562.760000
+floor.w.d -45787 -45786.476000
+floor.w.d 456 456.248956
+floor.w.d 34 34.000460
+floor.w.d 45786 45786.476000
+floor.w.d 1752065 1752065.000000
+floor.w.d 107 107.000000
+floor.w.d -45668 -45667.240000
+floor.w.d -8 -7.294568
+floor.w.d -347857 -347856.475000
+floor.w.d 356047 356047.560000
+floor.w.d -1 -1.000000
+floor.w.d 23 23.040000
+round.w.s 0 0.000000
+round.w.s 456 456.248962
+round.w.s 3 3.000000
+round.w.s -1 -1.000000
+round.w.s 1385 1384.599976
+round.w.s -7 -7.294568
+round.w.s 1000000000 1000000000.000000
+round.w.s -5786 -5786.470215
+round.w.s 1752 1752.000000
+round.w.s 0 0.002457
+round.w.s 0 0.000000
+round.w.s -248563 -248562.765625
+round.w.s -45786 -45786.476562
+round.w.s 456 456.248962
+round.w.s 34 34.000462
+round.w.s 45786 45786.476562
+round.w.s 1752065 1752065.000000
+round.w.s 107 107.000000
+round.w.s -45667 -45667.238281
+round.w.s -7 -7.294568
+round.w.s -347856 -347856.468750
+round.w.s 356048 356047.562500
+round.w.s -1 -1.000000
+round.w.s 23 23.040001
+round.w.d 0 0.000000
+round.w.d 456 456.248956
+round.w.d 3 3.000000
+round.w.d -1 -1.000000
+round.w.d 1385 1384.600000
+round.w.d -7 -7.294568
+round.w.d 1000000000 1000000000.000000
+round.w.d -5786 -5786.470000
+round.w.d 1752 1752.000000
+round.w.d 0 0.002458
+round.w.d 0 0.000000
+round.w.d -248563 -248562.760000
+round.w.d -45786 -45786.476000
+round.w.d 456 456.248956
+round.w.d 34 34.000460
+round.w.d 45786 45786.476000
+round.w.d 1752065 1752065.000000
+round.w.d 107 107.000000
+round.w.d -45667 -45667.240000
+round.w.d -7 -7.294568
+round.w.d -347856 -347856.475000
+round.w.d 356048 356047.560000
+round.w.d -1 -1.000000
+round.w.d 23 23.040000
+trunc.w.s 0 0.000000
+trunc.w.s 456 456.248962
+trunc.w.s 3 3.000000
+trunc.w.s -1 -1.000000
+trunc.w.s 1384 1384.599976
+trunc.w.s -7 -7.294568
+trunc.w.s 1000000000 1000000000.000000
+trunc.w.s -5786 -5786.470215
+trunc.w.s 1752 1752.000000
+trunc.w.s 0 0.002457
+trunc.w.s 0 0.000000
+trunc.w.s -248562 -248562.765625
+trunc.w.s -45786 -45786.476562
+trunc.w.s 456 456.248962
+trunc.w.s 34 34.000462
+trunc.w.s 45786 45786.476562
+trunc.w.s 1752065 1752065.000000
+trunc.w.s 107 107.000000
+trunc.w.s -45667 -45667.238281
+trunc.w.s -7 -7.294568
+trunc.w.s -347856 -347856.468750
+trunc.w.s 356047 356047.562500
+trunc.w.s -1 -1.000000
+trunc.w.s 23 23.040001
+trunc.w.d 0 0.000000
+trunc.w.d 456 456.248956
+trunc.w.d 3 3.000000
+trunc.w.d -1 -1.000000
+trunc.w.d 1384 1384.600000
+trunc.w.d -7 -7.294568
+trunc.w.d 1000000000 1000000000.000000
+trunc.w.d -5786 -5786.470000
+trunc.w.d 1752 1752.000000
+trunc.w.d 0 0.002458
+trunc.w.d 0 0.000000
+trunc.w.d -248562 -248562.760000
+trunc.w.d -45786 -45786.476000
+trunc.w.d 456 456.248956
+trunc.w.d 34 34.000460
+trunc.w.d 45786 45786.476000
+trunc.w.d 1752065 1752065.000000
+trunc.w.d 107 107.000000
+trunc.w.d -45667 -45667.240000
+trunc.w.d -7 -7.294568
+trunc.w.d -347856 -347856.475000
+trunc.w.d 356047 356047.560000
+trunc.w.d -1 -1.000000
+trunc.w.d 23 23.040000
+-------------------------- test FPU Conversion Operations Using the FCSR Rounding Mode --------------------------
+roundig mode: near
+cvt.d.s 0.000000 0.000000
+cvt.d.s 456.248962 456.248962
+cvt.d.s 3.000000 3.000000
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 1384.599976 1384.599976
+cvt.d.s -7.294568 -7.294568
+cvt.d.s 1000000000.000000 1000000000.000000
+cvt.d.s -5786.470215 -5786.470215
+cvt.d.s 1752.000000 1752.000000
+cvt.d.s 0.002457 0.002457
+cvt.d.s 0.000000 0.000000
+cvt.d.s -248562.765625 -248562.765625
+cvt.d.s -45786.476562 -45786.476562
+cvt.d.s 456.248962 456.248962
+cvt.d.s 34.000462 34.000462
+cvt.d.s 45786.476562 45786.476562
+cvt.d.s 1752065.000000 1752065.000000
+cvt.d.s 107.000000 107.000000
+cvt.d.s -45667.238281 -45667.238281
+cvt.d.s -7.294568 -7.294568
+cvt.d.s -347856.468750 -347856.468750
+cvt.d.s 356047.562500 356047.562500
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 23.040001 23.040001
+roundig mode: zero
+cvt.d.s 0.000000 0.000000
+cvt.d.s 456.248962 456.248962
+cvt.d.s 3.000000 3.000000
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 1384.599976 1384.599976
+cvt.d.s -7.294568 -7.294568
+cvt.d.s 1000000000.000000 1000000000.000000
+cvt.d.s -5786.470215 -5786.470215
+cvt.d.s 1752.000000 1752.000000
+cvt.d.s 0.002457 0.002457
+cvt.d.s 0.000000 0.000000
+cvt.d.s -248562.765625 -248562.765625
+cvt.d.s -45786.476562 -45786.476562
+cvt.d.s 456.248962 456.248962
+cvt.d.s 34.000462 34.000462
+cvt.d.s 45786.476562 45786.476562
+cvt.d.s 1752065.000000 1752065.000000
+cvt.d.s 107.000000 107.000000
+cvt.d.s -45667.238281 -45667.238281
+cvt.d.s -7.294568 -7.294568
+cvt.d.s -347856.468750 -347856.468750
+cvt.d.s 356047.562500 356047.562500
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 23.040001 23.040001
+roundig mode: +inf
+cvt.d.s 0.000000 0.000000
+cvt.d.s 456.248962 456.248962
+cvt.d.s 3.000000 3.000000
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 1384.599976 1384.599976
+cvt.d.s -7.294568 -7.294568
+cvt.d.s 1000000000.000000 1000000000.000000
+cvt.d.s -5786.470215 -5786.470215
+cvt.d.s 1752.000000 1752.000000
+cvt.d.s 0.002457 0.002457
+cvt.d.s 0.000000 0.000000
+cvt.d.s -248562.765625 -248562.765625
+cvt.d.s -45786.476562 -45786.476562
+cvt.d.s 456.248962 456.248962
+cvt.d.s 34.000462 34.000462
+cvt.d.s 45786.476562 45786.476562
+cvt.d.s 1752065.000000 1752065.000000
+cvt.d.s 107.000000 107.000000
+cvt.d.s -45667.238281 -45667.238281
+cvt.d.s -7.294568 -7.294568
+cvt.d.s -347856.468750 -347856.468750
+cvt.d.s 356047.562500 356047.562500
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 23.040001 23.040001
+roundig mode: -inf
+cvt.d.s 0.000000 0.000000
+cvt.d.s 456.248962 456.248962
+cvt.d.s 3.000000 3.000000
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 1384.599976 1384.599976
+cvt.d.s -7.294568 -7.294568
+cvt.d.s 1000000000.000000 1000000000.000000
+cvt.d.s -5786.470215 -5786.470215
+cvt.d.s 1752.000000 1752.000000
+cvt.d.s 0.002457 0.002457
+cvt.d.s 0.000000 0.000000
+cvt.d.s -248562.765625 -248562.765625
+cvt.d.s -45786.476562 -45786.476562
+cvt.d.s 456.248962 456.248962
+cvt.d.s 34.000462 34.000462
+cvt.d.s 45786.476562 45786.476562
+cvt.d.s 1752065.000000 1752065.000000
+cvt.d.s 107.000000 107.000000
+cvt.d.s -45667.238281 -45667.238281
+cvt.d.s -7.294568 -7.294568
+cvt.d.s -347856.468750 -347856.468750
+cvt.d.s 356047.562500 356047.562500
+cvt.d.s -1.000000 -1.000000
+cvt.d.s 23.040001 23.040001
+roundig mode: near
+cvt.d.w 0.000000 0
+cvt.d.w 456.000000 456
+cvt.d.w 3.000000 3
+cvt.d.w -1.000000 -1
+cvt.d.w -1.000000 -1
+cvt.d.w 356.000000 356
+cvt.d.w 1000000000.000000 1000000000
+cvt.d.w -5786.000000 -5786
+cvt.d.w 1752.000000 1752
+cvt.d.w 24575.000000 24575
+cvt.d.w 10.000000 10
+cvt.d.w -248562.000000 -248562
+cvt.d.w -45786.000000 -45786
+cvt.d.w 456.000000 456
+cvt.d.w 34.000000 34
+cvt.d.w 45786.000000 45786
+cvt.d.w 1752065.000000 1752065
+cvt.d.w 107.000000 107
+cvt.d.w -45667.000000 -45667
+cvt.d.w -7.000000 -7
+cvt.d.w -347856.000000 -347856
+cvt.d.w -2147483648.000000 -2147483648
+cvt.d.w 268435455.000000 268435455
+cvt.d.w 23.000000 23
+roundig mode: zero
+cvt.d.w 0.000000 0
+cvt.d.w 456.000000 456
+cvt.d.w 3.000000 3
+cvt.d.w -1.000000 -1
+cvt.d.w -1.000000 -1
+cvt.d.w 356.000000 356
+cvt.d.w 1000000000.000000 1000000000
+cvt.d.w -5786.000000 -5786
+cvt.d.w 1752.000000 1752
+cvt.d.w 24575.000000 24575
+cvt.d.w 10.000000 10
+cvt.d.w -248562.000000 -248562
+cvt.d.w -45786.000000 -45786
+cvt.d.w 456.000000 456
+cvt.d.w 34.000000 34
+cvt.d.w 45786.000000 45786
+cvt.d.w 1752065.000000 1752065
+cvt.d.w 107.000000 107
+cvt.d.w -45667.000000 -45667
+cvt.d.w -7.000000 -7
+cvt.d.w -347856.000000 -347856
+cvt.d.w -2147483648.000000 -2147483648
+cvt.d.w 268435455.000000 268435455
+cvt.d.w 23.000000 23
+roundig mode: +inf
+cvt.d.w 0.000000 0
+cvt.d.w 456.000000 456
+cvt.d.w 3.000000 3
+cvt.d.w -1.000000 -1
+cvt.d.w -1.000000 -1
+cvt.d.w 356.000000 356
+cvt.d.w 1000000000.000000 1000000000
+cvt.d.w -5786.000000 -5786
+cvt.d.w 1752.000000 1752
+cvt.d.w 24575.000000 24575
+cvt.d.w 10.000000 10
+cvt.d.w -248562.000000 -248562
+cvt.d.w -45786.000000 -45786
+cvt.d.w 456.000000 456
+cvt.d.w 34.000000 34
+cvt.d.w 45786.000000 45786
+cvt.d.w 1752065.000000 1752065
+cvt.d.w 107.000000 107
+cvt.d.w -45667.000000 -45667
+cvt.d.w -7.000000 -7
+cvt.d.w -347856.000000 -347856
+cvt.d.w -2147483648.000000 -2147483648
+cvt.d.w 268435455.000000 268435455
+cvt.d.w 23.000000 23
+roundig mode: -inf
+cvt.d.w 0.000000 0
+cvt.d.w 456.000000 456
+cvt.d.w 3.000000 3
+cvt.d.w -1.000000 -1
+cvt.d.w -1.000000 -1
+cvt.d.w 356.000000 356
+cvt.d.w 1000000000.000000 1000000000
+cvt.d.w -5786.000000 -5786
+cvt.d.w 1752.000000 1752
+cvt.d.w 24575.000000 24575
+cvt.d.w 10.000000 10
+cvt.d.w -248562.000000 -248562
+cvt.d.w -45786.000000 -45786
+cvt.d.w 456.000000 456
+cvt.d.w 34.000000 34
+cvt.d.w 45786.000000 45786
+cvt.d.w 1752065.000000 1752065
+cvt.d.w 107.000000 107
+cvt.d.w -45667.000000 -45667
+cvt.d.w -7.000000 -7
+cvt.d.w -347856.000000 -347856
+cvt.d.w -2147483648.000000 -2147483648
+cvt.d.w 268435455.000000 268435455
+cvt.d.w 23.000000 23
+roundig mode: near
+cvt.s.d 0.000000 0.000000
+cvt.s.d 456.248962 456.248956
+cvt.s.d 3.000000 3.000000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 1384.599976 1384.600000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d 1000000000.000000 1000000000.000000
+cvt.s.d -5786.470215 -5786.470000
+cvt.s.d 1752.000000 1752.000000
+cvt.s.d 0.002457 0.002458
+cvt.s.d 0.000000 0.000000
+cvt.s.d -248562.765625 -248562.760000
+cvt.s.d -45786.476562 -45786.476000
+cvt.s.d 456.248962 456.248956
+cvt.s.d 34.000462 34.000460
+cvt.s.d 45786.476562 45786.476000
+cvt.s.d 1752065.000000 1752065.000000
+cvt.s.d 107.000000 107.000000
+cvt.s.d -45667.238281 -45667.240000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d -347856.468750 -347856.475000
+cvt.s.d 356047.562500 356047.560000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 23.040001 23.040000
+roundig mode: zero
+cvt.s.d 0.000000 0.000000
+cvt.s.d 456.248932 456.248956
+cvt.s.d 3.000000 3.000000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 1384.599976 1384.600000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d 1000000000.000000 1000000000.000000
+cvt.s.d -5786.469727 -5786.470000
+cvt.s.d 1752.000000 1752.000000
+cvt.s.d 0.002457 0.002458
+cvt.s.d 0.000000 0.000000
+cvt.s.d -248562.750000 -248562.760000
+cvt.s.d -45786.472656 -45786.476000
+cvt.s.d 456.248932 456.248956
+cvt.s.d 34.000458 34.000460
+cvt.s.d 45786.472656 45786.476000
+cvt.s.d 1752065.000000 1752065.000000
+cvt.s.d 107.000000 107.000000
+cvt.s.d -45667.238281 -45667.240000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d -347856.468750 -347856.475000
+cvt.s.d 356047.531250 356047.560000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 23.039999 23.040000
+roundig mode: +inf
+cvt.s.d 0.000000 0.000000
+cvt.s.d 456.248962 456.248956
+cvt.s.d 3.000000 3.000000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 1384.600098 1384.600000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d 1000000000.000000 1000000000.000000
+cvt.s.d -5786.469727 -5786.470000
+cvt.s.d 1752.000000 1752.000000
+cvt.s.d 0.002458 0.002458
+cvt.s.d 0.000000 0.000000
+cvt.s.d -248562.750000 -248562.760000
+cvt.s.d -45786.472656 -45786.476000
+cvt.s.d 456.248962 456.248956
+cvt.s.d 34.000462 34.000460
+cvt.s.d 45786.476562 45786.476000
+cvt.s.d 1752065.000000 1752065.000000
+cvt.s.d 107.000000 107.000000
+cvt.s.d -45667.238281 -45667.240000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d -347856.468750 -347856.475000
+cvt.s.d 356047.562500 356047.560000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 23.040001 23.040000
+roundig mode: -inf
+cvt.s.d 0.000000 0.000000
+cvt.s.d 456.248932 456.248956
+cvt.s.d 3.000000 3.000000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 1384.599976 1384.600000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d 1000000000.000000 1000000000.000000
+cvt.s.d -5786.470215 -5786.470000
+cvt.s.d 1752.000000 1752.000000
+cvt.s.d 0.002457 0.002458
+cvt.s.d 0.000000 0.000000
+cvt.s.d -248562.765625 -248562.760000
+cvt.s.d -45786.476562 -45786.476000
+cvt.s.d 456.248932 456.248956
+cvt.s.d 34.000458 34.000460
+cvt.s.d 45786.472656 45786.476000
+cvt.s.d 1752065.000000 1752065.000000
+cvt.s.d 107.000000 107.000000
+cvt.s.d -45667.242188 -45667.240000
+cvt.s.d -7.294568 -7.294568
+cvt.s.d -347856.500000 -347856.475000
+cvt.s.d 356047.531250 356047.560000
+cvt.s.d -1.000000 -1.000000
+cvt.s.d 23.039999 23.040000
+roundig mode: near
+cvt.s.w 0.000000 0
+cvt.s.w 456.000000 456
+cvt.s.w 3.000000 3
+cvt.s.w -1.000000 -1
+cvt.s.w -1.000000 -1
+cvt.s.w 356.000000 356
+cvt.s.w 1000000000.000000 1000000000
+cvt.s.w -5786.000000 -5786
+cvt.s.w 1752.000000 1752
+cvt.s.w 24575.000000 24575
+cvt.s.w 10.000000 10
+cvt.s.w -248562.000000 -248562
+cvt.s.w -45786.000000 -45786
+cvt.s.w 456.000000 456
+cvt.s.w 34.000000 34
+cvt.s.w 45786.000000 45786
+cvt.s.w 1752065.000000 1752065
+cvt.s.w 107.000000 107
+cvt.s.w -45667.000000 -45667
+cvt.s.w -7.000000 -7
+cvt.s.w -347856.000000 -347856
+cvt.s.w -2147483648.000000 -2147483648
+cvt.s.w 268435456.000000 268435455
+cvt.s.w 23.000000 23
+roundig mode: zero
+cvt.s.w 0.000000 0
+cvt.s.w 456.000000 456
+cvt.s.w 3.000000 3
+cvt.s.w -1.000000 -1
+cvt.s.w -1.000000 -1
+cvt.s.w 356.000000 356
+cvt.s.w 1000000000.000000 1000000000
+cvt.s.w -5786.000000 -5786
+cvt.s.w 1752.000000 1752
+cvt.s.w 24575.000000 24575
+cvt.s.w 10.000000 10
+cvt.s.w -248562.000000 -248562
+cvt.s.w -45786.000000 -45786
+cvt.s.w 456.000000 456
+cvt.s.w 34.000000 34
+cvt.s.w 45786.000000 45786
+cvt.s.w 1752065.000000 1752065
+cvt.s.w 107.000000 107
+cvt.s.w -45667.000000 -45667
+cvt.s.w -7.000000 -7
+cvt.s.w -347856.000000 -347856
+cvt.s.w -2147483648.000000 -2147483648
+cvt.s.w 268435440.000000 268435455
+cvt.s.w 23.000000 23
+roundig mode: +inf
+cvt.s.w 0.000000 0
+cvt.s.w 456.000000 456
+cvt.s.w 3.000000 3
+cvt.s.w -1.000000 -1
+cvt.s.w -1.000000 -1
+cvt.s.w 356.000000 356
+cvt.s.w 1000000000.000000 1000000000
+cvt.s.w -5786.000000 -5786
+cvt.s.w 1752.000000 1752
+cvt.s.w 24575.000000 24575
+cvt.s.w 10.000000 10
+cvt.s.w -248562.000000 -248562
+cvt.s.w -45786.000000 -45786
+cvt.s.w 456.000000 456
+cvt.s.w 34.000000 34
+cvt.s.w 45786.000000 45786
+cvt.s.w 1752065.000000 1752065
+cvt.s.w 107.000000 107
+cvt.s.w -45667.000000 -45667
+cvt.s.w -7.000000 -7
+cvt.s.w -347856.000000 -347856
+cvt.s.w -2147483648.000000 -2147483648
+cvt.s.w 268435456.000000 268435455
+cvt.s.w 23.000000 23
+roundig mode: -inf
+cvt.s.w 0.000000 0
+cvt.s.w 456.000000 456
+cvt.s.w 3.000000 3
+cvt.s.w -1.000000 -1
+cvt.s.w -1.000000 -1
+cvt.s.w 356.000000 356
+cvt.s.w 1000000000.000000 1000000000
+cvt.s.w -5786.000000 -5786
+cvt.s.w 1752.000000 1752
+cvt.s.w 24575.000000 24575
+cvt.s.w 10.000000 10
+cvt.s.w -248562.000000 -248562
+cvt.s.w -45786.000000 -45786
+cvt.s.w 456.000000 456
+cvt.s.w 34.000000 34
+cvt.s.w 45786.000000 45786
+cvt.s.w 1752065.000000 1752065
+cvt.s.w 107.000000 107
+cvt.s.w -45667.000000 -45667
+cvt.s.w -7.000000 -7
+cvt.s.w -347856.000000 -347856
+cvt.s.w -2147483648.000000 -2147483648
+cvt.s.w 268435440.000000 268435455
+cvt.s.w 23.000000 23
+roundig mode: near
+cvt.w.s 0 0.000000
+cvt.w.s 456 456.248962
+cvt.w.s 3 3.000000
+cvt.w.s -1 -1.000000
+cvt.w.s 1385 1384.599976
+cvt.w.s -7 -7.294568
+cvt.w.s 1000000000 1000000000.000000
+cvt.w.s -5786 -5786.470215
+cvt.w.s 1752 1752.000000
+cvt.w.s 0 0.002457
+cvt.w.s 0 0.000000
+cvt.w.s -248563 -248562.765625
+cvt.w.s -45786 -45786.476562
+cvt.w.s 456 456.248962
+cvt.w.s 34 34.000462
+cvt.w.s 45786 45786.476562
+cvt.w.s 1752065 1752065.000000
+cvt.w.s 107 107.000000
+cvt.w.s -45667 -45667.238281
+cvt.w.s -7 -7.294568
+cvt.w.s -347856 -347856.468750
+cvt.w.s 356048 356047.562500
+cvt.w.s -1 -1.000000
+cvt.w.s 23 23.040001
+roundig mode: zero
+cvt.w.s 0 0.000000
+cvt.w.s 456 456.248962
+cvt.w.s 3 3.000000
+cvt.w.s -1 -1.000000
+cvt.w.s 1384 1384.599976
+cvt.w.s -7 -7.294568
+cvt.w.s 1000000000 1000000000.000000
+cvt.w.s -5786 -5786.470215
+cvt.w.s 1752 1752.000000
+cvt.w.s 0 0.002457
+cvt.w.s 0 0.000000
+cvt.w.s -248562 -248562.765625
+cvt.w.s -45786 -45786.476562
+cvt.w.s 456 456.248962
+cvt.w.s 34 34.000462
+cvt.w.s 45786 45786.476562
+cvt.w.s 1752065 1752065.000000
+cvt.w.s 107 107.000000
+cvt.w.s -45667 -45667.238281
+cvt.w.s -7 -7.294568
+cvt.w.s -347856 -347856.468750
+cvt.w.s 356047 356047.562500
+cvt.w.s -1 -1.000000
+cvt.w.s 23 23.040001
+roundig mode: +inf
+cvt.w.s 0 0.000000
+cvt.w.s 457 456.248962
+cvt.w.s 3 3.000000
+cvt.w.s -1 -1.000000
+cvt.w.s 1385 1384.599976
+cvt.w.s -7 -7.294568
+cvt.w.s 1000000000 1000000000.000000
+cvt.w.s -5786 -5786.470215
+cvt.w.s 1752 1752.000000
+cvt.w.s 1 0.002457
+cvt.w.s 1 0.000000
+cvt.w.s -248562 -248562.765625
+cvt.w.s -45786 -45786.476562
+cvt.w.s 457 456.248962
+cvt.w.s 35 34.000462
+cvt.w.s 45787 45786.476562
+cvt.w.s 1752065 1752065.000000
+cvt.w.s 107 107.000000
+cvt.w.s -45667 -45667.238281
+cvt.w.s -7 -7.294568
+cvt.w.s -347856 -347856.468750
+cvt.w.s 356048 356047.562500
+cvt.w.s -1 -1.000000
+cvt.w.s 24 23.040001
+roundig mode: -inf
+cvt.w.s 0 0.000000
+cvt.w.s 456 456.248962
+cvt.w.s 3 3.000000
+cvt.w.s -1 -1.000000
+cvt.w.s 1384 1384.599976
+cvt.w.s -8 -7.294568
+cvt.w.s 1000000000 1000000000.000000
+cvt.w.s -5787 -5786.470215
+cvt.w.s 1752 1752.000000
+cvt.w.s 0 0.002457
+cvt.w.s 0 0.000000
+cvt.w.s -248563 -248562.765625
+cvt.w.s -45787 -45786.476562
+cvt.w.s 456 456.248962
+cvt.w.s 34 34.000462
+cvt.w.s 45786 45786.476562
+cvt.w.s 1752065 1752065.000000
+cvt.w.s 107 107.000000
+cvt.w.s -45668 -45667.238281
+cvt.w.s -8 -7.294568
+cvt.w.s -347857 -347856.468750
+cvt.w.s 356047 356047.562500
+cvt.w.s -1 -1.000000
+cvt.w.s 23 23.040001
+roundig mode: near
+cvt.w.d 0 0.000000
+cvt.w.d 456 456.248956
+cvt.w.d 3 3.000000
+cvt.w.d -1 -1.000000
+cvt.w.d 1385 1384.600000
+cvt.w.d -7 -7.294568
+cvt.w.d 1000000000 1000000000.000000
+cvt.w.d -5786 -5786.470000
+cvt.w.d 1752 1752.000000
+cvt.w.d 0 0.002458
+cvt.w.d 0 0.000000
+cvt.w.d -248563 -248562.760000
+cvt.w.d -45786 -45786.476000
+cvt.w.d 456 456.248956
+cvt.w.d 34 34.000460
+cvt.w.d 45786 45786.476000
+cvt.w.d 1752065 1752065.000000
+cvt.w.d 107 107.000000
+cvt.w.d -45667 -45667.240000
+cvt.w.d -7 -7.294568
+cvt.w.d -347856 -347856.475000
+cvt.w.d 356048 356047.560000
+cvt.w.d -1 -1.000000
+cvt.w.d 23 23.040000
+roundig mode: zero
+cvt.w.d 0 0.000000
+cvt.w.d 456 456.248956
+cvt.w.d 3 3.000000
+cvt.w.d -1 -1.000000
+cvt.w.d 1384 1384.600000
+cvt.w.d -7 -7.294568
+cvt.w.d 1000000000 1000000000.000000
+cvt.w.d -5786 -5786.470000
+cvt.w.d 1752 1752.000000
+cvt.w.d 0 0.002458
+cvt.w.d 0 0.000000
+cvt.w.d -248562 -248562.760000
+cvt.w.d -45786 -45786.476000
+cvt.w.d 456 456.248956
+cvt.w.d 34 34.000460
+cvt.w.d 45786 45786.476000
+cvt.w.d 1752065 1752065.000000
+cvt.w.d 107 107.000000
+cvt.w.d -45667 -45667.240000
+cvt.w.d -7 -7.294568
+cvt.w.d -347856 -347856.475000
+cvt.w.d 356047 356047.560000
+cvt.w.d -1 -1.000000
+cvt.w.d 23 23.040000
+roundig mode: +inf
+cvt.w.d 0 0.000000
+cvt.w.d 457 456.248956
+cvt.w.d 3 3.000000
+cvt.w.d -1 -1.000000
+cvt.w.d 1385 1384.600000
+cvt.w.d -7 -7.294568
+cvt.w.d 1000000000 1000000000.000000
+cvt.w.d -5786 -5786.470000
+cvt.w.d 1752 1752.000000
+cvt.w.d 1 0.002458
+cvt.w.d 1 0.000000
+cvt.w.d -248562 -248562.760000
+cvt.w.d -45786 -45786.476000
+cvt.w.d 457 456.248956
+cvt.w.d 35 34.000460
+cvt.w.d 45787 45786.476000
+cvt.w.d 1752065 1752065.000000
+cvt.w.d 107 107.000000
+cvt.w.d -45667 -45667.240000
+cvt.w.d -7 -7.294568
+cvt.w.d -347856 -347856.475000
+cvt.w.d 356048 356047.560000
+cvt.w.d -1 -1.000000
+cvt.w.d 24 23.040000
+roundig mode: -inf
+cvt.w.d 0 0.000000
+cvt.w.d 456 456.248956
+cvt.w.d 3 3.000000
+cvt.w.d -1 -1.000000
+cvt.w.d 1384 1384.600000
+cvt.w.d -8 -7.294568
+cvt.w.d 1000000000 1000000000.000000
+cvt.w.d -5787 -5786.470000
+cvt.w.d 1752 1752.000000
+cvt.w.d 0 0.002458
+cvt.w.d 0 0.000000
+cvt.w.d -248563 -248562.760000
+cvt.w.d -45787 -45786.476000
+cvt.w.d 456 456.248956
+cvt.w.d 34 34.000460
+cvt.w.d 45786 45786.476000
+cvt.w.d 1752065 1752065.000000
+cvt.w.d 107 107.000000
+cvt.w.d -45668 -45667.240000
+cvt.w.d -8 -7.294568
+cvt.w.d -347857 -347856.475000
+cvt.w.d 356047 356047.560000
+cvt.w.d -1 -1.000000
+cvt.w.d 23 23.040000
Added: trunk/none/tests/mips32/filter_stderr (+4 -0)
===================================================================
--- trunk/none/tests/mips32/filter_stderr 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/filter_stderr 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+../filter_stderr
+
Added: trunk/none/tests/mips32/branches.vgtest (+2 -0)
===================================================================
--- trunk/none/tests/mips32/branches.vgtest 2012-06-07 10:23:23 +01:00 (rev 12617)
+++ trunk/none/tests/mips32/branches.vgtest 2012-06-07 10:32:40 +01:00 (rev 12618)
@@ -0,0 +1,2 @@
+prog: branches
+vgopts: -q
Added: trunk/none/tests/mips32/branches.st...
[truncated message content] |
|
From: <sv...@va...> - 2012-06-07 09:23:40
|
sewardj 2012-06-07 10:23:23 +0100 (Thu, 07 Jun 2012)
New Revision: 12617
Log:
Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mip...@rt..., Bug 270777.
Valgrind: new non-test files for mips32-linux.
Added files:
trunk/cachegrind/cg-mips32.c
trunk/coregrind/m_dispatch/dispatch-mips32-linux.S
trunk/coregrind/m_gdbserver/mips-cp0-valgrind-s1.xml
trunk/coregrind/m_gdbserver/mips-cp0-valgrind-s2.xml
trunk/coregrind/m_gdbserver/mips-cp0.xml
trunk/coregrind/m_gdbserver/mips-cpu-valgrind-s1.xml
trunk/coregrind/m_gdbserver/mips-cpu-valgrind-s2.xml
trunk/coregrind/m_gdbserver/mips-cpu.xml
trunk/coregrind/m_gdbserver/mips-fpu-valgrind-s1.xml
trunk/coregrind/m_gdbserver/mips-fpu-valgrind-s2.xml
trunk/coregrind/m_gdbserver/mips-fpu.xml
trunk/coregrind/m_gdbserver/mips-linux-valgrind.xml
trunk/coregrind/m_gdbserver/mips-linux.xml
trunk/coregrind/m_gdbserver/valgrind-low-mips32.c
trunk/coregrind/m_sigframe/sigframe-mips32-linux.c
trunk/coregrind/m_syswrap/syscall-mips32-linux.S
trunk/coregrind/m_syswrap/syswrap-mips32-linux.c
trunk/include/vki/vki-mips32-linux.h
trunk/include/vki/vki-posixtypes-mips32-linux.h
trunk/include/vki/vki-scnums-mips32-linux.h
Added: trunk/coregrind/m_gdbserver/mips-cp0.xml (+13 -0)
===================================================================
--- trunk/coregrind/m_gdbserver/mips-cp0.xml 2012-06-07 10:13:21 +01:00 (rev 12616)
+++ trunk/coregrind/m_gdbserver/mips-cp0.xml 2012-06-07 10:23:23 +01:00 (rev 12617)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.mips.cp0">
+ <reg name="status" bitsize="32" regnum="32"/>
+ <reg name="badvaddr" bitsize="32" regnum="35"/>
+ <reg name="cause" bitsize="32" regnum="36"/>
+</feature>
Added: trunk/coregrind/m_sigframe/sigframe-mips32-linux.c (+398 -0)
===================================================================
--- trunk/coregrind/m_sigframe/sigframe-mips32-linux.c 2012-06-07 10:13:21 +01:00 (rev 12616)
+++ trunk/coregrind/m_sigframe/sigframe-mips32-linux.c 2012-06-07 10:23:23 +01:00 (rev 12617)
@@ -0,0 +1,398 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Create/destroy signal delivery frames. ---*/
+/*--- sigframe-mips32-linux.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2012 RT-RK
+ mip...@rt...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#if defined(VGP_mips32_linux)
+
+#include "pub_core_basics.h"
+#include "pub_core_vki.h"
+#include "pub_core_vkiscnums.h"
+#include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy
+#include "pub_core_threadstate.h"
+#include "pub_core_aspacemgr.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcprint.h"
+#include "pub_core_machine.h"
+#include "pub_core_options.h"
+#include "pub_core_sigframe.h"
+#include "pub_core_signals.h"
+#include "pub_core_tooliface.h"
+#include "pub_core_trampoline.h"
+#include "pub_core_transtab.h" // VG_(discard_translations)
+
+struct vg_sig_private
+{
+ UInt magicPI;
+ UInt sigNo_private;
+ VexGuestMIPS32State vex_shadow1;
+ VexGuestMIPS32State vex_shadow2;
+};
+
+struct sigframe
+{
+ UInt sf_ass[4]; /* argument save space for o32 */
+ UInt sf_pad[2]; /* Was: signal trampoline */
+ struct vki_sigcontext sf_sc;
+ vki_sigset_t sf_mask;
+ struct vg_sig_private priv;
+};
+
+struct rt_sigframe
+{
+ UInt rs_ass[4]; /* argument save space for o32 */
+ UInt rs_pad[2]; /* Was: signal trampoline */
+ vki_siginfo_t rs_info;
+ struct vki_ucontext rs_uc;
+ struct vg_sig_private priv;
+};
+
+/* Extend the stack segment downwards if needed so as to ensure the
+ new signal frames are mapped to something. Return a Bool
+ indicating whether or not the operation was successful.
+*/
+static Bool extend ( ThreadState *tst, Addr addr, SizeT size )
+{
+ ThreadId tid = tst->tid;
+ NSegment const* stackseg = NULL;
+
+ if (VG_(extend_stack)(addr, tst->client_stack_szB))
+ {
+ stackseg = VG_(am_find_nsegment)(addr);
+ }
+
+ if (stackseg == NULL || !stackseg->hasR || !stackseg->hasW)
+ {
+ VG_(message)(Vg_UserMsg,
+ "Can't extend stack to %#lx during signal delivery for thread %d:\n",
+ addr, tid );
+ if (stackseg == NULL)
+ VG_(message)( Vg_UserMsg, " no stack segment\n" );
+ else
+ VG_(message)( Vg_UserMsg, " too small or bad protection modes\n" );
+
+ /* set SIGSEGV to default handler */
+ VG_(set_default_handler)( VKI_SIGSEGV );
+ VG_(synth_fault_mapping)( tid, addr );
+
+ /* The whole process should be about to die, since the default
+ action of SIGSEGV to kill the whole process. */
+ return False;
+ }
+
+ /* For tracking memory events, indicate the entire frame has been
+ allocated. */
+ VG_TRACK( new_mem_stack_signal, addr - VG_STACK_REDZONE_SZB,
+ size + VG_STACK_REDZONE_SZB, tid );
+
+ return True;
+}
+
+static
+void setup_sigcontext2 ( ThreadState* tst, struct vki_sigcontext **sc1, const vki_siginfo_t *si)
+{
+
+ struct vki_sigcontext *sc = *sc1;
+
+ VG_TRACK( pre_mem_write, Vg_CoreSignal, tst->tid, "signal frame mcontext",
+ (Addr)sc, sizeof(unsigned long long)*34 );
+ sc->sc_regs[1] = tst->arch.vex.guest_r1;
+ sc->sc_regs[2] = tst->arch.vex.guest_r2;
+ sc->sc_regs[3] = tst->arch.vex.guest_r3;
+ sc->sc_regs[4] = tst->arch.vex.guest_r4;
+ sc->sc_regs[5] = tst->arch.vex.guest_r5;
+ sc->sc_regs[6] = tst->arch.vex.guest_r6;
+ sc->sc_regs[7] = tst->arch.vex.guest_r7;
+ sc->sc_regs[8] = tst->arch.vex.guest_r8;
+ sc->sc_regs[9] = tst->arch.vex.guest_r9;
+ sc->sc_regs[10] = tst->arch.vex.guest_r10;
+ sc->sc_regs[11] = tst->arch.vex.guest_r11;
+ sc->sc_regs[12] = tst->arch.vex.guest_r12;
+ sc->sc_regs[13] = tst->arch.vex.guest_r13;
+ sc->sc_regs[14] = tst->arch.vex.guest_r14;
+ sc->sc_regs[15] = tst->arch.vex.guest_r15;
+ sc->sc_regs[16] = tst->arch.vex.guest_r16;
+ sc->sc_regs[17] = tst->arch.vex.guest_r17;
+ sc->sc_regs[18] = tst->arch.vex.guest_r18;
+ sc->sc_regs[19] = tst->arch.vex.guest_r19;
+ sc->sc_regs[20] = tst->arch.vex.guest_r20;
+ sc->sc_regs[21] = tst->arch.vex.guest_r21;
+ sc->sc_regs[22] = tst->arch.vex.guest_r22;
+ sc->sc_regs[23] = tst->arch.vex.guest_r23;
+ sc->sc_regs[24] = tst->arch.vex.guest_r24;
+ sc->sc_regs[25] = tst->arch.vex.guest_r25;
+ sc->sc_regs[26] = tst->arch.vex.guest_r26;
+ sc->sc_regs[27] = tst->arch.vex.guest_r27;
+ sc->sc_regs[28] = tst->arch.vex.guest_r28;
+ sc->sc_regs[29] = tst->arch.vex.guest_r29;
+ sc->sc_regs[30] = tst->arch.vex.guest_r30;
+ sc->sc_regs[31] = tst->arch.vex.guest_r31;
+ sc->sc_pc = tst->arch.vex.guest_PC;
+ sc->sc_mdhi = tst->arch.vex.guest_HI;
+ sc->sc_mdlo = tst->arch.vex.guest_LO;
+}
+
+/* EXPORTED */
+void VG_(sigframe_create)( ThreadId tid,
+ Addr sp_top_of_frame,
+ const vki_siginfo_t *siginfo,
+ const struct vki_ucontext *siguc,
+ void *handler,
+ UInt flags,
+ const vki_sigset_t *mask,
+ void *restorer )
+{
+ Addr sp;
+ ThreadState* tst = VG_(get_ThreadState)(tid);
+ Addr faultaddr;
+ Int sigNo = siginfo->si_signo;
+ struct vg_sig_private *priv;
+
+ /* Stack must be 8-byte aligned */
+ sp_top_of_frame &= ~0xf;
+
+ if (flags & VKI_SA_SIGINFO)
+ {
+ sp = sp_top_of_frame - sizeof(struct rt_sigframe);
+ }
+ else
+ {
+ sp = sp_top_of_frame - sizeof(struct sigframe);
+ }
+
+ tst = VG_(get_ThreadState)(tid);
+ if (!extend(tst, sp, sp_top_of_frame - sp))
+ return;
+
+ vg_assert(VG_IS_8_ALIGNED(sp));
+
+ /* SIGILL defines addr to be the faulting address */
+
+ faultaddr = (Addr)siginfo->_sifields._sigfault._addr;
+ if (sigNo == VKI_SIGILL && siginfo->si_code > 0)
+ faultaddr = tst->arch.vex.guest_PC;
+
+ if (flags & VKI_SA_SIGINFO)
+ {
+ struct rt_sigframe *frame = (struct rt_sigframe *) sp;
+ struct vki_ucontext *ucp = &frame->rs_uc;
+ if (VG_(clo_trace_signals))
+ VG_(printf)("rt_sigframe\n");
+ /* Create siginfo. */
+ VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal frame siginfo",
+ (Addr)&frame->rs_info, sizeof(frame->rs_info) );
+
+ VG_(memcpy)(&frame->rs_info, siginfo, sizeof(*siginfo));
+
+ VG_TRACK( post_mem_write, Vg_CoreSignal, tid,
+ (Addr)&frame->rs_info, sizeof(frame->rs_info) );
+
+ /* Create the ucontext. */
+ VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal frame ucontext",
+ (Addr)ucp, offsetof(struct vki_ucontext, uc_mcontext) );
+
+ ucp->uc_flags = 0;
+ ucp->uc_link = 0;
+ ucp->uc_stack = tst->altstack;
+
+ VG_TRACK( post_mem_write, Vg_CoreSignal, tid, (Addr)ucp,
+ offsetof(struct vki_ucontext, uc_mcontext) );
+
+ struct vki_sigcontext *scp = &(frame->rs_uc.uc_mcontext);
+ setup_sigcontext2(tst, &(scp), siginfo);
+
+ ucp->uc_sigmask = tst->sig_mask;
+
+ priv = &frame->priv;
+
+ /*
+ * Arguments to signal handler:
+ *
+ * a0 = signal number
+ * a1 = 0 (should be cause)
+ * a2 = pointer to ucontext
+ *
+ * $25 and c0_epc point to the signal handler, $29 points to
+ * the struct rt_sigframe.
+ */
+
+ tst->arch.vex.guest_r4 = siginfo->si_signo;
+ tst->arch.vex.guest_r5 = (Addr) &frame->rs_info;
+ tst->arch.vex.guest_r6 = (Addr) &frame->rs_uc;
+ tst->arch.vex.guest_r29 = (Addr) frame;
+ tst->arch.vex.guest_r25 = (Addr) handler;
+
+ if (flags & VKI_SA_RESTORER)
+ {
+ tst->arch.vex.guest_r31 = (Addr) restorer;
+ }
+ else
+ {
+ tst->arch.vex.guest_r31 = (Addr)&VG_(mips32_linux_SUBST_FOR_rt_sigreturn);
+ }
+
+ }
+ else
+ {
+ if (VG_(clo_trace_signals))
+ VG_(printf)("sigframe\n");
+ struct sigframe *frame = (struct sigframe *) sp;
+ struct vki_sigcontext *scp = &(frame->sf_sc);
+ setup_sigcontext2(tst, &(scp), siginfo);
+ frame->sf_mask = tst->sig_mask;
+ priv = &frame->priv;
+ /*
+ * Arguments to signal handler:
+ *
+ * a0 = signal number
+ * a1 = 0 (should be cause)
+ * a2 = pointer to struct sigcontext
+ *
+ * $25 and c0_epc point to the signal handler, $29 points to the
+ * struct sigframe.
+ */
+ tst->arch.vex.guest_r4 = siginfo->si_signo;
+ tst->arch.vex.guest_r5 = 0;
+ tst->arch.vex.guest_r6 = (Addr) &frame->sf_sc;
+ tst->arch.vex.guest_r29 = (Addr) frame;
+ tst->arch.vex.guest_r25 = (Addr) handler;
+
+ if (flags & VKI_SA_RESTORER)
+ {
+ tst->arch.vex.guest_r31 = (Addr) restorer;
+ }
+ else
+ {
+ tst->arch.vex.guest_r31 = (Addr)&VG_(mips32_linux_SUBST_FOR_sigreturn);
+ }
+ }
+
+ priv->magicPI = 0x31415927;
+ priv->sigNo_private = sigNo;
+ priv->vex_shadow1 = tst->arch.vex_shadow1;
+ priv->vex_shadow2 = tst->arch.vex_shadow2;
+ /* Set the thread so it will next run the handler. */
+ /* tst->m_sp = sp; also notify the tool we've updated SP */
+ VG_TRACK( post_reg_write, Vg_CoreSignal, tid, VG_O_STACK_PTR, sizeof(Addr));
+ if (VG_(clo_trace_signals))
+ VG_(printf)("handler = %p\n", handler);
+ tst->arch.vex.guest_PC = (Addr) handler;
+ /* This thread needs to be marked runnable, but we leave that the
+ caller to do. */
+}
+
+/* EXPORTED */
+void VG_(sigframe_destroy)( ThreadId tid, Bool isRT )
+{
+ ThreadState *tst;
+ struct vg_sig_private *priv1;
+ Addr sp;
+ UInt frame_size;
+ struct vki_sigcontext *mc;
+ Int sigNo;
+ Bool has_siginfo = isRT;
+
+ vg_assert(VG_(is_valid_tid)(tid));
+ tst = VG_(get_ThreadState)(tid);
+ sp = tst->arch.vex.guest_r29;
+ if (has_siginfo)
+ {
+ struct rt_sigframe *frame = (struct rt_sigframe *)sp;
+ struct vki_ucontext *ucp = &frame->rs_uc;
+ frame_size = sizeof(*frame);
+ mc = &ucp->uc_mcontext;
+ priv1 = &frame->priv;
+ vg_assert(priv1->magicPI == 0x31415927);
+ sigNo = priv1->sigNo_private;
+ }
+ else
+ {
+ struct sigframe *frame = (struct sigframe *)sp;
+ frame_size = sizeof(*frame);
+ mc = &(frame->sf_sc);
+ priv1 = &frame->priv;
+ vg_assert(priv1->magicPI == 0x31415927);
+ tst->sig_mask = frame->sf_mask;
+ tst->tmp_sig_mask = tst->sig_mask;
+ sigNo = priv1->sigNo_private;
+ }
+ //restore regs
+ tst->arch.vex.guest_r1 = mc->sc_regs[1];
+ tst->arch.vex.guest_r2 = mc->sc_regs[2];
+ tst->arch.vex.guest_r3 = mc->sc_regs[3];
+ tst->arch.vex.guest_r4 = mc->sc_regs[4];
+ tst->arch.vex.guest_r5 = mc->sc_regs[5];
+ tst->arch.vex.guest_r6 = mc->sc_regs[6];
+ tst->arch.vex.guest_r7 = mc->sc_regs[7];
+ tst->arch.vex.guest_r8 = mc->sc_regs[8];
+ tst->arch.vex.guest_r9 = mc->sc_regs[9];
+ tst->arch.vex.guest_r10 = mc->sc_regs[10];
+ tst->arch.vex.guest_r11 = mc->sc_regs[11];
+ tst->arch.vex.guest_r12 = mc->sc_regs[12];
+ tst->arch.vex.guest_r13= mc->sc_regs[13];
+ tst->arch.vex.guest_r14 = mc->sc_regs[14];
+ tst->arch.vex.guest_r15 = mc->sc_regs[15];
+ tst->arch.vex.guest_r16 = mc->sc_regs[16];
+ tst->arch.vex.guest_r17 = mc->sc_regs[17];
+ tst->arch.vex.guest_r18 = mc->sc_regs[18];
+ tst->arch.vex.guest_r19 = mc->sc_regs[19];
+ tst->arch.vex.guest_r20 = mc->sc_regs[20];
+ tst->arch.vex.guest_r21 = mc->sc_regs[21];
+ tst->arch.vex.guest_r22 = mc->sc_regs[22];
+ tst->arch.vex.guest_r23 = mc->sc_regs[23];
+ tst->arch.vex.guest_r24 = mc->sc_regs[24];
+ tst->arch.vex.guest_r25 = mc->sc_regs[25];
+ tst->arch.vex.guest_r26 = mc->sc_regs[26];
+ tst->arch.vex.guest_r27 = mc->sc_regs[27];
+ tst->arch.vex.guest_r28 = mc->sc_regs[28];
+ tst->arch.vex.guest_r30 = mc->sc_regs[30];
+ tst->arch.vex.guest_PC = mc->sc_pc;
+ tst->arch.vex.guest_r31 = mc->sc_regs[31];
+ tst->arch.vex.guest_r29 = mc->sc_regs[29];
+
+ tst->arch.vex.guest_HI = mc->sc_mdhi;
+ tst->arch.vex.guest_LO = mc->sc_mdlo;
+ tst->arch.vex_shadow1 = priv1->vex_shadow1;
+ tst->arch.vex_shadow2 = priv1->vex_shadow2;
+
+ VG_TRACK(die_mem_stack_signal, sp, frame_size);
+ if (VG_(clo_trace_signals))
+ VG_(message)( Vg_DebugMsg,
+ "VG_(signal_return) (thread %d): isRT=%d valid magic; EIP=%#x\n",
+ tid, isRT, tst->arch.vex.guest_PC);
+ /* tell the tools */
+ VG_TRACK( post_deliver_signal, tid, sigNo );
+}
+
+#endif // defined(VGP_mips32_linux)
+
+/*--------------------------------------------------------------------*/
+/*--- end sigframe-mips32-linux.c ---*/
+/*--------------------------------------------------------------------*/
Added: trunk/coregrind/m_gdbserver/mips-cpu.xml (+46 -0)
===================================================================
--- trunk/coregrind/m_gdbserver/mips-cpu.xml 2012-06-07 10:13:21 +01:00 (rev 12616)
+++ trunk/coregrind/m_gdbserver/mips-cpu.xml 2012-06-07 10:23:23 +01:00 (rev 12617)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.mips.cpu">
+ <reg name="r0" bitsize="32" regnum="0"/>
+ <reg name="r1" bitsize="32"/>
+ <reg name="r2" bitsize="32"/>
+ <reg name="r3" bitsize="32"/>
+ <reg name="r4" bitsize="32"/>
+ <reg name="r5" bitsize="32"/>
+ <reg name="r6" bitsize="32"/>
+ <reg name="r7" bitsize="32"/>
+ <reg name="r8" bitsize="32"/>
+ <reg name="r9" bitsize="32"/>
+ <reg name="r10" bitsize="32"/>
+ <reg name="r11" bitsize="32"/>
+ <reg name="r12" bitsize="32"/>
+ <reg name="r13" bitsize="32"/>
+ <reg name="r14" bitsize="32"/>
+ <reg name="r15" bitsize="32"/>
+ <reg name="r16" bitsize="32"/>
+ <reg name="r17" bitsize="32"/>
+ <reg name="r18" bitsize="32"/>
+ <reg name="r19" bitsize="32"/>
+ <reg name="r20" bitsize="32"/>
+ <reg name="r21" bitsize="32"/>
+ <reg name="r22" bitsize="32"/>
+ <reg name="r23" bitsize="32"/>
+ <reg name="r24" bitsize="32"/>
+ <reg name="r25" bitsize="32"/>
+ <reg name="r26" bitsize="32"/>
+ <reg name="r27" bitsize="32"/>
+ <reg name="r28" bitsize="32"/>
+ <reg name="r29" bitsize="32"/>
+ <reg name="r30" bitsize="32"/>
+ <reg name="r31" bitsize="32"/>
+
+ <reg name="lo" bitsize="32" regnum="33"/>
+ <reg name="hi" bitsize="32" regnum="34"/>
+ <reg name="pc" bitsize="32" regnum="37"/>
+</feature>
Added: trunk/include/vki/vki-posixtypes-mips32-linux.h (+68 -0)
===================================================================
--- trunk/include/vki/vki-posixtypes-mips32-linux.h 2012-06-07 10:13:21 +01:00 (rev 12616)
+++ trunk/include/vki/vki-posixtypes-mips32-linux.h 2012-06-07 10:23:23 +01:00 (rev 12617)
@@ -0,0 +1,68 @@
+
+/*--------------------------------------------------------------------*/
+/*--- mips/Linux-specific kernel interface: posix types. ---*/
+/*--- vki-posixtypes-mips32-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2012 RT-RK
+ mip...@rt...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VKI_POSIXTYPES_MIPS32_LINUX_H
+#define __VKI_POSIXTYPES_MIPS32_LINUX_H
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/posix_types.h
+//----------------------------------------------------------------------
+
+typedef unsigned int __vki_kernel_mode_t;
+typedef long __vki_kernel_off_t;
+typedef int __vki_kernel_pid_t;
+typedef int __vki_kernel_ipc_pid_t;
+typedef unsigned int __vki_kernel_uid_t;
+typedef unsigned int __vki_kernel_gid_t;
+typedef unsigned int __vki_kernel_size_t;
+typedef long __vki_kernel_time_t;
+typedef long __vki_kernel_suseconds_t;
+typedef long __vki_kernel_clock_t;
+typedef int __vki_kernel_timer_t;
+typedef int __vki_kernel_clockid_t;
+typedef char * __vki_kernel_caddr_t;
+typedef unsigned int __vki_kernel_uid32_t;
+typedef unsigned int __vki_kernel_gid32_t;
+
+typedef unsigned int __vki_kernel_old_uid_t;
+typedef unsigned int __vki_kernel_old_gid_t;
+
+typedef long long __vki_kernel_loff_t;
+
+typedef struct {
+ int val[2];
+} __vki_kernel_fsid_t;
+
+#endif // __VKI_POSIXTYPES_MIPS32_LINUX_H
+
+/*--------------------------------------------------------------------*/
+/*--- end vki-posixtypes-mips32-linux.h ---*/
+/*--------------------------------------------------------------------*/
Added: trunk/include/vki/vki-mips32-linux.h (+973 -0)
===================================================================
--- trunk/include/vki/vki-mips32-linux.h 2012-06-07 10:13:21 +01:00 (rev 12616)
+++ trunk/include/vki/vki-mips32-linux.h 2012-06-07 10:23:23 +01:00 (rev 12617)
@@ -0,0 +1,973 @@
+
+/*--------------------------------------------------------------------*/
+/*--- mips/Linux-specific kernel interface. vki-mips32-linux.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2012 RT-RK
+ mip...@rt...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VKI_MIPS32_LINUX_H
+#define __VKI_MIPS32_LINUX_H
+
+#include <config.h>
+
+// mips endian
+#if defined (_MIPSEL)
+#define VKI_LITTLE_ENDIAN 1
+#elif defined (_MIPSEB)
+#define VKI_BIG_ENDIAN 1
+#endif
+
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-generic/int-ll64.h
+//----------------------------------------------------------------------
+
+typedef __signed__ char __vki_s8;
+typedef unsigned char __vki_u8;
+
+typedef __signed__ short __vki_s16;
+typedef unsigned short __vki_u16;
+
+typedef __signed__ int __vki_s32;
+typedef unsigned int __vki_u32;
+
+typedef __signed char vki_s8;
+typedef unsigned char vki_u8;
+
+typedef __signed short vki_s16;
+typedef unsigned short vki_u16;
+
+typedef __signed int vki_s32;
+typedef unsigned int vki_u32;
+
+typedef __signed__ long long __vki_s64;
+typedef unsigned long long __vki_u64;
+
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/page.h
+//----------------------------------------------------------------------
+
+/* PAGE_SHIFT determines the page size */
+#define VKI_PAGE_SHIFT MIPS_PAGE_SHIFT
+#define VKI_PAGE_SIZE (1UL << VKI_PAGE_SHIFT)
+#define VKI_PAGE_MASK (~(VKI_PAGE_SIZE-1))
+#define VKI_MAX_PAGE_SHIFT VKI_PAGE_SHIFT
+#define VKI_MAX_PAGE_SIZE VKI_PAGE_SIZE
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/arch/mips/include/asm-generic/shmparam.h
+//----------------------------------------------------------------------
+
+#define VKI_SHMLBA SHM_ALIGNMENT
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm/signal.h
+//----------------------------------------------------------------------
+
+#define VKI_MINSIGSTKSZ 2048
+
+#define VKI_SIG_BLOCK 1 /* for blocking signals */
+#define VKI_SIG_UNBLOCK 2 /* for unblocking signals */
+#define VKI_SIG_SETMASK 3 /* for setting the signal mask */
+
+/* Type of a signal handler. */
+typedef void (*__vki_signalfn_t)(int);
+typedef __vki_signalfn_t __user *__vki_sighandler_t;
+
+typedef void __vki_restorefn_t(void);
+typedef __vki_restorefn_t __user *__vki_sigrestore_t;
+
+/* Fake signal functions */
+#define VKI_SIG_DFL ((__vki_signalfn_t)0) /* default signal handling */
+#define VKI_SIG_IGN ((__vki_signalfn_t)1) /* ignore signal */
+#define VKI_SIG_ERR ((__vki_signalfn_t)-1) /* error return from signal */
+
+#define _VKI_NSIG 128
+#define _VKI_NSIG_BPW 32
+#define _VKI_NSIG_WORDS (_VKI_NSIG / _VKI_NSIG_BPW)
+
+typedef unsigned long vki_old_sigset_t; /* at least 32 bits */
+
+typedef struct {
+ unsigned long sig[_VKI_NSIG_WORDS];
+} vki_sigset_t;
+
+#define VKI_SIGHUP 1 /* Hangup (POSIX). */
+#define VKI_SIGINT 2 /* Interrupt (ANSI). */
+#define VKI_SIGQUIT 3 /* Quit (POSIX). */
+#define VKI_SIGILL 4 /* Illegal instruction (ANSI). */
+#define VKI_SIGTRAP 5 /* Trace trap (POSIX). */
+#define VKI_SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define VKI_SIGABRT VKI_SIGIOT /* Abort (ANSI). */
+#define VKI_SIGEMT 7
+#define VKI_SIGFPE 8 /* Floating-point exception (ANSI). */
+#define VKI_SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define VKI_SIGBUS 10 /* BUS error (4.2 BSD). */
+#define VKI_SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define VKI_SIGSYS 12
+#define VKI_SIGPIPE 13 /* Broken pipe (POSIX). */
+#define VKI_SIGALRM 14 /* Alarm clock (POSIX). */
+#define VKI_SIGTERM 15 /* Termination (ANSI). */
+#define VKI_SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define VKI_SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define VKI_SIGCHLD 18 /* Child status has changed (POSIX). */
+#define VKI_SIGCLD VKI_SIGCHLD /* Same as SIGCHLD (System V). */
+#define VKI_SIGPWR 19 /* Power failure restart (System V). */
+#define VKI_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+#define VKI_SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
+#define VKI_SIGIO 22 /* I/O now possible (4.2 BSD). */
+#define VKI_SIGPOLL VKI_SIGIO /* Pollable event occurred (System V). */
+#define VKI_SIGSTOP 23 /* Stop, unblockable (POSIX). */
+#define VKI_SIGTSTP 24 /* Keyboard stop (POSIX). */
+#define VKI_SIGCONT 25 /* Continue (POSIX). */
+#define VKI_SIGTTIN 26 /* Background read from tty (POSIX). */
+#define VKI_SIGTTOU 27 /* Background write to tty (POSIX). */
+#define VKI_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
+#define VKI_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
+#define VKI_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
+#define VKI_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
+
+/* These should not be considered constants from userland. */
+#define VKI_SIGRTMIN 32
+// [[This was (_NSIG-1) in 2.4.X... not sure if it matters.]]
+#define VKI_SIGRTMAX _VKI_NSIG
+
+#define VKI_SA_ONSTACK 0x08000000
+#define VKI_SA_RESETHAND 0x80000000
+#define VKI_SA_RESTART 0x10000000
+#define VKI_SA_SIGINFO 0x00000008
+#define VKI_SA_NODEFER 0x40000000
+#define VKI_SA_NOCLDWAIT 0x00010000
+#define VKI_SA_NOCLDSTOP 0x00000001
+
+#define VKI_SA_NOMASK VKI_SA_NODEFER
+#define VKI_SA_ONESHOT VKI_SA_RESETHAND
+//#define VKI_SA_INTERRUPT 0x20000000 /* dummy -- ignored */
+
+#define VKI_SA_RESTORER 0x04000000
+
+#define VKI_SS_ONSTACK 1
+#define VKI_SS_DISABLE 2
+
+struct vki_old_sigaction {
+ // [[Nb: a 'k' prefix is added to "sa_handler" because
+ // bits/sigaction.h (which gets dragged in somehow via signal.h)
+ // #defines it as something else. Since that is done for glibc's
+ // purposes, which we don't care about here, we use our own name.]]
+ unsigned long sa_flags;
+ __vki_sighandler_t ksa_handler;
+ vki_old_sigset_t sa_mask;
+ __vki_sigrestore_t sa_restorer;
+};
+
+struct vki_sigaction {
+ unsigned int sa_flags;
+ __vki_sighandler_t sa_handler;
+ vki_sigset_t sa_mask;
+};
+
+
+struct vki_sigaction_base {
+ // [[See comment about extra 'k' above]]
+ unsigned long sa_flags;
+ __vki_sighandler_t ksa_handler;
+
+ vki_sigset_t sa_mask; /* mask last for extensibility */
+ __vki_sigrestore_t sa_restorer;
+};
+
+/* On Linux we use the same type for passing sigactions to
+ and from the kernel. Hence: */
+typedef struct vki_sigaction_base vki_sigaction_toK_t;
+typedef struct vki_sigaction_base vki_sigaction_fromK_t;
+
+typedef struct vki_sigaltstack {
+ void __user *ss_sp;
+ vki_size_t ss_size;
+ int ss_flags;
+
+} vki_stack_t;
+
+
+//----------------------------------------------------------------------
+// From 2.6.35.5/include/asm-mips/sigcontext.h
+//----------------------------------------------------------------------
+
+struct _vki_fpreg {
+ unsigned short significand[4];
+ unsigned short exponent;
+};
+
+struct _vki_fpxreg {
+ unsigned short significand[4];
+ unsigned short exponent;
+ unsigned short padding[3];
+};
+
+struct _vki_xmmreg {
+ unsigned long element[4];
+};
+
+struct _vki_fpstate {
+ /* Regular FPU environment */
+ unsigned long cw;
+ unsigned long sw;
+ unsigned long tag;
+ unsigned long ipoff;
+ unsigned long cssel;
+ unsigned long dataoff;
+ unsigned long datasel;
+ struct _vki_fpreg _st[8];
+ unsigned short status;
+ unsigned short magic; /* 0xffff = regular FPU data only */
+
+ /* FXSR FPU environment */
+ unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */
+ unsigned long mxcsr;
+ unsigned long reserved;
+ struct _vki_fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */
+ struct _vki_xmmreg _xmm[8];
+ unsigned long padding[56];
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/sigcontext.h
+//----------------------------------------------------------------------
+
+struct vki_sigcontext {
+ unsigned int sc_regmask; /* Unused */
+ unsigned int sc_status; /* Unused */
+ unsigned long long sc_pc;
+ unsigned long long sc_regs[32];
+ unsigned long long sc_fpregs[32];
+ unsigned int sc_acx; /* Was sc_ownedfp */
+ unsigned int sc_fpc_csr;
+ unsigned int sc_fpc_eir; /* Unused */
+ unsigned int sc_used_math;
+ unsigned int sc_dsp; /* dsp status, was sc_ssflags */
+ unsigned long long sc_mdhi;
+ unsigned long long sc_mdlo;
+ unsigned long sc_hi1; /* Was sc_cause */
+ unsigned long sc_lo1; /* Was sc_badvaddr */
+ unsigned long sc_hi2; /* Was sc_sigset[4] */
+ unsigned long sc_lo2;
+ unsigned long sc_hi3;
+ unsigned long sc_lo3;
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/mman.h
+//----------------------------------------------------------------------
+
+#define VKI_PROT_NONE 0x0 /* No page permissions */
+#define VKI_PROT_READ 0x1 /* page can be read */
+#define VKI_PROT_WRITE 0x2 /* page can be written */
+#define VKI_PROT_EXEC 0x4 /* page can be executed */
+#define VKI_PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
+#define VKI_PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
+
+#define VKI_MAP_SHARED 0x001 /* Share changes */
+#define VKI_MAP_PRIVATE 0x002 /* Changes are private */
+#define VKI_MAP_FIXED 0x010 /* Interpret addr exactly */
+
+#define VKI_MAP_NORESERVE 0x0400 /* don't reserve swap pages */
+
+/* These are linux-specific */
+#define VKI_MAP_NORESERVE 0x0400 /* don't check for reservations */
+#define VKI_MAP_ANONYMOUS 0x0800 /* don't use a file */
+#define VKI_MAP_GROWSDOWN 0x1000 /* stack-like segment */
+#define VKI_MAP_DENYWRITE 0x2000 /* ETXTBSY */
+#define VKI_MAP_EXECUTABLE 0x4000 /* mark it as an executable */
+#define VKI_MAP_LOCKED 0x8000 /* pages are locked */
+#define VKI_MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
+#define VKI_MAP_NONBLOCK 0x20000 /* do not block on IO */
+
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/fcntl.h
+//----------------------------------------------------------------------
+
+#define VKI_O_RDONLY 00
+#define VKI_O_WRONLY 01
+#define VKI_O_RDWR 02
+
+#define VKI_O_CREAT 0x0100 /* not fcntl */
+#define VKI_O_EXCL 0x0400 /* not fcntl */
+
+#define VKI_O_TRUNC 0x0200 /* not fcntl */
+
+#define VKI_O_APPEND 0x0008
+#define VKI_O_NONBLOCK 0x0080
+#define VKI_O_LARGEFILE 0x2000
+
+#define VKI_AT_FDCWD -100
+
+#define VKI_F_DUPFD 0 /* dup */
+#define VKI_F_GETFD 1 /* get close_on_exec */
+#define VKI_F_SETFD 2 /* set/clear close_on_exec */
+#define VKI_F_GETFL 3 /* get file->f_flags */
+#define VKI_F_SETFL 4 /* set file->f_flags */
+
+#define VKI_F_GETLK 14
+#define VKI_F_SETLK 6
+#define VKI_F_SETLKW 7
+
+#define VKI_F_SETOWN 24 /* for sockets. */
+#define VKI_F_GETOWN 23 /* for sockets. */
+#define VKI_F_SETSIG 10 /* for sockets. */
+#define VKI_F_GETSIG 11 /* for sockets. */
+
+#define VKI_F_SETOWN_EX 15
+#define VKI_F_GETOWN_EX 16
+
+#define VKI_F_GETLK64 33 /* using 'struct flock64' */
+#define VKI_F_SETLK64 34
+#define VKI_F_SETLKW64 35
+
+/* for F_[GET|SET]FL */
+#define VKI_FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+#define VKI_F_LINUX_SPECIFIC_BASE 1024
+
+struct vki_f_owner_ex {
+ int type;
+ __vki_kernel_pid_t pid;
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/resource.h
+//----------------------------------------------------------------------
+
+#define VKI_RLIMIT_DATA 2 /* max data size */
+#define VKI_RLIMIT_STACK 3 /* max stack size */
+#define VKI_RLIMIT_CORE 4 /* max core file size */
+#define VKI_RLIMIT_NOFILE 5 /* max number of open files */
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/socket.h
+//----------------------------------------------------------------------
+
+#define VKI_SOL_SOCKET 0xffff
+#define VKI_SO_TYPE 0x1008
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-i386/sockios.h
+//----------------------------------------------------------------------
+
+#define VKI_SIOCSPGRP 0x8902
+#define VKI_SIOCGPGRP 0x8904
+#define VKI_SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
+#define VKI_SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/stat.h
+//----------------------------------------------------------------------
+
+struct vki_stat {
+ unsigned st_dev;
+ long st_pad1[3]; /* Reserved for network id */
+ unsigned long st_ino;
+ unsigned int st_mode;
+ unsigned long st_nlink;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned st_rdev;
+ long st_pad2[2];
+ long st_size;
+ long st_pad3;
+ /*
+ * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
+ * but we don't have it under Linux.
+ */
+ long st_atime;
+ long st_atime_nsec;
+ long st_mtime;
+ long st_mtime_nsec;
+ long st_ctime;
+ long st_ctime_nsec;
+ long st_blksize;
+ long st_blocks;
+ long st_pad4[14];
+};
+
+/*
+ * This matches struct stat64 in glibc2.1, hence the absolutely insane
+ * amounts of padding around dev_t's. The memory layout is the same as of
+ * struct stat of the 64-bit kernel.
+ */
+
+struct vki_stat64 {
+ unsigned long st_dev;
+ unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
+
+ unsigned long long st_ino;
+
+ unsigned int st_mode;
+ unsigned long st_nlink;
+
+ unsigned int st_uid;
+ unsigned int st_gid;
+
+ unsigned long st_rdev;
+ unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
+
+ long long st_size;
+
+ /*
+ * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
+ * but we don't have it under Linux.
+ */
+ long st_atime;
+ unsigned long st_atime_nsec; /* Reserved for st_atime expansion */
+
+ long st_mtime;
+ unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */
+
+ long st_ctime;
+ unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */
+
+ unsigned long st_blksize;
+ unsigned long st_pad2;
+
+ long long st_blocks;
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/statfs.h
+//----------------------------------------------------------------------
+
+struct vki_statfs {
+ long f_type;
+ long f_bsize;
+ long f_frsize; /* Fragment size - unsupported */
+ long f_blocks;
+ long f_bfree;
+ long f_files;
+ long f_ffree;
+ long f_bavail;
+
+ /* Linux specials */
+ __vki_kernel_fsid_t f_fsid;
+ long f_namelen;
+ long f_spare[6];
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/termios.h
+//----------------------------------------------------------------------
+
+struct vki_winsize {
+ unsigned short ws_row;
+ unsigned short ws_col;
+ unsigned short ws_xpixel;
+ unsigned short ws_ypixel;
+};
+
+#define NCC 8
+#define NCCS 23
+struct vki_termio {
+ unsigned short c_iflag; /* input mode flags */
+ unsigned short c_oflag; /* output mode flags */
+ unsigned short c_cflag; /* control mode flags */
+ unsigned short c_lflag; /* local mode flags */
+ char c_line; /* line discipline */
+ unsigned char c_cc[NCCS]; /* control characters */
+};
+
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/termbits.h
+//----------------------------------------------------------------------
+
+typedef unsigned char vki_cc_t;
+typedef unsigned long vki_speed_t;
+typedef unsigned long vki_tcflag_t;
+
+struct vki_termios {
+ vki_tcflag_t c_iflag; /* input mode flags */
+ vki_tcflag_t c_oflag; /* output mode flags */
+ vki_tcflag_t c_cflag; /* control mode flags */
+ vki_tcflag_t c_lflag; /* local mode flags */
+ vki_cc_t c_line; /* line discipline */
+ vki_cc_t c_cc[NCCS]; /* control characters */
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/ioctl.h
+//----------------------------------------------------------------------
+
+#define _VKI_IOC_NRBITS 8
+#define _VKI_IOC_TYPEBITS 8
+#define _VKI_IOC_SIZEBITS 14
+#define _VKI_IOC_DIRBITS 2
+
+#define _VKI_IOC_NRMASK ((1 << _VKI_IOC_NRBITS)-1)
+#define _VKI_IOC_TYPEMASK ((1 << _VKI_IOC_TYPEBITS)-1)
+#define _VKI_IOC_SIZEMASK ((1 << _VKI_IOC_SIZEBITS)-1)
+#define _VKI_IOC_DIRMASK ((1 << _VKI_IOC_DIRBITS)-1)
+
+#define _VKI_IOC_NRSHIFT 0
+#define _VKI_IOC_TYPESHIFT (_VKI_IOC_NRSHIFT+_VKI_IOC_NRBITS)
+#define _VKI_IOC_SIZESHIFT (_VKI_IOC_TYPESHIFT+_VKI_IOC_TYPEBITS)
+#define _VKI_IOC_DIRSHIFT (_VKI_IOC_SIZESHIFT+_VKI_IOC_SIZEBITS)
+
+#define _VKI_IOC_NONE 1U
+#define _VKI_IOC_WRITE 2U
+#define _VKI_IOC_READ 4U
+
+#define _VKI_IOC(dir,type,nr,size) \
+ (((dir) << _VKI_IOC_DIRSHIFT) | \
+ ((type) << _VKI_IOC_TYPESHIFT) | \
+ ((nr) << _VKI_IOC_NRSHIFT) | \
+ ((size) << _VKI_IOC_SIZESHIFT))
+
+/* provoke compile error for invalid uses of size argument */
+extern unsigned int __VKI_invalid_size_argument_for_IOC;
+/* used to create numbers */
+#define _VKI_IO(type,nr) _VKI_IOC(_VKI_IOC_NONE,(type),(nr),0)
+#define _VKI_IOR(type,nr,size) _VKI_IOC(_VKI_IOC_READ,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
+#define _VKI_IOW(type,nr,size) _VKI_IOC(_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
+#define _VKI_IOWR(type,nr,size) _VKI_IOC(_VKI_IOC_READ|_VKI_IOC_WRITE,(type),(nr),(_VKI_IOC_TYPECHECK(size)))
+
+/* used to decode ioctl numbers.. */
+#define _VKI_IOC_DIR(nr) (((nr) >> _VKI_IOC_DIRSHIFT) & _VKI_IOC_DIRMASK)
+#define _VKI_IOC_TYPE(nr) (((nr) >> _VKI_IOC_TYPESHIFT) & _VKI_IOC_TYPEMASK)
+#define _VKI_IOC_NR(nr) (((nr) >> _VKI_IOC_NRSHIFT) & _VKI_IOC_NRMASK)
+#define _VKI_IOC_SIZE(nr) (((nr) >> _VKI_IOC_SIZESHIFT) & _VKI_IOC_SIZEMASK)
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/ioctls.h
+//----------------------------------------------------------------------
+
+#define VKI_TCGETA 0x5401
+#define VKI_TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
+#define VKI_TCSETAW 0x5403
+#define VKI_TCSETAF 0x5404
+
+#define VKI_TCSBRK 0x5405
+#define VKI_TCXONC 0x5406
+#define VKI_TCFLSH 0x5407
+
+#define VKI_TCGETS 0x540d
+#define VKI_TCSETS 0x540e
+#define VKI_TCSETSW 0x540f
+#define VKI_TCSETSF 0x5410
+
+#define VKI_TIOCEXCL 0x740d /* set exclusive use of tty */
+#define VKI_TIOCNXCL 0x740e /* reset exclusive use of tty */
+#define VKI_TIOCOUTQ 0x7472 /* output queue size */
+#define VKI_TIOCSTI 0x5472 /* simulate terminal input */
+#define VKI_TIOCMGET 0x741d /* get all modem bits */
+#define VKI_TIOCMBIS 0x741b /* bis modem bits */
+#define VKI_TIOCMBIC 0x741c /* bic modem bits */
+#define VKI_TIOCMSET 0x741a /* set all modem bits */
+#define VKI_TIOCPKT 0x5470 /* pty: set/clear packet mode */
+#define VKI_TIOCPKT_DATA 0x00 /* data packet */
+#define VKI_TIOCPKT_FLUSHREAD 0x01 /* flush packet */
+#define VKI_TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
+#define VKI_TIOCPKT_STOP 0x04 /* stop output */
+#define VKI_TIOCPKT_START 0x08 /* start output */
+#define VKI_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
+#define VKI_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
+/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */
+#define VKI_TIOCSWINSZ _VKI_IOW('t', 103, struct vki_winsize) /* set window size */
+#define VKI_TIOCGWINSZ _VKI_IOR('t', 104, struct vki_winsize) /* get window size */
+#define VKI_TIOCNOTTY 0x5471 /* void tty association */
+#define VKI_TIOCSETD 0x7401
+#define VKI_TIOCGETD 0x7400
+
+#define VKI_FIOCLEX 0x6601
+#define VKI_FIONCLEX 0x6602
+#define VKI_FIOASYNC 0x667d
+#define VKI_FIONBIO 0x667e
+#define VKI_FIOQSIZE 0x667f
+
+#define VKI_TIOCGLTC 0x7474 /* get special local chars */
+#define VKI_TIOCSLTC 0x7475 /* set special local chars */
+#define VKI_TIOCSPGRP _VKI_IOW('t', 118, int) /* set pgrp of tty */
+#define VKI_TIOCGPGRP _VKI_IOR('t', 119, int) /* get pgrp of tty */
+#define VKI_TIOCCONS _VKI_IOW('t', 120, int) /* become virtual console */
+
+#define VKI_FIONREAD 0x467f
+#define VKI_TIOCINQ FIONREAD
+
+#define VKI_TIOCGETP 0x7408
+#define VKI_TIOCSETP 0x7409
+#define VKI_TIOCSETN 0x740a /* TIOCSETP wo flush */
+
+#define VKI_TIOCSBRK 0x5427 /* BSD compatibility */
+#define VKI_TIOCCBRK 0x5428 /* BSD compatibility */
+#define VKI_TIOCGSID 0x7416 /* Return the session ID of FD */
+#define VKI_TIOCGPTN _VKI_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+#define VKI_TIOCSPTLCK _VKI_IOW('T',0x31, int) /* Lock/unlock Pty */
+
+/* I hope the range from 0x5480 on is free ... */
+#define VKI_TIOCSCTTY 0x5480 /* become controlling tty */
+#define VKI_TIOCGSOFTCAR 0x5481
+#define VKI_TIOCSSOFTCAR 0x5482
+#define VKI_TIOCLINUX 0x5483
+#define VKI_TIOCGSERIAL 0x5484
+#define VKI_TIOCSSERIAL 0x5485
+#define VKI_TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */
+#define VKI_TIOCSERCONFIG 0x5488
+#define VKI_TIOCSERGWILD 0x5489
+#define VKI_TIOCSERSWILD 0x548a
+#define VKI_TIOCGLCKTRMIOS 0x548b
+#define VKI_TIOCSLCKTRMIOS 0x548c
+#define VKI_TIOCSERGSTRUCT 0x548d /* For debugging only */
+#define VKI_TIOCSERGETLSR 0x548e /* Get line status register */
+#define VKI_TIOCSERGETMULTI 0x548f /* Get multiport config */
+#define VKI_TIOCSERSETMULTI 0x5490 /* Set multiport config */
+#define VKI_TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */
+#define VKI_TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */
+#define VKI_TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */
+#define VKI_TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */
+
+//----------------------------------------------------------------------
+// From asm-generic/poll.h
+//----------------------------------------------------------------------
+
+/* These are specified by iBCS2 */
+#define VKI_POLLIN 0x0001
+
+struct vki_pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/elf.h
+//----------------------------------------------------------------------
+
+#define VKI_ELF_NGREG 45 /* includes nip, msr, lr, etc. */
+#define VKI_ELF_NFPREG 33 /* includes fpscr */
+
+typedef unsigned long vki_elf_greg_t;
+typedef vki_elf_greg_t vki_elf_gregset_t[VKI_ELF_NGREG];
+
+typedef double vki_elf_fpreg_t;
+typedef vki_elf_fpreg_t vki_elf_fpregset_t[VKI_ELF_NFPREG];
+
+typedef struct vki_user_fxsr_struct vki_elf_fpxregset_t;
+
+#define VKI_AT_SYSINFO 32
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/ucontext.h
+//----------------------------------------------------------------------
+
+struct vki_ucontext {
+ unsigned long uc_flags;
+ struct vki_ucontext *uc_link;
+ vki_stack_t uc_stack;
+ struct vki_sigcontext uc_mcontext;
+ vki_sigset_t uc_sigmask; /* mask last for extensibility */
+};
+
+// CAB: TODO
+typedef void vki_modify_ldt_t;
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/ipcbuf.h
+//----------------------------------------------------------------------
+
+struct vki_ipc64_perm
+{
+ __vki_kernel_key_t key;
+ __vki_kernel_uid_t uid;
+ __vki_kernel_gid_t gid;
+ __vki_kernel_uid_t cuid;
+ __vki_kernel_gid_t cgid;
+ __vki_kernel_mode_t mode;
+ unsigned short seq;
+ unsigned short __pad1;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/sembuf.h
+//----------------------------------------------------------------------
+
+struct vki_semid64_ds {
+ struct vki_ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __vki_kernel_time_t sem_otime; /* last semop time */
+ __vki_kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/msgbuf.h
+//----------------------------------------------------------------------
+
+struct vki_msqid64_ds {
+ struct vki_ipc64_perm msg_perm;
+ __vki_kernel_time_t msg_stime; /* last msgsnd time */
+ unsigned long __unused1;
+ __vki_kernel_time_t msg_rtime; /* last msgrcv time */
+ unsigned long __unused2;
+ __vki_kernel_time_t msg_ctime; /* last change time */
+ unsigned long __unused3;
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __vki_kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __vki_kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/ipc.h
+//----------------------------------------------------------------------
+
+struct vki_ipc_kludge {
+ struct vki_msgbuf __user *msgp;
+ long msgtyp;
+};
+
+#define VKI_SEMOP 1
+#define VKI_SEMGET 2
+#define VKI_SEMCTL 3
+#define VKI_SEMTIMEDOP 4
+#define VKI_MSGSND 11
+#define VKI_MSGRCV 12
+#define VKI_MSGGET 13
+#define VKI_MSGCTL 14
+#define VKI_SHMAT 21
+#define VKI_SHMDT 22
+#define VKI_SHMGET 23
+#define VKI_SHMCTL 24
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/shmbuf.h
+//----------------------------------------------------------------------
+
+struct vki_shmid64_ds {
+ struct vki_ipc64_perm shm_perm; /* operation perms */
+ vki_size_t shm_segsz; /* size of segment (bytes) */
+ __vki_kernel_time_t shm_atime; /* last attach time */
+ __vki_kernel_time_t shm_dtime; /* last detach time */
+ __vki_kernel_time_t shm_ctime; /* last change time */
+ __vki_kernel_pid_t shm_cpid; /* pid of creator */
+ __vki_kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct vki_shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-mips/ptrace.h
+//----------------------------------------------------------------------
+
+struct vki_pt_regs {
+#ifdef CONFIG_32BIT
+ /* Pad bytes for argument save space on the stack. */
+ unsigned long pad0[6];
+#endif
+ /* Saved main processor registers. */
+ unsigned long regs[32];
+
+ /* Saved special registers. */
+ unsigned long cp0_status;
+ unsigned long hi;
+ unsigned long lo;
+#ifdef CONFIG_CPU_HAS_SMARTMIPS
+ unsigned long acx;
+#endif
+ unsigned long cp0_badvaddr;
+ unsigned long cp0_cause;
+ unsigned long cp0_epc;
+#ifdef CONFIG_MIPS_MT_SMTC
+ unsigned long cp0_tcstatus;
+#endif /* CONFIG_MIPS_MT_SMTC */
+#ifdef CONFIG_CPU_CAVIUM_OCTEON
+ unsigned long long mpl[3]; /* MTM{0,1,2} */
+ unsigned long long mtp[3]; /* MTP{0,1,2} */
+#endif
+} __attribute__ ((aligned (8)));
+
+
+#define vki_user_regs_struct vki_pt_regs
+
+#define MIPS_lo lo
+#define MIPS_hi hi
+//#define MIPS_pc regs[32]
+#define MIPS_r31 regs[31]
+#define MIPS_r30 regs[30]
+#define MIPS_r29 regs[29]
+#define MIPS_r28 regs[28]
+#define MIPS_r27 regs[27]
+#define MIPS_r26 regs[26]
+#define MIPS_r25 regs[25]
+#define MIPS_r24 regs[24]
+#define MIPS_r23 regs[23]
+#define MIPS_r22 regs[22]
+#define MIPS_r21 regs[21]
+#define MIPS_r20 regs[20]
+#define MIPS_r19 regs[19]
+#define MIPS_r18 regs[18]
+#define MIPS_r17 regs[17]
+#define MIPS_r16 regs[16]
+#define MIPS_r15 regs[15]
+#define MIPS_r14 regs[14]
+#define MIPS_r13 regs[13]
+#define MIPS_r12 regs[12]
+#define MIPS_r11 regs[11]
+#define MIPS_r10 regs[10]
+#define MIPS_r9 regs[9]
+#define MIPS_r8 regs[8]
+#define MIPS_r7 regs[7]
+#define MIPS_r6 regs[6]
+#define MIPS_r5 regs[5]
+#define MIPS_r4 regs[4]
+#define MIPS_r3 regs[3]
+#define MIPS_r2 regs[2]
+#define MIPS_r1 regs[1]
+#define MIPS_r0 regs[0]
+
+#define VKI_PTRACE_GETREGS 12
+#define VKI_PTRACE_SETREGS 13
+#define VKI_PTRACE_GETFPREGS 14
+#define VKI_PTRACE_SETFPREGS 15
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm-generic/siginfo.h
+//----------------------------------------------------------------------
+#define HAVE_ARCH_SIGINFO_T
+
+typedef union vki_sigval {
+ int sival_int;
+ void __user *sival_ptr;
+} vki_sigval_t;
+
+#ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
+#define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
+#endif
+
+#define VKI_SI_MAX_SIZE 128
+
+#ifndef VKI_SI_PAD_SIZE
+#define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE - __VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+#endif
+
+#ifndef __VKI_ARCH_SI_UID_T
+#define __VKI_ARCH_SI_UID_T vki_uid_t
+#endif
+
+#ifndef __VKI_ARCH_SI_BAND_T
+#define __VKI_ARCH_SI_BAND_T long
+#endif
+
+typedef struct vki_siginfo {
+ int si_signo;
+ int si_code;
+ int si_errno;
+ int __pad0[VKI_SI_MAX_SIZE / sizeof(int) - VKI_SI_PAD_SIZE - 3];
+
+ union {
+ int _pad[VKI_SI_PAD_SIZE];
+
+ /* kill() */
+ struct {
+ vki_pid_t _pid; /* sender's pid */
+ __VKI_ARCH_SI_UID_T _uid; /* sender's uid */
+ } _kill;
+
+ /* POSIX.1b timers */
+ struct {
+ vki_timer_t _tid; /* timer id */
+ int _overrun; /* overrun count */
+ char _pad[sizeof( __VKI_ARCH_SI_UID_T) - sizeof(int)];
+ vki_sigval_t _sigval; /* same as below */
+ int _sys_private; /* not to be passed to user */
+ } _timer;
+
+ /* POSIX.1b signals */
+ struct {
+ vki_pid_t _pid; /* sender's pid */
+ __VKI_ARCH_SI_UID_T _uid; /* sender's uid */
+ vki_sigval_t _sigval;
+ } _rt;
+
+ /* SIGCHLD */
+ struct {
+ vki_pid_t _pid; /* which child */
+ __VKI_ARCH_SI_UID_T _uid; /* sender's uid */
+ int _status; /* exit code */
+ vki_clock_t _utime;
+ vki_clock_t _stime;
+ } _sigchld;
+
+ /* IRIX SIGCHLD */
+ struct {
+ vki_pid_t _pid; /* which child */
+ vki_clock_t _utime;
+ int _status; /* exit code */
+ vki_clock_t _stime;
+ } _irix_sigchld;
+
+ /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
+ struct {
+ void __user *_addr; /* faulting insn/memory ref. */
+#ifdef __ARCH_SI_TRAPNO
+ int _trapno; /* TRAP # which caused the signal */
+#endif
+ } _sigfault;
+
+ /* SIGPOLL, SIGXFSZ (To do ...) */
+ struct {
+ __VKI_ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
+ int _fd;
+ } _sigpoll;
+ } _sifields;
+} vki_siginfo_t;
+
+//----------------------------------------------------------------------
+// From linux-2.6.35.5/include/asm/break.h
+//----------------------------------------------------------------------
+#define VKI_BRK_OVERFLOW 6 /* Overflow check */
+#define VKI_BRK_DIVZERO 7 /* Divide by zero check */
+
+#endif // __VKI_MIPS32_LINUX_H
+
+
+/*--------------------------------------------------------------------*/
+/*--- end vki-mips32-linux.h ---*/
+/*--------------------------------------------------------------------*/
Added: trunk/coregrind/m_syswrap/syscall-mips32-linux.S (+215 -0)
===================================================================
--- trunk/coregrind/m_syswrap/syscall-mips32-linux.S 2012-06-07 10:13:21 +01:00 (rev 12616)
+++ trunk/coregrind/m_syswrap/syscall-mips32-linux.S 2012-06-07 10:23:23 +01:00 (rev 12617)
@@ -0,0 +1,215 @@
+
+/*--------------------------------------------------------------------*/
+/*--- Support for doing system calls. syscall-mips32-linux.S ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2012 RT-RK
+ mip...@rt...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#if defined(VGP_mips32_linux)
+
+#include "pub_core_basics_asm.h"
+#include "pub_core_vkiscnums_asm.h"
+#include "libvex_guest_offsets.h"
+
+
+/*----------------------------------------------------------------*/
+/*
+ Perform a syscall for the client. This will run a syscall
+ with the client's specific per-thread signal mask.
+
+ The structure of this function is such that, if the syscall is
+ interrupted by a signal, we can determine exactly what
+ execution state we were in with respect to the execution of
+ the syscall by examining the value of IP in the signal
+ handler. This means that we can always do the appropriate
+ thing to precisely emulate the kernel's signal/syscall
+ interactions.
+
+ The syscall number is taken from the argument, even though it
+ should also be in regs->v0. The syscall result is written
+ back to regs->v0 on completion.
+
+ Returns 0 if the syscall was successfully called (even if the
+ syscall itself failed), or a nonzero error code in the lowest
+ 8 bits if one of the sigprocmasks failed (there's no way to
+ determine which one failed). And there's no obvious way to
+ recover from that either, but nevertheless we want to know.
+
+ VG_(fixup_guest_state_after_syscall_interrupted) does the
+ thread state fixup in the case where we were interrupted by a
+ signal.
+
+ Prototype:
+
+ UWord ML_(do_syscall_for_client_WRK)(
+ Int syscallno, // $4 - a0
+ void* guest_state, // $5 - a1
+ const vki_sigset_t *sysmask, // $6 - a2
+ const vki_sigset_t *postmask, // $7 - a3
+ Int nsigwords) // stack
+*/
+/* from vki_arch.h */
+#define VKI_SIG_SETMASK 3
+
+.globl ML_(do_syscall_for_client_WRK)
+ML_(do_syscall_for_client_WRK):
+
+ subu $29, $29, 56 #set up the steck frame,
+ sw $4, 52($29)
+ sw $5, 48($29)
+ sw $6, 44($29)
+ sw $7, 40($29)
+ sw $31, 36($29)
+ sw $30, 32($29)
+ sw $16, 28($29)
+ sw $17, 24($29)
+ sw $18, 20($29)
+ sw $19, 16($29)
+ sw $20, 12($29)
+ sw $21, 8($29)
+ sw $22, 4($29)
+ sw $23, 0($29)
+ addu $30, $29, 56
+
+
+ /* Set the signal mask which should be current during the syscall. */
+
+1: li $2, __NR_rt_sigprocmask
+ li $4, VKI_SIG_SETMASK
+ move $5, $6 /* sysmask */
+ move $6, $7 /* postmask */
+ lw $7, 72($29) /* nsigwo...
[truncated message content] |
|
From: <sv...@va...> - 2012-06-07 09:13:36
|
sewardj 2012-06-07 10:13:21 +0100 (Thu, 07 Jun 2012)
New Revision: 12616
Log:
Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mip...@rt..., Bug 270777.
Valgrind: changes to existing files.
Modified files:
trunk/Makefile.all.am
trunk/Makefile.tool.am
trunk/Makefile.vex.am
trunk/cachegrind/Makefile.am
trunk/cachegrind/cg_branchpred.c
trunk/cachegrind/tests/filter_stderr
trunk/callgrind/Makefile.am
trunk/callgrind/tests/filter_stderr
trunk/configure.in
trunk/coregrind/Makefile.am
trunk/coregrind/launcher-linux.c
trunk/coregrind/link_tool_exe_linux.in
trunk/coregrind/m_aspacemgr/aspacemgr-common.c
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_coredump/coredump-elf.c
trunk/coregrind/m_debugger.c
trunk/coregrind/m_debuginfo/d3basics.c
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_debuginfo/priv_storage.h
trunk/coregrind/m_debuginfo/readdwarf.c
trunk/coregrind/m_debuginfo/readdwarf3.c
trunk/coregrind/m_debuginfo/readelf.c
trunk/coregrind/m_debuginfo/storage.c
trunk/coregrind/m_debuglog.c
trunk/coregrind/m_gdbserver/target.c
trunk/coregrind/m_gdbserver/valgrind_low.h
trunk/coregrind/m_initimg/initimg-linux.c
trunk/coregrind/m_libcassert.c
trunk/coregrind/m_libcfile.c
trunk/coregrind/m_libcproc.c
trunk/coregrind/m_machine.c
trunk/coregrind/m_main.c
trunk/coregrind/m_redir.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_signals.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/m_syscall.c
trunk/coregrind/m_syswrap/priv_types_n_macros.h
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/m_trampoline.S
trunk/coregrind/m_translate.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/coregrind/pub_core_basics.h
trunk/coregrind/pub_core_debuginfo.h
trunk/coregrind/pub_core_machine.h
trunk/coregrind/pub_core_mallocfree.h
trunk/coregrind/pub_core_syscall.h
trunk/coregrind/pub_core_threadstate.h
trunk/coregrind/pub_core_trampoline.h
trunk/coregrind/pub_core_transtab_asm.h
trunk/coregrind/vgdb.c
trunk/drd/drd_bitmap.h
trunk/drd/drd_clientreq.c
trunk/drd/drd_load_store.c
trunk/drd/drd_thread.c
trunk/helgrind/tests/annotate_hbefore.c
trunk/helgrind/tests/tc07_hbl1.c
trunk/helgrind/tests/tc08_hbl2.c
trunk/helgrind/tests/tc11_XCHG.c
trunk/include/Makefile.am
trunk/include/pub_tool_basics.h
trunk/include/pub_tool_machine.h
trunk/include/pub_tool_vkiscnums_asm.h
trunk/include/valgrind.h
trunk/include/vki/vki-linux.h
trunk/memcheck/mc_machine.c
trunk/memcheck/tests/atomic_incs.c
trunk/memcheck/tests/memalign_test.c
trunk/none/tests/Makefile.am
trunk/none/tests/allexec_prepare_prereq
trunk/tests/arch_test.c
trunk/tests/platform_test
trunk/tests/sys_mman.h
Modified: trunk/none/tests/Makefile.am (+4 -1)
===================================================================
--- trunk/none/tests/Makefile.am 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/none/tests/Makefile.am 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -22,6 +22,9 @@
if VGCONF_ARCHS_INCLUDE_S390X
SUBDIRS += s390x
endif
+if VGCONF_ARCHS_INCLUDE_MIPS32
+SUBDIRS += mips32
+endif
# OS-specific tests
if VGCONF_OS_IS_LINUX
@@ -36,7 +39,7 @@
SUBDIRS += x86-linux
endif
-DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm s390x linux darwin x86-linux .
+DIST_SUBDIRS = x86 amd64 ppc32 ppc64 arm s390x mips32 linux darwin x86-linux .
dist_noinst_SCRIPTS = \
filter_cmdline0 \
Modified: trunk/memcheck/tests/atomic_incs.c (+97 -1)
===================================================================
--- trunk/memcheck/tests/atomic_incs.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/memcheck/tests/atomic_incs.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -110,6 +110,48 @@
: "+m" (*p), "+m" (dummy)
: "d" (n)
: "cc", "memory", "0", "1");
+#elif defined(VGA_mips32)
+#if defined (_MIPSEL)
+ unsigned int block[3]
+ = { (unsigned int)p, (unsigned int)n, 0xFFFFFFFF };
+ do {
+ __asm__ __volatile__(
+ "move $t0, %0" "\n\t"
+ "lw $t1, 0($t0)" "\n\t" // p
+ "lw $t2, 4($t0)" "\n\t" // n
+ "ll $t3, 0($t1)" "\n\t"
+ "addu $t3, $t3, $t2" "\n\t"
+ "andi $t3, $t3, 0xFF" "\n\t"
+ "sc $t3, 0($t1)" "\n\t"
+ "sw $t3, 8($t0)" "\n\t"
+ : /*out*/
+ : /*in*/ "r"(&block[0])
+ : /*trash*/ "memory", "cc", "t0", "t1", "t2", "t3"
+ );
+ } while (block[2] != 1);
+#elif defined (_MIPSEB)
+ unsigned int block[3]
+ = { (unsigned int)p, (unsigned int)n, 0xFFFFFFFF };
+ do {
+ __asm__ __volatile__(
+ "move $t0, %0" "\n\t"
+ "lw $t1, 0($t0)" "\n\t" // p
+ "lw $t2, 4($t0)" "\n\t" // n
+ "li $t4, 0x000000FF" "\n\t"
+ "ll $t3, 0($t1)" "\n\t"
+ "addu $t3, $t3, $t2" "\n\t"
+ "and $t3, $t3, $t4" "\n\t"
+ "wsbh $t4, $t3" "\n\t"
+ "rotr $t4, $t4, 16" "\n\t"
+ "or $t3, $t4, $t3" "\n\t"
+ "sc $t3, 0($t1)" "\n\t"
+ "sw $t3, 8($t0)" "\n\t"
+ : /*out*/
+ : /*in*/ "r"(&block[0])
+ : /*trash*/ "memory", "cc", "t0", "t1", "t2", "t3", "t4"
+ );
+ } while (block[2] != 1);
+#endif
#else
# error "Unsupported arch"
#endif
@@ -203,6 +245,43 @@
: "+m" (*p), "+m" (dummy)
: "d" (n)
: "cc", "memory", "0", "1");
+#elif defined(VGA_mips32)
+#if defined (_MIPSEL)
+ unsigned int block[3]
+ = { (unsigned int)p, (unsigned int)n, 0xFFFFFFFF };
+ do {
+ __asm__ __volatile__(
+ "move $t0, %0" "\n\t"
+ "lw $t1, 0($t0)" "\n\t" // p
+ "lw $t2, 4($t0)" "\n\t" // n
+ "ll $t3, 0($t1)" "\n\t"
+ "addu $t3, $t3, $t2" "\n\t"
+ "andi $t3, $t3, 0xFFFF" "\n\t"
+ "sc $t3, 0($t1)" "\n\t"
+ "sw $t3, 8($t0)" "\n\t"
+ : /*out*/
+ : /*in*/ "r"(&block[0])
+ : /*trash*/ "memory", "cc", "t0", "t1", "t2", "t3"
+ );
+ } while (block[2] != 1);
+#elif defined (_MIPSEB)
+ unsigned int block[3]
+ = { (unsigned int)p, (unsigned int)n, 0xFFFFFFFF };
+ do {
+ __asm__ __volatile__(
+ "move $t0, %0" "\n\t"
+ "lw $t1, 0($t0)" "\n\t" // p
+ "li $t2, 32694" "\n\t" // n
+ "li $t3, 0x1" "\n\t"
+ "sll $t2, $t2, 16" "\n\t"
+ "sw $t2, 0($t1)" "\n\t"
+ "sw $t3, 8($t0)" "\n\t"
+ : /*out*/
+ : /*in*/ "r"(&block[0])
+ : /*trash*/ "memory", "cc", "t0", "t1", "t2", "t3"
+ );
+ } while (block[2] != 1);
+#endif
#else
# error "Unsupported arch"
#endif
@@ -289,6 +368,23 @@
: "+m" (*p)
: "d" (n)
: "cc", "memory", "0", "1");
+#elif defined(VGA_mips32)
+ unsigned int block[3]
+ = { (unsigned int)p, (unsigned int)n, 0xFFFFFFFF };
+ do {
+ __asm__ __volatile__(
+ "move $t0, %0" "\n\t"
+ "lw $t1, 0($t0)" "\n\t" // p
+ "lw $t2, 4($t0)" "\n\t" // n
+ "ll $t3, 0($t1)" "\n\t"
+ "addu $t3, $t3, $t2" "\n\t"
+ "sc $t3, 0($t1)" "\n\t"
+ "sw $t3, 8($t0)" "\n\t"
+ : /*out*/
+ : /*in*/ "r"(&block[0])
+ : /*trash*/ "memory", "cc", "t0", "t1", "t2", "t3"
+ );
+ } while (block[2] != 1);
#else
# error "Unsupported arch"
#endif
@@ -296,7 +392,7 @@
__attribute__((noinline)) void atomic_add_64bit ( long long int* p, int n )
{
-#if defined(VGA_x86) || defined(VGA_ppc32)
+#if defined(VGA_x86) || defined(VGA_ppc32) || defined(VGA_mips32)
/* do nothing; is not supported */
#elif defined(VGA_amd64)
// this is a bit subtle. It relies on the fact that, on a 64-bit platform,
Modified: trunk/coregrind/m_redir.c (+11 -0)
===================================================================
--- trunk/coregrind/m_redir.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_redir.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -1358,6 +1358,17 @@
# elif defined(VGP_s390x_linux)
/* nothing so far */
+# elif defined(VGP_mips32_linux)
+ if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+
+ /* this is mandatory - can't sanely continue without it */
+ add_hardwired_spec(
+ "ld.so.3", "strlen",
+ (Addr)&VG_(mips32_linux_REDIR_FOR_strlen),
+ complain_about_stripped_glibc_ldso
+ );
+ }
+
# else
# error Unknown platform
# endif
Modified: trunk/include/pub_tool_basics.h (+10 -3)
===================================================================
--- trunk/include/pub_tool_basics.h 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/include/pub_tool_basics.h 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -163,6 +163,7 @@
typedef
struct {
UWord _val;
+ UWord _valEx; // only used on mips-linux
Bool _isError;
}
SysRes;
@@ -197,6 +198,9 @@
static inline UWord sr_Res ( SysRes sr ) {
return sr._isError ? 0 : sr._val;
}
+static inline UWord sr_ResEx ( SysRes sr ) {
+ return sr._isError ? 0 : sr._valEx;
+}
static inline UWord sr_ResHI ( SysRes sr ) {
return 0;
}
@@ -264,9 +268,11 @@
#undef VG_BIGENDIAN
#undef VG_LITTLEENDIAN
-#if defined(VGA_x86) || defined(VGA_amd64) || defined (VGA_arm)
+#if defined(VGA_x86) || defined(VGA_amd64) || defined (VGA_arm) \
+ || (defined(VGA_mips32) && defined (_MIPSEL))
# define VG_LITTLEENDIAN 1
-#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_s390x)
+#elif defined(VGA_ppc32) || defined(VGA_ppc64) || defined(VGA_s390x) \
+ || (defined(VGA_mips32) && defined (_MIPSEB))
# define VG_BIGENDIAN 1
#else
# error Unknown arch
@@ -276,7 +282,8 @@
#if defined(VGA_x86)
# define VG_REGPARM(n) __attribute__((regparm(n)))
#elif defined(VGA_amd64) || defined(VGA_ppc32) \
- || defined(VGA_ppc64) || defined(VGA_arm) || defined(VGA_s390x)
+ || defined(VGA_ppc64) || defined(VGA_arm) || defined(VGA_s390x) \
+ || defined(VGA_mips32)
# define VG_REGPARM(n) /* */
#else
# error Unknown arch
Modified: trunk/helgrind/tests/annotate_hbefore.c (+32 -0)
===================================================================
--- trunk/helgrind/tests/annotate_hbefore.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/helgrind/tests/annotate_hbefore.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -186,6 +186,38 @@
return cc == 0;
}
+#elif defined(VGA_mips32)
+
+// mips
+/* return 1 if success, 0 if failure */
+UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
+{
+ UWord old, success;
+ UWord block[3] = { (UWord)addr, nyu, expected};
+
+ __asm__ __volatile__(
+ ".set noreorder" "\n\t"
+ "lw $t0, 0(%1)" "\n\t"
+ "lw $t2, 8(%1)" "\n\t"
+ "lw $t3, 4(%1)" "\n\t"
+ "ll $t1, 0($t0)" "\n\t"
+ "bne $t1, $t2, exit_0" "\n\t"
+ "sc $t3, 0($t0)" "\n\t"
+ "move %0, $t3" "\n\t"
+ "b exit" "\n\t"
+ "nop" "\n\t"
+ "exit_0:" "\n\t"
+ "move %0, $0" "\n\t"
+ "exit:" "\n\t"
+ : /*out*/ "=r"(success)
+ : /*in*/ "r"(&block[0])
+ : /*trash*/ "t0", "t1", "t2", "t3", "memory"
+ );
+
+ assert(success == 0 || success == 1);
+ return success;
+}
+
#endif
void atomic_incW ( UWord* w )
Modified: trunk/coregrind/link_tool_exe_linux.in (+12 -1)
===================================================================
--- trunk/coregrind/link_tool_exe_linux.in 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/link_tool_exe_linux.in 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -68,8 +68,19 @@
# so, build up the complete command here:
# 'cc' -static -Ttext='ala' 'restargs'
-my $cmd="$cc -static -Wl,-Ttext=$ala";
+# For mips we need to use "--section-start=.reginfo=$ala" because
+# "--section-start=.reginfo=$ala" will put all the sections to the
+# specificed address ($ala)
+my $x=`$cc -v 2>&1 | grep Target | sed 's/Target: //g'`;
+my $arch=substr($x, 0, index($x, '-'));
+my $cmd;
+if (($arch eq 'mips') || ($arch eq 'mipsel')) {
+ $cmd = "$cc -static -Wl,--section-start=.reginfo=$ala";
+} else {
+ $cmd = "$cc -static -Wl,-Ttext=$ala";
+}
+
# Add the rest of the parameters
foreach my $n (2 .. $#ARGV) {
$cmd = "$cmd $ARGV[$n]";
Modified: trunk/coregrind/m_initimg/initimg-linux.c (+14 -0)
===================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_initimg/initimg-linux.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -1081,6 +1081,20 @@
VG_TRACK(post_reg_write, Vg_CoreStartup, /*tid*/1, VG_O_INSTR_PTR, 8);
return;
+# elif defined(VGP_mips32_linux)
+ vg_assert(0 == sizeof(VexGuestMIPS32State) % 16);
+ /* Zero out the initial state, and set up the simulated FPU in a
+ sane way. */
+ LibVEX_GuestMIPS32_initialise(&arch->vex);
+
+ /* Zero out the shadow areas. */
+ VG_(memset)(&arch->vex_shadow1, 0, sizeof(VexGuestMIPS32State));
+ VG_(memset)(&arch->vex_shadow2, 0, sizeof(VexGuestMIPS32State));
+
+ arch->vex.guest_r29 = iifii.initial_client_SP;
+ arch->vex.guest_PC = iifii.initial_client_IP;
+ arch->vex.guest_r31 = iifii.initial_client_SP;
+
# else
# error Unknown platform
# endif
Modified: trunk/coregrind/m_libcassert.c (+25 -0)
===================================================================
--- trunk/coregrind/m_libcassert.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_libcassert.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -152,6 +152,31 @@
(srP)->misc.S390X.r_fp = fp; \
(srP)->misc.S390X.r_lr = lr; \
}
+#elif defined(VGP_mips32_linux)
+# define GET_STARTREGS(srP) \
+ { UInt pc, sp, fp, ra, gp; \
+ asm("move $8, $31;" /* t0 = ra */ \
+ "bal m_libcassert_get_ip;" /* ra = pc */ \
+ "m_libcassert_get_ip:\n" \
+ "move %0, $31;" \
+ "move $31, $8;" /* restore lr */ \
+ "move %1, $29;" \
+ "move %2, $30;" \
+ "move %3, $31;" \
+ "move %4, $28;" \
+ : "=r" (pc), \
+ "=r" (sp), \
+ "=r" (fp), \
+ "=r" (ra), \
+ "=r" (gp) \
+ : /* reads none */ \
+ : "$8" /* trashed */ ); \
+ (srP)->r_pc = (ULong)pc - 8; \
+ (srP)->r_sp = (ULong)sp; \
+ (srP)->misc.MIPS32.r30 = (ULong)fp; \
+ (srP)->misc.MIPS32.r31 = (ULong)ra; \
+ (srP)->misc.MIPS32.r28 = (ULong)gp; \
+ }
#else
# error Unknown platform
#endif
Modified: trunk/include/vki/vki-linux.h (+7 -0)
===================================================================
--- trunk/include/vki/vki-linux.h 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/include/vki/vki-linux.h 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -91,6 +91,8 @@
# include "vki-posixtypes-arm-linux.h"
#elif defined(VGA_s390x)
# include "vki-posixtypes-s390x-linux.h"
+#elif defined(VGA_mips32)
+# include "vki-posixtypes-mips32-linux.h"
#else
# error Unknown platform
#endif
@@ -211,6 +213,8 @@
# include "vki-arm-linux.h"
#elif defined(VGA_s390x)
# include "vki-s390x-linux.h"
+#elif defined(VGA_mips32)
+# include "vki-mips32-linux.h"
#else
# error Unknown platform
#endif
@@ -383,6 +387,8 @@
// From linux-2.6.8.1/include/asm-generic/siginfo.h
//----------------------------------------------------------------------
+// Some archs, such as MIPS, have non-standard vki_siginfo.
+#ifndef HAVE_ARCH_SIGINFO_T
typedef union vki_sigval {
int sival_int;
void __user *sival_ptr;
@@ -462,6 +468,7 @@
} _sigpoll;
} _sifields;
} vki_siginfo_t;
+#endif
#define __VKI_SI_FAULT 0
Modified: trunk/coregrind/m_machine.c (+121 -2)
===================================================================
--- trunk/coregrind/m_machine.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_machine.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -103,6 +103,15 @@
= VG_(threads)[tid].arch.vex.guest_r11;
regs->misc.S390X.r_lr
= VG_(threads)[tid].arch.vex.guest_r14;
+# elif defined(VGA_mips32)
+ regs->r_pc = VG_(threads)[tid].arch.vex.guest_PC;
+ regs->r_sp = VG_(threads)[tid].arch.vex.guest_r29;
+ regs->misc.MIPS32.r30
+ = VG_(threads)[tid].arch.vex.guest_r30;
+ regs->misc.MIPS32.r31
+ = VG_(threads)[tid].arch.vex.guest_r31;
+ regs->misc.MIPS32.r28
+ = VG_(threads)[tid].arch.vex.guest_r28;
# else
# error "Unknown arch"
# endif
@@ -132,6 +141,9 @@
# elif defined(VGP_s390x_linux)
VG_(threads)[tid].arch.vex_shadow1.guest_r2 = s1res;
VG_(threads)[tid].arch.vex_shadow2.guest_r2 = s2res;
+# elif defined(VGP_mips32_linux)
+ VG_(threads)[tid].arch.vex_shadow1.guest_r2 = s1res;
+ VG_(threads)[tid].arch.vex_shadow2.guest_r2 = s2res;
# else
# error "Unknown plat"
# endif
@@ -282,6 +294,39 @@
(*f)(tid, "r13", vex->guest_r13);
(*f)(tid, "r14", vex->guest_r14);
(*f)(tid, "r15", vex->guest_r15);
+#elif defined(VGA_mips32)
+ (*f)(tid, "r0" , vex->guest_r0 );
+ (*f)(tid, "r1" , vex->guest_r1 );
+ (*f)(tid, "r2" , vex->guest_r2 );
+ (*f)(tid, "r3" , vex->guest_r3 );
+ (*f)(tid, "r4" , vex->guest_r4 );
+ (*f)(tid, "r5" , vex->guest_r5 );
+ (*f)(tid, "r6" , vex->guest_r6 );
+ (*f)(tid, "r7" , vex->guest_r7 );
+ (*f)(tid, "r8" , vex->guest_r8 );
+ (*f)(tid, "r9" , vex->guest_r9 );
+ (*f)(tid, "r10", vex->guest_r10);
+ (*f)(tid, "r11", vex->guest_r11);
+ (*f)(tid, "r12", vex->guest_r12);
+ (*f)(tid, "r13", vex->guest_r13);
+ (*f)(tid, "r14", vex->guest_r14);
+ (*f)(tid, "r15", vex->guest_r15);
+ (*f)(tid, "r16", vex->guest_r16);
+ (*f)(tid, "r17", vex->guest_r17);
+ (*f)(tid, "r18", vex->guest_r18);
+ (*f)(tid, "r19", vex->guest_r19);
+ (*f)(tid, "r20", vex->guest_r20);
+ (*f)(tid, "r21", vex->guest_r21);
+ (*f)(tid, "r22", vex->guest_r22);
+ (*f)(tid, "r23", vex->guest_r23);
+ (*f)(tid, "r24", vex->guest_r24);
+ (*f)(tid, "r25", vex->guest_r25);
+ (*f)(tid, "r26", vex->guest_r26);
+ (*f)(tid, "r27", vex->guest_r27);
+ (*f)(tid, "r28", vex->guest_r28);
+ (*f)(tid, "r29", vex->guest_r29);
+ (*f)(tid, "r30", vex->guest_r30);
+ (*f)(tid, "r31", vex->guest_r31);
#else
# error Unknown arch
#endif
@@ -389,7 +434,7 @@
/* For hwcaps detection on ppc32/64, s390x, and arm we'll need to do SIGILL
testing, so we need a VG_MINIMAL_JMP_BUF. */
#if defined(VGA_ppc32) || defined(VGA_ppc64) \
- || defined(VGA_arm) || defined(VGA_s390x)
+ || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32)
#include "pub_tool_libcsetjmp.h"
static VG_MINIMAL_JMP_BUF(env_unsup_insn);
static void handler_unsup_insn ( Int x ) {
@@ -568,6 +613,64 @@
#endif /* VGA_s390x */
+#ifdef VGA_mips32
+
+/* Read /proc/cpuinfo and return the machine model. */
+static UInt VG_(get_machine_model)(void)
+{
+ char *search_MIPS_str = "MIPS";
+ char *search_Broadcom_str = "Broadcom";
+ Int n, fh;
+ SysRes fd;
+ SizeT num_bytes, file_buf_size;
+ HChar *file_buf;
+
+ /* Slurp contents of /proc/cpuinfo into FILE_BUF */
+ fd = VG_(open)( "/proc/cpuinfo", 0, VKI_S_IRUSR );
+ if ( sr_isError(fd) ) return -1;
+
+ fh = sr_Res(fd);
+
+ /* Determine the size of /proc/cpuinfo.
+ Work around broken-ness in /proc file system implementation.
+ fstat returns a zero size for /proc/cpuinfo although it is
+ claimed to be a regular file. */
+ num_bytes = 0;
+ file_buf_size = 1000;
+ file_buf = VG_(malloc)("cpuinfo", file_buf_size + 1);
+ while (42) {
+ n = VG_(read)(fh, file_buf, file_buf_size);
+ if (n < 0) break;
+
+ num_bytes += n;
+ if (n < file_buf_size) break; /* reached EOF */
+ }
+
+ if (n < 0) num_bytes = 0; /* read error; ignore contents */
+
+ if (num_bytes > file_buf_size) {
+ VG_(free)( file_buf );
+ VG_(lseek)( fh, 0, VKI_SEEK_SET );
+ file_buf = VG_(malloc)( "cpuinfo", num_bytes + 1 );
+ n = VG_(read)( fh, file_buf, num_bytes );
+ if (n < 0) num_bytes = 0;
+ }
+
+ file_buf[num_bytes] = '\0';
+ VG_(close)(fh);
+
+ /* Parse file */
+ if (VG_(strstr) (file_buf, search_Broadcom_str) != NULL)
+ return VEX_PRID_COMP_BROADCOM;
+ if (VG_(strstr) (file_buf, search_MIPS_str) != NULL)
+ return VEX_PRID_COMP_MIPS;
+
+ /* Did not find string in the proc file. */
+ return -1;
+}
+
+#endif
+
/* Determine what insn set and insn set variant the host has, and
record it. To be called once at system startup. Returns False if
this a CPU incapable of running Valgrind. */
@@ -1249,6 +1352,17 @@
return True;
}
+#elif defined(VGA_mips32)
+ {
+ va = VexArchMIPS32;
+ UInt model = VG_(get_machine_model)();
+ if (model== -1)
+ return False;
+
+ vai.hwcaps = model;
+ return True;
+ }
+
#else
# error "Unknown arch"
#endif
@@ -1370,6 +1484,11 @@
assume we always do. */
return 16;
+# elif defined(VGA_mips32)
+ /* The guest state implies 4, but that can't really be true, can
+ it? */
+ return 8;
+
# else
# error "Unknown arch"
# endif
@@ -1383,7 +1502,7 @@
# if defined(VGP_x86_linux) || defined(VGP_amd64_linux) \
|| defined(VGP_arm_linux) \
|| defined(VGP_ppc32_linux) || defined(VGO_darwin) \
- || defined(VGP_s390x_linux)
+ || defined(VGP_s390x_linux) || defined(VGP_mips32_linux)
return f;
# elif defined(VGP_ppc64_linux)
/* ppc64-linux uses the AIX scheme, in which f is a pointer to a
Modified: trunk/coregrind/m_syscall.c (+58 -0)
===================================================================
--- trunk/coregrind/m_syscall.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_syscall.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -62,6 +62,7 @@
SysRes VG_(mk_SysRes_x86_linux) ( Int val ) {
SysRes res;
+ res._valEx = 0; /* unused except on mips-linux */
res._isError = val >= -4095 && val <= -1;
if (res._isError) {
res._val = (UInt)(-val);
@@ -74,6 +75,7 @@
/* Similarly .. */
SysRes VG_(mk_SysRes_amd64_linux) ( Long val ) {
SysRes res;
+ res._valEx = 0; /* unused except on mips-linux */
res._isError = val >= -4095 && val <= -1;
if (res._isError) {
res._val = (ULong)(-val);
@@ -87,6 +89,7 @@
/* Note this must be in the bottom bit of the second arg */
SysRes VG_(mk_SysRes_ppc32_linux) ( UInt val, UInt cr0so ) {
SysRes res;
+ res._valEx = 0; /* unused except on mips-linux */
res._isError = (cr0so & 1) != 0;
res._val = val;
return res;
@@ -95,6 +98,7 @@
/* As per ppc32 version, cr0.so must be in l.s.b. of 2nd arg */
SysRes VG_(mk_SysRes_ppc64_linux) ( ULong val, ULong cr0so ) {
SysRes res;
+ res._valEx = 0; /* unused except on mips-linux */
res._isError = (cr0so & 1) != 0;
res._val = val;
return res;
@@ -102,6 +106,7 @@
SysRes VG_(mk_SysRes_s390x_linux) ( Long val ) {
SysRes res;
+ res._valEx = 0; /* unused except on mips-linux */
res._isError = val >= -4095 && val <= -1;
if (res._isError) {
res._val = -val;
@@ -113,6 +118,7 @@
SysRes VG_(mk_SysRes_arm_linux) ( Int val ) {
SysRes res;
+ res._valEx = 0; /* unused except on mips-linux */
res._isError = val >= -4095 && val <= -1;
if (res._isError) {
res._val = (UInt)(-val);
@@ -122,9 +128,19 @@
return res;
}
+/* MIPS uses a3 != 0 to flag an error */
+SysRes VG_(mk_SysRes_mips32_linux) ( UWord v0, UWord v1, UWord a3 ) {
+ SysRes res;
+ res._isError = (a3 != (UWord)0);
+ res._val = v0;
+ res._valEx = v1;
+ return res;
+}
+
/* Generic constructors. */
SysRes VG_(mk_SysRes_Error) ( UWord err ) {
SysRes r;
+ r._valEx = 0; /* unused except on mips-linux */
r._isError = True;
r._val = err;
return r;
@@ -132,6 +148,7 @@
SysRes VG_(mk_SysRes_Success) ( UWord res ) {
SysRes r;
+ r._valEx = 0; /* unused except on mips-linux */
r._isError = False;
r._val = res;
return r;
@@ -575,6 +592,40 @@
return (UWord) (__svcres);
}
+#elif defined(VGP_mips32_linux)
+/* Incoming args (syscall number + up to 6 args) come in a0 - a3 and stack.
+
+ The syscall number goes in v0. The args are passed to the syscall in
+ the regs a0 - a3 and stack, i.e. the kernel's syscall calling convention.
+
+ (a3 != 0) flags an error.
+ We return the syscall return value in v0.
+ MIPS version
+*/
+extern int do_syscall_WRK (
+ int a1, int a2, int a3,
+ int a4, int a5, int a6, int syscall_no, UWord *err,
+ UWord *valHi, UWord* valLo
+ );
+asm(
+".globl do_syscall_WRK\n"
+".ent do_syscall_WRK\n"
+".text\n"
+"do_syscall_WRK:\n"
+" lw $2, 24($29)\n"
+" syscall\n"
+" lw $8, 28($29)\n"
+" sw $7, ($8)\n"
+" lw $8, 32($29)\n"
+" sw $3, ($8)\n" // store valHi
+" lw $8, 36($29)\n"
+" sw $2, ($8)\n" // store valLo
+" jr $31\n"
+" nop\n"
+".previous\n"
+".end do_syscall_WRK\n"
+);
+
#else
# error Unknown platform
#endif
@@ -682,6 +733,13 @@
}
return VG_(mk_SysRes_s390x_linux)( val );
+
+#elif defined(VGP_mips32_linux)
+ UWord err = 0;
+ UWord valHi = 0;
+ UWord valLo = 0;
+ (void) do_syscall_WRK(a1,a2,a3,a4,a5,a6, sysno,&err,&valHi,&valLo);
+ return VG_(mk_SysRes_mips32_linux)( valLo, valHi, (ULong)err );
#else
# error Unknown platform
#endif
Modified: trunk/coregrind/m_libcfile.c (+33 -7)
===================================================================
--- trunk/coregrind/m_libcfile.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_libcfile.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -194,7 +194,17 @@
Int VG_(pipe) ( Int fd[2] )
{
-# if defined(VGO_linux)
+# if defined(VGP_mips32_linux)
+ /* __NR_pipe has a strange return convention on mips32-linux. */
+ SysRes res = VG_(do_syscall0)(__NR_pipe);
+ if (!sr_isError(res)) {
+ fd[0] = (Int)sr_Res(res);
+ fd[1] = (Int)sr_ResEx(res);
+ return 0;
+ } else {
+ return -1;
+ }
+# elif defined(VGO_linux)
SysRes res = VG_(do_syscall1)(__NR_pipe, (UWord)fd);
return sr_isError(res) ? -1 : 0;
# elif defined(VGO_darwin)
@@ -596,6 +606,16 @@
0, // Padding needed on PPC32
0, offset); // Big endian long long
return res;
+# elif defined(VGP_mips32_linux) && VKI_LITTLE_ENDIAN
+ vg_assert(sizeof(OffT) == 4);
+ res = VG_(do_syscall6)(__NR_pread64, fd, (UWord)buf, count,
+ 0, offset, 0);
+ return res;
+# elif defined(VGP_mips32_linux) && VKI_BIG_ENDIAN
+ vg_assert(sizeof(OffT) == 4);
+ res = VG_(do_syscall6)(__NR_pread64, fd, (UWord)buf, count,
+ 0, 0, offset);
+ return res;
# elif defined(VGP_amd64_linux) \
|| defined(VGP_ppc64_linux) || defined(VGP_s390x_linux)
res = VG_(do_syscall4)(__NR_pread64, fd, (UWord)buf, count, offset);
@@ -837,7 +857,8 @@
res = VG_(do_syscall2)(__NR_socketcall, VKI_SYS_SOCKET, (UWord)&args);
return sr_isError(res) ? -1 : sr_Res(res);
-# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux)
+# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
+ || defined(VGP_mips32_linux)
SysRes res;
res = VG_(do_syscall3)(__NR_socket, domain, type, protocol );
return sr_isError(res) ? -1 : sr_Res(res);
@@ -875,7 +896,8 @@
res = VG_(do_syscall2)(__NR_socketcall, VKI_SYS_CONNECT, (UWord)&args);
return sr_isError(res) ? -1 : sr_Res(res);
-# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux)
+# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
+ || defined(VGP_mips32_linux)
SysRes res;
res = VG_(do_syscall3)(__NR_connect, sockfd, (UWord)serv_addr, addrlen);
return sr_isError(res) ? -1 : sr_Res(res);
@@ -913,7 +935,8 @@
res = VG_(do_syscall2)(__NR_socketcall, VKI_SYS_SEND, (UWord)&args);
return sr_isError(res) ? -1 : sr_Res(res);
-# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux)
+# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
+ || defined(VGP_mips32_linux)
SysRes res;
res = VG_(do_syscall6)(__NR_sendto, sd, (UWord)msg,
count, VKI_MSG_NOSIGNAL, 0,0);
@@ -932,7 +955,8 @@
Int VG_(getsockname) ( Int sd, struct vki_sockaddr *name, Int *namelen)
{
# if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \
- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux)
+ || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) \
+ || defined(VGP_mips32_linux)
SysRes res;
UWord args[3];
args[0] = sd;
@@ -961,7 +985,8 @@
Int VG_(getpeername) ( Int sd, struct vki_sockaddr *name, Int *namelen)
{
# if defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \
- || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux)
+ || defined(VGP_ppc64_linux) || defined(VGP_s390x_linux) \
+ || defined(VGP_mips32_linux)
SysRes res;
UWord args[3];
args[0] = sd;
@@ -1002,7 +1027,8 @@
res = VG_(do_syscall2)(__NR_socketcall, VKI_SYS_GETSOCKOPT, (UWord)&args);
return sr_isError(res) ? -1 : sr_Res(res);
-# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux)
+# elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \
+ || defined(VGP_mips32_linux)
SysRes res;
res = VG_(do_syscall5)( __NR_getsockopt,
(UWord)sd, (UWord)level, (UWord)optname,
Modified: trunk/drd/drd_thread.c (+6 -0)
===================================================================
--- trunk/drd/drd_thread.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/drd/drd_thread.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -597,6 +597,12 @@
}
/** Store the thread mode: joinable or detached. */
+#if defined(VGP_mips32_linux)
+ /* There is a cse related issue in gcc for MIPS. Optimization level
+ has to be lowered, so cse related optimizations are not
+ included.*/
+ __attribute__((optimize("O1")))
+#endif
void DRD_(thread_set_joinable)(const DrdThreadId tid, const Bool joinable)
{
tl_assert(0 <= (int)tid && tid < DRD_N_THREADS
Modified: trunk/coregrind/m_scheduler/scheduler.c (+7 -0)
===================================================================
--- trunk/coregrind/m_scheduler/scheduler.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_scheduler/scheduler.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -780,6 +780,10 @@
# if defined(VGA_s390x)
/* no special requirements */
# endif
+
+# if defined(VGA_mips32)
+ /* no special requirements */
+# endif
}
// NO_VGDB_POLL value ensures vgdb is not polled, while
@@ -1557,6 +1561,9 @@
#elif defined (VGA_s390x)
# define VG_CLREQ_ARGS guest_r2
# define VG_CLREQ_RET guest_r3
+#elif defined(VGA_mips32)
+# define VG_CLREQ_ARGS guest_r12
+# define VG_CLREQ_RET guest_r11
#else
# error Unknown arch
#endif
Modified: trunk/coregrind/pub_core_trampoline.h (+6 -0)
===================================================================
--- trunk/coregrind/pub_core_trampoline.h 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/pub_core_trampoline.h 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -127,6 +127,12 @@
extern Addr VG_(s390x_linux_SUBST_FOR_rt_sigreturn);
#endif
+#if defined(VGP_mips32_linux)
+extern Addr VG_(mips32_linux_SUBST_FOR_sigreturn);
+extern Addr VG_(mips32_linux_SUBST_FOR_rt_sigreturn);
+extern UInt VG_(mips32_linux_REDIR_FOR_strlen)( void* );
+#endif
+
#endif // __PUB_CORE_TRAMPOLINE_H
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_debuginfo/readdwarf3.c (+2 -0)
===================================================================
--- trunk/coregrind/m_debuginfo/readdwarf3.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_debuginfo/readdwarf3.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -2307,8 +2307,10 @@
case DW_ATE_unsigned: case DW_ATE_unsigned_char:
case DW_ATE_UTF: /* since DWARF4, e.g. char16_t from C++ */
case DW_ATE_boolean:/* FIXME - is this correct? */
+ case DW_ATE_unsigned_fixed:
typeE.Te.TyBase.enc = 'U'; break;
case DW_ATE_signed: case DW_ATE_signed_char:
+ case DW_ATE_signed_fixed:
typeE.Te.TyBase.enc = 'S'; break;
case DW_ATE_float:
typeE.Te.TyBase.enc = 'F'; break;
Modified: trunk/callgrind/Makefile.am (+2 -1)
===================================================================
--- trunk/callgrind/Makefile.am 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/callgrind/Makefile.am 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -50,7 +50,8 @@
../cachegrind/cg-ppc32.c \
../cachegrind/cg-ppc64.c \
../cachegrind/cg-arm.c \
- ../cachegrind/cg-s390x.c
+ ../cachegrind/cg-s390x.c \
+ ../cachegrind/cg-mips32.c
CALLGRIND_CFLAGS_COMMON = -I$(top_srcdir)/cachegrind
Modified: trunk/Makefile.tool.am (+12 -0)
===================================================================
--- trunk/Makefile.tool.am 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/Makefile.tool.am 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -59,6 +59,11 @@
TOOL_LDFLAGS_AMD64_DARWIN = \
$(TOOL_LDFLAGS_COMMON_DARWIN) -arch x86_64
+# MIPS Linux default start symbol is __start, not _start like on x86 or amd
+TOOL_LDFLAGS_MIPS32_LINUX = \
+ -static -nodefaultlibs -nostartfiles -u __start @FLAG_NO_BUILD_ID@ \
+ @FLAG_M32@
+
# On Android we must ask for non-executable stack, not sure why.
if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX
if VGCONF_PLATVARIANT_IS_ANDROID
@@ -103,6 +108,8 @@
LIBREPLACEMALLOC_S390X_LINUX = \
$(top_builddir)/coregrind/libreplacemalloc_toolpreload-s390x-linux.a
+LIBREPLACEMALLOC_MIPS32_LINUX = \
+ $(top_builddir)/coregrind/libreplacemalloc_toolpreload-mips32-linux.a
LIBREPLACEMALLOC_LDFLAGS_X86_LINUX = \
-Wl,--whole-archive \
@@ -140,6 +147,11 @@
$(LIBREPLACEMALLOC_S390X_LINUX) \
-Wl,--no-whole-archive
+LIBREPLACEMALLOC_LDFLAGS_MIPS32_LINUX = \
+ -Wl,--whole-archive \
+ $(LIBREPLACEMALLOC_MIPS32_LINUX) \
+ -Wl,--no-whole-archive
+
#----------------------------------------------------------------------------
# General stuff
#----------------------------------------------------------------------------
Modified: trunk/drd/drd_clientreq.c (+6 -0)
===================================================================
--- trunk/drd/drd_clientreq.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/drd/drd_clientreq.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -69,6 +69,12 @@
* DRD's handler for Valgrind client requests. The code below handles both
* DRD's public and tool-internal client requests.
*/
+#if defined(VGP_mips32_linux)
+ /* There is a cse related issue in gcc for MIPS. Optimization level
+ has to be lowered, so cse related optimizations are not
+ included. */
+ __attribute__((optimize("O1")))
+#endif
static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret)
{
UWord result = 0;
Modified: trunk/coregrind/m_translate.c (+12 -1)
===================================================================
--- trunk/coregrind/m_translate.c 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/m_translate.c 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -726,7 +726,7 @@
static Bool translations_allowable_from_seg ( NSegment const* seg )
{
-# if defined(VGA_x86) || defined(VGA_s390x)
+# if defined(VGA_x86) || defined(VGA_s390x) || defined(VGA_mips32)
Bool allowR = True;
# else
Bool allowR = False;
@@ -1188,6 +1188,12 @@
nraddr_szB == 8 ? mkU64(0) : mkU32(0)
)
);
+# if defined(VGP_mips32_linux)
+ // t9 needs to be set to point to the start of the redirected function.
+ VgCallbackClosure* closure = (VgCallbackClosure*)closureV;
+ Int offB_GPR25 = offsetof(VexGuestMIPS32State,guest_r25);
+ addStmtToIRSB( bb, IRStmt_Put( offB_GPR25, mkU32( closure->readdr )) );
+# endif
# if defined(VG_PLAT_USES_PPCTOC)
{ VgCallbackClosure* closure = (VgCallbackClosure*)closureV;
addStmtToIRSB(
@@ -1224,6 +1230,11 @@
: IRExpr_Const(IRConst_U32( (UInt)closure->nraddr ))
)
);
+# if defined(VGP_mips32_linux)
+ // t9 needs to be set to point to the start of the redirected function.
+ Int offB_GPR25 = offsetof(VexGuestMIPS32State,guest_r25);
+ addStmtToIRSB( bb, IRStmt_Put( offB_GPR25, mkU32( closure->readdr )) );
+# endif
# if defined(VGP_ppc64_linux)
addStmtToIRSB(
bb,
Modified: trunk/coregrind/Makefile.am (+17 -1)
===================================================================
--- trunk/coregrind/Makefile.am 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/coregrind/Makefile.am 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -301,6 +301,7 @@
m_dispatch/dispatch-ppc64-linux.S \
m_dispatch/dispatch-arm-linux.S \
m_dispatch/dispatch-s390x-linux.S \
+ m_dispatch/dispatch-mips32-linux.S \
m_dispatch/dispatch-x86-darwin.S \
m_dispatch/dispatch-amd64-darwin.S \
m_gdbserver/m_gdbserver.c \
@@ -318,6 +319,7 @@
m_gdbserver/valgrind-low-ppc32.c \
m_gdbserver/valgrind-low-ppc64.c \
m_gdbserver/valgrind-low-s390x.c \
+ m_gdbserver/valgrind-low-mips32.c \
m_gdbserver/version.c \
m_initimg/initimg-linux.c \
m_initimg/initimg-darwin.c \
@@ -337,6 +339,7 @@
m_sigframe/sigframe-ppc64-linux.c \
m_sigframe/sigframe-arm-linux.c \
m_sigframe/sigframe-s390x-linux.c \
+ m_sigframe/sigframe-mips32-linux.c \
m_sigframe/sigframe-x86-darwin.c \
m_sigframe/sigframe-amd64-darwin.c \
m_syswrap/syscall-x86-linux.S \
@@ -345,6 +348,7 @@
m_syswrap/syscall-ppc64-linux.S \
m_syswrap/syscall-arm-linux.S \
m_syswrap/syscall-s390x-linux.S \
+ m_syswrap/syscall-mips32-linux.S \
m_syswrap/syscall-x86-darwin.S \
m_syswrap/syscall-amd64-darwin.S \
m_syswrap/syswrap-main.c \
@@ -358,6 +362,7 @@
m_syswrap/syswrap-ppc64-linux.c \
m_syswrap/syswrap-arm-linux.c \
m_syswrap/syswrap-s390x-linux.c \
+ m_syswrap/syswrap-mips32-linux.c \
m_syswrap/syswrap-x86-darwin.c \
m_syswrap/syswrap-amd64-darwin.c \
m_ume/elf.c \
@@ -532,7 +537,18 @@
m_gdbserver/s390x-generic.xml \
m_gdbserver/s390x-linux64-valgrind-s1.xml \
m_gdbserver/s390x-linux64-valgrind-s2.xml \
- m_gdbserver/s390x-linux64.xml
+ m_gdbserver/s390x-linux64.xml \
+ m_gdbserver/mips-cp0-valgrind-s1.xml \
+ m_gdbserver/mips-cp0-valgrind-s2.xml \
+ m_gdbserver/mips-cp0.xml \
+ m_gdbserver/mips-cpu-valgrind-s1.xml \
+ m_gdbserver/mips-cpu-valgrind-s2.xml \
+ m_gdbserver/mips-cpu.xml \
+ m_gdbserver/mips-linux.xml \
+ m_gdbserver/mips-linux-valgrind.xml \
+ m_gdbserver/mips-fpu-valgrind-s1.xml \
+ m_gdbserver/mips-fpu-valgrind-s2.xml \
+ m_gdbserver/mips-fpu.xml
# so as to make sure these get copied into the install tree
vglibdir = $(pkglibdir)
Modified: trunk/include/valgrind.h (+607 -0)
===================================================================
--- trunk/include/valgrind.h 2012-06-06 03:27:51 +01:00 (rev 12615)
+++ trunk/include/valgrind.h 2012-06-07 10:13:21 +01:00 (rev 12616)
@@ -117,6 +117,7 @@
#undef PLAT_ppc64_linux
#undef PLAT_arm_linux
#undef PLAT_s390x_linux
+#undef PLAT_mips32_linux
#if defined(__APPLE__) && defined(__i386__)
@@ -138,6 +139,8 @@
# define PLAT_arm_linux 1
#elif defined(__linux__) && defined(__s390__) && defined(__s390x__)
# define PLAT_s390x_linux 1
+#elif defined(__linux__) && defined(__mips__)
+# define PLAT_mips32_linux 1
#else
/* If we're not compiling for our target platform, don't generate
any inline asms. */
@@ -665,6 +668,70 @@
#endif /* PLAT_s390x_linux */
+/* ------------------------- mips32-linux ---------------- */
+
+#if defined(PLAT_mips32_linux)
+
+typedef
+ struct {
+ unsigned int nraddr; /* where's the code? */
+ }
+ OrigFn;
+
+/* .word 0x342
+ * .word 0x742
+ * .word 0xC2
+ * .word 0x4C2*/
+#define __SPECIAL_INSTRUCTION_PREAMBLE \
+ "srl $0, $0, 13\n\t" \
+ "srl $0, $0, 29\n\t" \
+ "srl $0, $0, 3\n\t" \
+ "srl $0, $0, 19\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \
+ _zzq_default, _zzq_request, \
+ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \
+ __extension__ \
+ ({ volatile unsigned int _zzq_args[6]; \
+ volatile unsigned int _zzq_result; \
+ _zzq_args[0] = (unsigned int)(_zzq_request); \
+ _zzq_args[1] = (unsigned int)(_zzq_arg1); \
+ _zzq_args[2] = (unsigned int)(_zzq_arg2); \
+ _zzq_args[3] = (unsigned int)(_zzq_arg3); \
+ _zzq_args[4] = (unsigned int)(_zzq_arg4); \
+ _zzq_args[5] = (unsigned int)(_zzq_arg5); \
+ __asm__ volatile("move $11, %1\n\t" /*default*/ \
+ "move $12, %2\n\t" /*ptr*/ \
+ __SPECIAL_INSTRUCTION_PREAMBLE \
+ /* T3 = client_request ( T4 ) */ \
+ "or $13, $13, $13\n\t" \
+ "move %0, $11\n\t" /*result*/ \
+ : "=r" (_zzq_result) \
+ : "r" (_zzq_default), "r" (&_zzq_args[0]) \
+ : "cc","memory", "t3", "t4"); \
+ _zzq_result; \
+ })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \
+ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \
+ volatile unsigned int __addr; \
+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \
+ /* %t9 = guest_NRADDR */ \
+ "or $14, $14, $14\n\t" \
+ "move %0, $11" /*result*/ \
+ : "=r" (__addr) \
+ : \
+ : "cc", "memory" , "t3" \
+ ); \
+ _zzq_orig->nraddr = __addr; \
+ }
+
+#define VALGRIND_CALL_NOREDIR_T9 \
+ __SPECIAL_INSTRUCTION_PREAMBLE \
+ /* call-noredir *%t9 */ \
+ "or $15, $15, $15\n\t"
+#endif /* PLAT_mips32_linux */
+
/* Insert assembly code for other platforms here... */
#endif /* NVALGRIND */
@@ -3589,7 +3656,546 @@
#endif /* PLAT_s390x_linux */
+/* ------------------------- mips-linux ------------------------- */
+
+#if defined(PLAT_mips32_linux)
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \
+"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+"$25", "$31"
+
+/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned
+ long) == 4. */
+
+#define CALL_FN_W_v(lval, orig) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[1]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "subu $29, $29, 16 \n\t" \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $29, $29, 16\n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $29, $29, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[2]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "subu $29, $29, 16 \n\t" \
+ "lw $a0, 4(%1) \n\t" /* arg1*/ \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $29, $29, 16 \n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $29, $29, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[3]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ _argvec[2] = (unsigned long)(arg2); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "subu $29, $29, 16 \n\t" \
+ "lw $a0, 4(%1) \n\t" \
+ "lw $a1, 8(%1) \n\t" \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $29, $29, 16 \n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $29, $29, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[4]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ _argvec[2] = (unsigned long)(arg2); \
+ _argvec[3] = (unsigned long)(arg3); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "subu $29, $29, 16 \n\t" \
+ "lw $a0, 4(%1) \n\t" \
+ "lw $a1, 8(%1) \n\t" \
+ "lw $a2, 12(%1) \n\t" \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $29, $29, 16 \n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $29, $29, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[5]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ _argvec[2] = (unsigned long)(arg2); \
+ _argvec[3] = (unsigned long)(arg3); \
+ _argvec[4] = (unsigned long)(arg4); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "subu $29, $29, 16 \n\t" \
+ "lw $a0, 4(%1) \n\t" \
+ "lw $a1, 8(%1) \n\t" \
+ "lw $a2, 12(%1) \n\t" \
+ "lw $a3, 16(%1) \n\t" \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $29, $29, 16 \n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $29, $29, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[6]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ _argvec[2] = (unsigned long)(arg2); \
+ _argvec[3] = (unsigned long)(arg3); \
+ _argvec[4] = (unsigned long)(arg4); \
+ _argvec[5] = (unsigned long)(arg5); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "lw $a0, 20(%1) \n\t" \
+ "subu $sp, $sp, 24\n\t" \
+ "sw $a0, 16($sp) \n\t" \
+ "lw $a0, 4(%1) \n\t" \
+ "lw $a1, 8(%1) \n\t" \
+ "lw $a2, 12(%1) \n\t" \
+ "lw $a3, 16(%1) \n\t" \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $29, $29, 24 \n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $sp, $sp, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[7]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ _argvec[2] = (unsigned long)(arg2); \
+ _argvec[3] = (unsigned long)(arg3); \
+ _argvec[4] = (unsigned long)(arg4); \
+ _argvec[5] = (unsigned long)(arg5); \
+ _argvec[6] = (unsigned long)(arg6); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "lw $a0, 20(%1) \n\t" \
+ "subu $sp, $sp, 32\n\t" \
+ "sw $a0, 16($sp) \n\t" \
+ "lw $a0, 24(%1) \n\t" \
+ "nop\n\t" \
+ "sw $a0, 20($sp) \n\t" \
+ "lw $a0, 4(%1) \n\t" \
+ "lw $a1, 8(%1) \n\t" \
+ "lw $a2, 12(%1) \n\t" \
+ "lw $a3, 16(%1) \n\t" \
+ "lw $t9, 0(%1) \n\t" /* target->t9 */ \
+ VALGRIND_CALL_NOREDIR_T9 \
+ "addu $sp, $sp, 32 \n\t" \
+ "lw $gp, 0($sp) \n\t" \
+ "lw $ra, 4($sp) \n\t" \
+ "addu $sp, $sp, 8 \n\t" \
+ "move %0, $v0\n" \
+ : /*out*/ "=r" (_res) \
+ : /*in*/ "0" (&_argvec[0]) \
+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \
+ ); \
+ lval = (__typeof__(lval)) _res; \
+ } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \
+ arg7) \
+ do { \
+ volatile OrigFn _orig = (orig); \
+ volatile unsigned long _argvec[8]; \
+ volatile unsigned long _res; \
+ _argvec[0] = (unsigned long)_orig.nraddr; \
+ _argvec[1] = (unsigned long)(arg1); \
+ _argvec[2] = (unsigned long)(arg2); \
+ _argvec[3] = (unsigned long)(arg3); \
+ _argvec[4] = (unsigned long)(arg4); \
+ _argvec[5] = (unsigned long)(arg5); \
+ _argvec[6] = (unsigned long)(arg6); \
+ _argvec[7] = (unsigned long)(arg7); \
+ __asm__ volatile( \
+ "subu $29, $29, 8 \n\t" \
+ "sw $gp, 0($sp) \n\t" \
+ "sw $ra, 4($sp) \n\t" \
+ "lw $a0, 20(%1) \n\t" \
+ "subu $sp, $sp, 32\n\t" \
+ "sw $a0, 16($sp) \n\t" \
+ "lw $a0, 24(%1) \n\t" \
+ "sw $a0, 20($sp) \n\t" ...
[truncated message content] |
|
From: <sv...@va...> - 2012-06-07 09:00:12
|
sewardj 2012-06-07 09:59:53 +0100 (Thu, 07 Jun 2012)
New Revision: 2376
Log:
Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mip...@rt..., Bug 270777.
VEX: new files for mips32.
Added files:
trunk/priv/guest_mips_defs.h
trunk/priv/guest_mips_helpers.c
trunk/priv/guest_mips_toIR.c
trunk/priv/host_mips_defs.c
trunk/priv/host_mips_defs.h
trunk/priv/host_mips_isel.c
trunk/pub/libvex_guest_mips32.h
Added: trunk/priv/host_mips_defs.h (+753 -0)
===================================================================
--- trunk/priv/host_mips_defs.h 2012-06-07 09:51:02 +01:00 (rev 2375)
+++ trunk/priv/host_mips_defs.h 2012-06-07 09:59:53 +01:00 (rev 2376)
@@ -0,0 +1,753 @@
+
+/*---------------------------------------------------------------*/
+/*--- begin host_mips_defs.h ---*/
+/*---------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2012 RT-RK
+ mip...@rt...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VEX_HOST_MIPS_DEFS_H
+#define __VEX_HOST_MIPS_DEFS_H
+
+/* Num registers used for function calls */
+#define MIPS_N_REGPARMS 4
+
+/* --------- Registers. --------- */
+
+/* The usual HReg abstraction.
+ There are 32 general purpose regs.
+*/
+
+extern void ppHRegMIPS(HReg, Bool);
+
+extern HReg hregMIPS_GPR0(Bool mode64); // scratch reg / zero reg
+extern HReg hregMIPS_GPR1(Bool mode64); // reserved for trap handling
+extern HReg hregMIPS_GPR2(Bool mode64); // reserved for trap handling
+extern HReg hregMIPS_GPR3(Bool mode64);
+extern HReg hregMIPS_GPR4(Bool mode64);
+extern HReg hregMIPS_GPR5(Bool mode64);
+extern HReg hregMIPS_GPR6(Bool mode64);
+extern HReg hregMIPS_GPR7(Bool mode64);
+extern HReg hregMIPS_GPR8(Bool mode64);
+extern HReg hregMIPS_GPR9(Bool mode64);
+extern HReg hregMIPS_GPR10(Bool mode64);
+extern HReg hregMIPS_GPR11(Bool mode64);
+extern HReg hregMIPS_GPR12(Bool mode64);
+extern HReg hregMIPS_GPR13(Bool mode64);
+extern HReg hregMIPS_GPR14(Bool mode64);
+extern HReg hregMIPS_GPR15(Bool mode64);
+extern HReg hregMIPS_GPR16(Bool mode64);
+extern HReg hregMIPS_GPR17(Bool mode64);
+extern HReg hregMIPS_GPR18(Bool mode64);
+extern HReg hregMIPS_GPR19(Bool mode64);
+extern HReg hregMIPS_GPR20(Bool mode64);
+extern HReg hregMIPS_GPR21(Bool mode64);
+extern HReg hregMIPS_GPR22(Bool mode64);
+extern HReg hregMIPS_GPR23(Bool mode64); // GuestStatePtr
+extern HReg hregMIPS_GPR24(Bool mode64); // reserved for dispatcher
+extern HReg hregMIPS_GPR25(Bool mode64);
+extern HReg hregMIPS_GPR26(Bool mode64);
+extern HReg hregMIPS_GPR27(Bool mode64);
+extern HReg hregMIPS_GPR28(Bool mode64);
+extern HReg hregMIPS_GPR29(Bool mode64);
+extern HReg hregMIPS_GPR30(Bool mode64);
+extern HReg hregMIPS_GPR31(Bool mode64);
+extern HReg hregMIPS_PC(Bool mode64);
+
+extern HReg hregMIPS_HI(Bool mode64);
+extern HReg hregMIPS_LO(Bool mode64);
+
+extern HReg hregMIPS_F0(Bool mode64);
+extern HReg hregMIPS_F1(Bool mode64);
+extern HReg hregMIPS_F2(Bool mode64);
+extern HReg hregMIPS_F3(Bool mode64);
+extern HReg hregMIPS_F4(Bool mode64);
+extern HReg hregMIPS_F5(Bool mode64);
+extern HReg hregMIPS_F6(Bool mode64);
+extern HReg hregMIPS_F7(Bool mode64);
+extern HReg hregMIPS_F8(Bool mode64);
+extern HReg hregMIPS_F9(Bool mode64);
+extern HReg hregMIPS_F10(Bool mode64);
+extern HReg hregMIPS_F11(Bool mode64);
+extern HReg hregMIPS_F12(Bool mode64);
+extern HReg hregMIPS_F13(Bool mode64);
+extern HReg hregMIPS_F14(Bool mode64);
+extern HReg hregMIPS_F15(Bool mode64);
+extern HReg hregMIPS_F16(Bool mode64);
+extern HReg hregMIPS_F17(Bool mode64);
+extern HReg hregMIPS_F18(Bool mode64);
+extern HReg hregMIPS_F19(Bool mode64);
+extern HReg hregMIPS_F20(Bool mode64);
+extern HReg hregMIPS_F21(Bool mode64);
+extern HReg hregMIPS_F22(Bool mode64);
+extern HReg hregMIPS_F23(Bool mode64);
+extern HReg hregMIPS_F24(Bool mode64);
+extern HReg hregMIPS_F25(Bool mode64);
+extern HReg hregMIPS_F26(Bool mode64);
+extern HReg hregMIPS_F27(Bool mode64);
+extern HReg hregMIPS_F28(Bool mode64);
+extern HReg hregMIPS_F29(Bool mode64);
+extern HReg hregMIPS_F30(Bool mode64);
+extern HReg hregMIPS_F31(Bool mode64);
+extern HReg hregMIPS_FIR(void);
+extern HReg hregMIPS_FCCR(void);
+extern HReg hregMIPS_FEXR(void);
+extern HReg hregMIPS_FENR(void);
+extern HReg hregMIPS_FCSR(void);
+extern HReg hregMIPS_COND(void);
+
+extern HReg hregMIPS_D0(void);
+extern HReg hregMIPS_D1(void);
+extern HReg hregMIPS_D2(void);
+extern HReg hregMIPS_D3(void);
+extern HReg hregMIPS_D4(void);
+extern HReg hregMIPS_D5(void);
+extern HReg hregMIPS_D6(void);
+extern HReg hregMIPS_D7(void);
+extern HReg hregMIPS_D8(void);
+extern HReg hregMIPS_D9(void);
+extern HReg hregMIPS_D10(void);
+extern HReg hregMIPS_D11(void);
+extern HReg hregMIPS_D12(void);
+extern HReg hregMIPS_D13(void);
+extern HReg hregMIPS_D14(void);
+extern HReg hregMIPS_D15(void);
+
+#define GuestStatePointer(_mode64) hregMIPS_GPR10(_mode64)
+
+#define StackFramePointer(_mode64) hregMIPS_GPR30(_mode64)
+#define LinkRegister(_mode64) hregMIPS_GPR31(_mode64)
+#define StackPointer(_mode64) hregMIPS_GPR29(_mode64)
+#define FCSR() hregMIPS_FCSR()
+#define COND() hregMIPS_COND()
+
+#define HIRegister(_mode64) hregMIPS_HI(_mode64)
+#define LORegister(_mode64) hregMIPS_LO(_mode64)
+
+/* a0, a1, a2, a3 */
+#define MIPS_N_ARGREGS 4
+
+/* --------- Condition codes, Intel encoding. --------- */
+typedef enum {
+ MIPScc_EQ = 0, /* equal */
+ MIPScc_NE = 1, /* not equal */
+
+ MIPScc_HS = 2, /* >=u (higher or same) */
+ MIPScc_LO = 3, /* <u (lower) */
+
+ MIPScc_MI = 4, /* minus (negative) */
+ MIPScc_PL = 5, /* plus (zero or +ve) */
+
+ MIPScc_VS = 6, /* overflow */
+ MIPScc_VC = 7, /* no overflow */
+
+ MIPScc_HI = 8, /* >u (higher) */
+ MIPScc_LS = 9, /* <=u (lower or same) */
+
+ MIPScc_GE = 10, /* >=s (signed greater or equal) */
+ MIPScc_LT = 11, /* <s (signed less than) */
+
+ MIPScc_GT = 12, /* >s (signed greater) */
+ MIPScc_LE = 13, /* <=s (signed less or equal) */
+
+ MIPScc_AL = 14, /* always (unconditional) */
+ MIPScc_NV = 15 /* never (unconditional): */
+} MIPSCondCode;
+
+extern HChar *showMIPSCondCode(MIPSCondCode);
+
+/* --------- Memory address expressions (amodes). --------- */
+typedef enum {
+ Mam_IR, /* Immediate (signed 16-bit) + Reg */
+ Mam_RR /* Reg1 + Reg2 */
+} MIPSAModeTag;
+
+typedef struct {
+ MIPSAModeTag tag;
+ union {
+ struct {
+ HReg base;
+ Int index;
+ } IR;
+ struct {
+ HReg base;
+ HReg index;
+ } RR;
+ } Mam;
+} MIPSAMode;
+
+extern MIPSAMode *MIPSAMode_IR(Int, HReg);
+extern MIPSAMode *MIPSAMode_RR(HReg, HReg);
+
+extern MIPSAMode *dopyMIPSAMode(MIPSAMode *);
+extern MIPSAMode *nextMIPSAModeFloat(MIPSAMode *);
+extern MIPSAMode *nextMIPSAModeInt(MIPSAMode *);
+
+extern void ppMIPSAMode(MIPSAMode *, Bool);
+
+/* --------- Operand, which can be a reg or a u16/s16. --------- */
+/* ("RH" == "Register or Halfword immediate") */
+typedef enum {
+ Mrh_Imm,
+ Mrh_Reg
+} MIPSRHTag;
+
+typedef struct {
+ MIPSRHTag tag;
+ union {
+ struct {
+ Bool syned;
+ UShort imm16;
+ } Imm;
+ struct {
+ HReg reg;
+ } Reg;
+ } Mrh;
+} MIPSRH;
+
+extern void ppMIPSRH(MIPSRH *, Bool);
+
+extern MIPSRH *MIPSRH_Imm(Bool, UShort);
+extern MIPSRH *MIPSRH_Reg(HReg);
+
+/* --- Addressing Mode suitable for VFP --- */
+typedef struct {
+ HReg reg;
+ Int simm11;
+} MIPSAModeV;
+
+extern MIPSAModeV *mkMIPSAModeV(HReg reg, Int simm11);
+
+extern void ppMIPSAModeV(MIPSAModeV *);
+
+/* --------- Reg or imm-8x4 operands --------- */
+/* a.k.a (a very restricted form of) Shifter Operand,
+ in the MIPS parlance. */
+
+typedef enum {
+ MIPSri84_I84 = 5, /* imm8 `ror` (2 * imm4) */
+ MIPSri84_R /* reg */
+} MIPSRI84Tag;
+
+typedef struct {
+ MIPSRI84Tag tag;
+ union {
+ struct {
+ UShort imm8;
+ UShort imm4;
+ } I84;
+ struct {
+ HReg reg;
+ } R;
+ } MIPSri84;
+} MIPSRI84;
+
+extern MIPSRI84 *MIPSRI84_I84(UShort imm8, UShort imm4);
+extern MIPSRI84 *MIPSRI84_R(HReg);
+
+extern void ppMIPSRI84(MIPSRI84 *);
+
+/* --------- Reg or imm5 operands --------- */
+typedef enum {
+ MIPSri5_I5 = 7, /* imm5, 1 .. 31 only (no zero!) */
+ MIPSri5_R /* reg */
+} MIPSRI5Tag;
+
+typedef struct {
+ MIPSRI5Tag tag;
+ union {
+ struct {
+ UInt imm5;
+ } I5;
+ struct {
+ HReg reg;
+ } R;
+ } MIPSri5;
+} MIPSRI5;
+
+extern MIPSRI5 *MIPSRI5_I5(UInt imm5);
+extern MIPSRI5 *MIPSRI5_R(HReg);
+
+extern void ppMIPSRI5(MIPSRI5 *);
+
+/* --------- Instructions. --------- */
+
+/*Tags for operations*/
+
+/* --------- */
+typedef enum {
+ Mun_CLO,
+ Mun_CLZ,
+ Mun_NOP,
+} MIPSUnaryOp;
+
+extern HChar *showMIPSUnaryOp(MIPSUnaryOp);
+/* --------- */
+
+/* --------- */
+
+typedef enum {
+ Malu_INVALID,
+ Malu_ADD, Malu_SUB,
+ Malu_AND, Malu_OR, Malu_NOR, Malu_XOR,
+} MIPSAluOp;
+
+extern HChar *showMIPSAluOp(MIPSAluOp,
+ Bool /* is the 2nd operand an immediate? */ );
+
+/* --------- */
+typedef enum {
+ Mshft_INVALID,
+ Mshft_SLL, Mshft_SRL,
+ Mshft_SRA
+} MIPSShftOp;
+
+extern HChar *showMIPSShftOp(MIPSShftOp,
+ Bool /* is the 2nd operand an immediate? */ ,
+ Bool /* is this a 32bit or 64bit op? */ );
+
+/* --------- */
+typedef enum {
+ Macc_ADD,
+ Macc_SUB
+} MIPSMaccOp;
+
+extern HChar *showMIPSMaccOp(MIPSMaccOp, Bool);
+/* --------- */
+
+/* ----- Instruction tags ----- */
+typedef enum {
+ Min_LI, /* load word (32/64-bit) immediate (fake insn) */
+ Min_Alu, /* word add/sub/and/or/xor/nor/others? */
+ Min_Shft, /* word sll/srl/sra */
+ Min_Unary, /* clo, clz, nop, neg */
+
+ Min_Cmp, /* word compare (fake insn) */
+
+ Min_Mul, /* widening/non-widening multiply */
+ Min_Div, /* div */
+
+ Min_Call, /* call to address in register */
+
+ /* The following 5 insns are mandated by translation chaining */
+ Min_XDirect, /* direct transfer to GA */
+ Min_XIndir, /* indirect transfer to GA */
+ Min_XAssisted, /* assisted transfer to GA */
+ Min_EvCheck, /* Event check */
+ Min_ProfInc, /* 64-bit profile counter increment */
+
+ Min_RdWrLR, /* Read/Write Link Register */
+ Min_Mthi, /* Move to HI from GP register */
+ Min_Mtlo, /* Move to LO from GP register */
+ Min_Mfhi, /* Move from HI to GP register */
+ Min_Mflo, /* Move from LO to GP register */
+ Min_Macc, /* Multiply and accumulate */
+
+ Min_Load, /* zero-extending load a 8|16|32 bit value from mem */
+ Min_Store, /* store a 8|16|32 bit value to mem */
+ Min_LoadL, /* mips Load Linked Word */
+ Min_StoreC, /* mips Store Conditional Word */
+
+ Min_FpUnary, /* FP unary op */
+ Min_FpBinary, /* FP binary op */
+ Min_FpConvert, /* FP conversion op */
+ Min_FpMulAcc, /* FP multipy-accumulate style op */
+ Min_FpLdSt, /* FP load/store */
+ Min_FpSTFIW, /* stfiwx */
+ Min_FpRSP, /* FP round IEEE754 double to IEEE754 single */
+ Min_FpCftI, /* fcfid/fctid/fctiw */
+ Min_FpCMov, /* FP floating point conditional move */
+ Min_MtFCSR, /* set FCSR register */
+ Min_MfFCSR, /* get FCSR register */
+ Min_FpCompare, /* FP compare, generating value into int reg */
+ Min_MovCond
+} MIPSInstrTag;
+
+/* --------- */
+typedef enum {
+ Mfp_INVALID,
+
+ /* Ternary */
+ Mfp_MADDD, Mfp_MSUBD,
+ Mfp_MADDS, Mfp_MSUBS,
+
+ /* Binary */
+ Mfp_ADDD, Mfp_SUBD, Mfp_MULD, Mfp_DIVD,
+ Mfp_ADDS, Mfp_SUBS, Mfp_MULS, Mfp_DIVS, Mfp_CVTSD, Mfp_CVTSW, Mfp_CVTWD,
+ Mfp_CVTWS, Mfp_TRULS, Mfp_TRULD, Mfp_TRUWS, Mfp_TRUWD, Mfp_FLOORWS,
+ Mfp_FLOORWD, Mfp_ROUNDWS, Mfp_ROUNDWD, Mfp_CVTDW, Mfp_CMP,
+ Mfp_CEILWS, Mfp_CEILWD, Mfp_CEILLS, Mfp_CEILLD,
+
+ /* Unary */
+ Mfp_SQRTS, Mfp_SQRTD, Mfp_RSQRTS, Mfp_RSQRTD, Mfp_RECIPS, Mfp_RECIPD,
+ Mfp_ABSS, Mfp_ABSD, Mfp_NEGS, Mfp_NEGD, Mfp_MOVS, Mfp_MOVD,
+ Mfp_RES, Mfp_RSQRTE, Mfp_FRIN, Mfp_FRIM, Mfp_FRIP, Mfp_FRIZ, Mfp_CVTD
+} MIPSFpOp;
+
+extern HChar *showMIPSFpOp(MIPSFpOp);
+
+/*--------- Structure for instructions ----------*/
+/* Destinations are on the LEFT (first operand) */
+
+typedef struct {
+ MIPSInstrTag tag;
+ union {
+ /* Get a 32/64-bit literal into a register.
+ May turn into a number of real insns. */
+ struct {
+ HReg dst;
+ ULong imm;
+ } LI;
+ /* Integer add/sub/and/or/xor. Limitations:
+ - For add, the immediate, if it exists, is a signed 16.
+ - For sub, the immediate, if it exists, is a signed 16
+ which may not be -32768, since no such instruction
+ exists, and so we have to emit addi with +32768, but
+ that is not possible.
+ - For and/or/xor, the immediate, if it exists,
+ is an unsigned 16.
+ */
+ struct {
+ MIPSAluOp op;
+ HReg dst;
+ HReg srcL;
+ MIPSRH *srcR;
+ } Alu;
+ /* Integer shl/shr/sar.
+ Limitations: the immediate, if it exists,
+ is a signed 5-bit value between 1 and 31 inclusive.
+ */
+ struct {
+ MIPSShftOp op;
+ Bool sz32; /* mode64 has both 32 and 64bit shft */
+ HReg dst;
+ HReg srcL;
+ MIPSRH *srcR;
+ } Shft;
+ /* Clz, Clo, nop */
+ struct {
+ MIPSUnaryOp op;
+ HReg dst;
+ HReg src;
+ } Unary;
+ /* Word compare. Fake instruction, used for basic block ending */
+ struct {
+ Bool syned;
+ Bool sz32;
+ HReg dst;
+ HReg srcL;
+ HReg srcR;
+
+ MIPSCondCode cond;
+ } Cmp;
+ struct {
+ Bool widening; //True => widening, False => non-widening
+ Bool syned; //signed/unsigned - meaningless if widenind = False
+ Bool sz32;
+ HReg dst;
+ HReg srcL;
+ HReg srcR;
+ } Mul;
+ struct {
+ Bool syned; //signed/unsigned - meaningless if widenind = False
+ Bool sz32;
+ HReg srcL;
+ HReg srcR;
+ } Div;
+ /* Pseudo-insn. Call target (an absolute address), on given
+ condition (which could be Mcc_ALWAYS). argiregs indicates
+ which of r3 .. r10
+ carries argument values for this call,
+ using a bit mask (1<<N is set if rN holds an arg, for N in
+ 3 .. 10 inclusive).
+ If cond is != Mcc_ALWAYS, src is checked.
+ Otherwise, unconditional call */
+ struct {
+ MIPSCondCode cond;
+ Addr32 target;
+ UInt argiregs;
+ HReg src;
+ } Call;
+ /* Update the guest EIP value, then exit requesting to chain
+ to it. May be conditional. Urr, use of Addr32 implicitly
+ assumes that wordsize(guest) == wordsize(host). */
+ struct {
+ Addr32 dstGA; /* next guest address */
+ MIPSAMode* amPC; /* amode in guest state for PC */
+ MIPSCondCode cond; /* can be MIPScc_AL */
+ Bool toFastEP; /* chain to the slow or fast point? */
+ } XDirect;
+ /* Boring transfer to a guest address not known at JIT time.
+ Not chainable. May be conditional. */
+ struct {
+ HReg dstGA;
+ MIPSAMode* amPC;
+ MIPSCondCode cond; /* can be MIPScc_AL */
+ } XIndir;
+ /* Assisted transfer to a guest address, most general case.
+ Not chainable. May be conditional. */
+ struct {
+ HReg dstGA;
+ MIPSAMode* amPC;
+ MIPSCondCode cond; /* can be MIPScc_AL */
+ IRJumpKind jk;
+ } XAssisted;
+ /* Zero extending loads. Dst size is host word size */
+ struct {
+ UChar sz; /* 1|2|4|8 */
+ HReg dst;
+ MIPSAMode *src;
+ } Load;
+ /* 64/32/16/8 bit stores */
+ struct {
+ UChar sz; /* 1|2|4|8 */
+ MIPSAMode *dst;
+ HReg src;
+ } Store;
+ struct {
+ UChar sz; /* 4|8 */
+ HReg dst;
+ MIPSAMode *src;
+ } LoadL;
+ struct {
+ UChar sz; /* 4|8 */
+ MIPSAMode *dst;
+ HReg src;
+ } StoreC;
+ /* Move from HI/LO register to GP register. */
+ struct {
+ HReg dst;
+ } MfHL;
+
+ /* Move to HI/LO register from GP register. */
+ struct {
+ HReg src;
+ } MtHL;
+
+ /* Read/Write Link Register */
+ struct {
+ Bool wrLR;
+ HReg gpr;
+ } RdWrLR;
+
+ /* MIPS Multiply and accumulate instructions. */
+ struct {
+ MIPSMaccOp op;
+ Bool syned;
+
+ HReg srcL;
+ HReg srcR;
+ } Macc;
+
+ /* MIPS Floating point */
+ struct {
+ MIPSFpOp op;
+ HReg dst;
+ HReg src;
+ } FpUnary;
+ struct {
+ MIPSFpOp op;
+ HReg dst;
+ HReg srcL;
+ HReg srcR;
+ } FpBinary;
+ struct {
+ MIPSFpOp op;
+ HReg dst;
+ HReg srcML;
+ HReg srcMR;
+ HReg srcAcc;
+ } FpMulAcc;
+ struct {
+ Bool isLoad;
+ UChar sz; /* only 4 (IEEE single) or 8 (IEEE double) */
+ HReg reg;
+ MIPSAMode *addr;
+ } FpLdSt;
+
+ struct {
+ MIPSFpOp op;
+ HReg dst;
+ HReg src;
+ } FpConvert;
+ struct {
+ MIPSFpOp op;
+ HReg dst;
+ HReg srcL;
+ HReg srcR;
+ UChar cond1;
+ } FpCompare;
+ struct {
+ MIPSFpOp op;
+ HReg dst;
+ HReg srcL;
+ MIPSRH *srcR;
+ HReg condR;
+ MIPSCondCode cond;
+ } MovCond;
+ /* Move from GP register to FCSR register. */
+ struct {
+ HReg src;
+ } MtFCSR;
+ /* Move from FCSR register to GP register. */
+ struct {
+ HReg dst;
+ } MfFCSR;
+ struct {
+ MIPSAMode* amCounter;
+ MIPSAMode* amFailAddr;
+ } EvCheck;
+ struct {
+ /* No fields. The address of the counter to inc is
+ installed later, post-translation, by patching it in,
+ as it is not known at translation time. */
+ } ProfInc;
+
+ } Min;
+} MIPSInstr;
+
+extern MIPSInstr *MIPSInstr_LI(HReg, ULong);
+extern MIPSInstr *MIPSInstr_Alu(MIPSAluOp, HReg, HReg, MIPSRH *);
+extern MIPSInstr *MIPSInstr_Shft(MIPSShftOp, Bool sz32, HReg, HReg, MIPSRH *);
+extern MIPSInstr *MIPSInstr_Unary(MIPSUnaryOp op, HReg dst, HReg src);
+extern MIPSInstr *MIPSInstr_Cmp(Bool, Bool, HReg, HReg, HReg, MIPSCondCode);
+
+extern MIPSInstr *MIPSInstr_Mul(Bool syned, Bool hi32, Bool sz32, HReg,
+ HReg, HReg);
+extern MIPSInstr *MIPSInstr_Div(Bool syned, Bool sz32, HReg, HReg);
+extern MIPSInstr *MIPSInstr_Madd(Bool, HReg, HReg);
+extern MIPSInstr *MIPSInstr_Msub(Bool, HReg, HReg);
+
+extern MIPSInstr *MIPSInstr_Load(UChar sz, HReg dst, MIPSAMode * src,
+ Bool mode64);
+extern MIPSInstr *MIPSInstr_Store(UChar sz, MIPSAMode * dst, HReg src,
+ Bool mode64);
+
+extern MIPSInstr *MIPSInstr_LoadL(UChar sz, HReg dst, MIPSAMode * src,
+ Bool mode64);
+extern MIPSInstr *MIPSInstr_StoreC(UChar sz, MIPSAMode * dst, HReg src,
+ Bool mode64);
+
+extern MIPSInstr *MIPSInstr_Call(MIPSCondCode, Addr32, UInt, HReg);
+extern MIPSInstr *MIPSInstr_CallAlways(MIPSCondCode, Addr32, UInt);
+
+extern MIPSInstr *MIPSInstr_XDirect(Addr32 dstGA, MIPSAMode* amPC,
+ MIPSCondCode cond, Bool toFastEP);
+extern MIPSInstr *MIPSInstr_XIndir(HReg dstGA, MIPSAMode* amPC,
+ MIPSCondCode cond);
+extern MIPSInstr *MIPSInstr_XAssisted(HReg dstGA, MIPSAMode* amPC,
+ MIPSCondCode cond, IRJumpKind jk);
+
+extern MIPSInstr *MIPSInstr_FpUnary(MIPSFpOp op, HReg dst, HReg src);
+extern MIPSInstr *MIPSInstr_FpBinary(MIPSFpOp op, HReg dst, HReg srcL,
+ HReg srcR);
+extern MIPSInstr *MIPSInstr_FpConvert(MIPSFpOp op, HReg dst, HReg src);
+extern MIPSInstr *MIPSInstr_FpCompare(MIPSFpOp op, HReg dst, HReg srcL,
+ HReg srcR, UChar cond1);
+extern MIPSInstr *MIPSInstr_FpMulAcc(MIPSFpOp op, HReg dst, HReg srcML,
+ HReg srcMR, HReg srcAcc);
+extern MIPSInstr *MIPSInstr_FpLdSt(Bool isLoad, UChar sz, HReg, MIPSAMode *);
+extern MIPSInstr *MIPSInstr_FpSTFIW(HReg addr, HReg data);
+extern MIPSInstr *MIPSInstr_FpRSP(HReg dst, HReg src);
+extern MIPSInstr *MIPSInstr_FpCftI(Bool fromI, Bool int32, HReg dst, HReg src);
+extern MIPSInstr *MIPSInstr_FpCMov(MIPSCondCode, HReg dst, HReg src);
+extern MIPSInstr *MIPSInstr_MtFCSR(HReg src);
+extern MIPSInstr *MIPSInstr_MfFCSR(HReg dst);
+extern MIPSInstr *MIPSInstr_FpCmp(HReg dst, HReg srcL, HReg srcR);
+
+extern MIPSInstr *MIPSInstr_Mfhi(HReg dst);
+extern MIPSInstr *MIPSInstr_Mflo(HReg dst);
+extern MIPSInstr *MIPSInstr_Mthi(HReg src);
+extern MIPSInstr *MIPSInstr_Mtlo(HReg src);
+
+extern MIPSInstr *MIPSInstr_RdWrLR(Bool wrLR, HReg gpr);
+
+// srcL will be copied if !condR
+extern MIPSInstr *MIPSInstr_MovCond(HReg dst, HReg srcL, MIPSRH * src,
+ HReg condR, MIPSCondCode cond);
+
+extern MIPSInstr *MIPSInstr_EvCheck(MIPSAMode* amCounter,
+ MIPSAMode* amFailAddr );
+extern MIPSInstr *MIPSInstr_ProfInc( void );
+
+extern void ppMIPSInstr(MIPSInstr *, Bool mode64);
+
+/* Some functions that insulate the register allocator from details
+ of the underlying instruction set. */
+extern void getRegUsage_MIPSInstr (HRegUsage *, MIPSInstr *, Bool);
+extern void mapRegs_MIPSInstr (HRegRemap *, MIPSInstr *, Bool mode64);
+extern Bool isMove_MIPSInstr (MIPSInstr *, HReg *, HReg *);
+extern Int emit_MIPSInstr (/*MB_MOD*/Bool* is_profInc,
+ UChar* buf, Int nbuf, MIPSInstr* i,
+ Bool mode64,
+ void* disp_cp_chain_me_to_slowEP,
+ void* disp_cp_chain_me_to_fastEP,
+ void* disp_cp_xindir,
+ void* disp_cp_xassisted );
+
+extern void genSpill_MIPS ( /*OUT*/ HInstr ** i1, /*OUT*/ HInstr ** i2,
+ HReg rreg, Int offset, Bool);
+extern void genReload_MIPS( /*OUT*/ HInstr ** i1, /*OUT*/ HInstr ** i2,
+ HReg rreg, Int offset, Bool);
+
+extern void getAllocableRegs_MIPS (Int *, HReg **, Bool mode64);
+extern HInstrArray *iselSB_MIPS ( IRSB*,
+ VexArch,
+ VexArchInfo*,
+ VexAbiInfo*,
+ Int offs_Host_EvC_Counter,
+ Int offs_Host_EvC_FailAddr,
+ Bool chainingAllowed,
+ Bool addProfInc,
+ Addr64 max_ga );
+
+/* How big is an event check? This is kind of a kludge because it
+ depends on the offsets of host_EvC_FAILADDR and host_EvC_COUNTER,
+ and so assumes that they are both <= 128, and so can use the short
+ offset encoding. This is all checked with assertions, so in the
+ worst case we will merely assert at startup. */
+extern Int evCheckSzB_MIPS ( void );
+
+/* Perform a chaining and unchaining of an XDirect jump. */
+extern VexInvalRange chainXDirect_MIPS ( void* place_to_chain,
+ void* disp_cp_chain_me_EXPECTED,
+ void* place_to_jump_to,
+ Bool mode64 );
+
+extern VexInvalRange unchainXDirect_MIPS ( void* place_to_unchain,
+ void* place_to_jump_to_EXPECTED,
+ void* disp_cp_chain_me,
+ Bool mode64 );
+
+/* Patch the counter location into an existing ProfInc point. */
+extern VexInvalRange patchProfInc_MIPS ( void* place_to_patch,
+ ULong* location_of_counter,
+ Bool mode64 );
+
+#endif /* ndef __LIBVEX_HOST_MIPS_HDEFS_H */
+
+/*---------------------------------------------------------------*/
+/*--- end host-mips_defs.h ---*/
+/*---------------------------------------------------------------*/
Added: trunk/priv/host_mips_defs.c (+4048 -0)
===================================================================
--- trunk/priv/host_mips_defs.c 2012-06-07 09:51:02 +01:00 (rev 2375)
+++ trunk/priv/host_mips_defs.c 2012-06-07 09:59:53 +01:00 (rev 2376)
@@ -0,0 +1,4048 @@
+
+/*---------------------------------------------------------------*/
+/*--- begin host_mips_defs.c ---*/
+/*---------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2010-2012 RT-RK
+ mip...@rt...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#include "libvex_basictypes.h"
+#include "libvex.h"
+#include "libvex_trc_values.h"
+
+#include "main_util.h"
+#include "host_generic_regs.h"
+#include "host_mips_defs.h"
+
+/*---------------- Registers ----------------*/
+
+void ppHRegMIPS(HReg reg, Bool mode64)
+{
+ Int r;
+ static HChar *ireg32_names[35]
+ = { "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
+ "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15",
+ "$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",
+ "$24", "$25", "$26", "$27", "$28", "$29", "$30", "$31",
+ "%32", "%33", "%34",
+ };
+
+ static HChar *freg32_names[32]
+ = { "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", "$f7",
+ "$f8", "$f9", "$f10", "$f11", "$f12", "$f13", "$f14", "$f15",
+ "$f16", "$f17", "$f18", "$f19", "$f20", "$f21", "$f22", "$f23",
+ "$f24", "$f25", "$f26", "$f27", "$f28", "$f29", "f30", "$f31"
+ };
+
+ static HChar *freg64_names[32]
+ = { "$d0", "$d1", "$d2", "$d3", "$d4", "$d5", "$d6", "$d7",
+ "$d8", "$d9", "$d10", "$d11", "$d12", "$d13", "$d14", "$d15",
+ };
+
+ /* Be generic for all virtual regs. */
+ if (hregIsVirtual(reg)) {
+ ppHReg(reg);
+ return;
+ }
+
+ /* But specific for real regs. */
+ vassert(hregClass(reg) == HRcInt32 || hregClass(reg) == HRcInt64 ||
+ hregClass(reg) == HRcFlt32 || hregClass(reg) == HRcFlt64);
+
+ /* But specific for real regs. */
+ {
+ switch (hregClass(reg)) {
+ case HRcInt32:
+ r = hregNumber(reg);
+ vassert(r >= 0 && r < 32);
+ vex_printf("%s", ireg32_names[r]);
+ return;
+ case HRcFlt32:
+ r = hregNumber(reg);
+ vassert(r >= 0 && r < 32);
+ vex_printf("%s", freg32_names[r]);
+ return;
+ case HRcFlt64:
+ r = hregNumber(reg);
+ vassert(r >= 0 && r < 32);
+ vex_printf("%s", freg64_names[r]);
+ return;
+ default:
+ vpanic("ppHRegMIPS");
+ break;
+ }
+ }
+
+ return;
+}
+
+#define MkHRegGPR(_n, _mode64) \
+ mkHReg(_n, _mode64 ? HRcInt64 : HRcInt32, False)
+
+HReg hregMIPS_GPR0(Bool mode64)
+{
+ return MkHRegGPR(0, mode64);
+}
+
+HReg hregMIPS_GPR1(Bool mode64)
+{
+ return MkHRegGPR(1, mode64);
+}
+
+HReg hregMIPS_GPR2(Bool mode64)
+{
+ return MkHRegGPR(2, mode64);
+}
+
+HReg hregMIPS_GPR3(Bool mode64)
+{
+ return MkHRegGPR(3, mode64);
+}
+
+HReg hregMIPS_GPR4(Bool mode64)
+{
+ return MkHRegGPR(4, mode64);
+}
+
+HReg hregMIPS_GPR5(Bool mode64)
+{
+ return MkHRegGPR(5, mode64);
+}
+
+HReg hregMIPS_GPR6(Bool mode64)
+{
+ return MkHRegGPR(6, mode64);
+}
+
+HReg hregMIPS_GPR7(Bool mode64)
+{
+ return MkHRegGPR(7, mode64);
+}
+
+HReg hregMIPS_GPR8(Bool mode64)
+{
+ return MkHRegGPR(8, mode64);
+}
+
+HReg hregMIPS_GPR9(Bool mode64)
+{
+ return MkHRegGPR(9, mode64);
+}
+
+HReg hregMIPS_GPR10(Bool mode64)
+{
+ return MkHRegGPR(10, mode64);
+}
+
+HReg hregMIPS_GPR11(Bool mode64)
+{
+ return MkHRegGPR(11, mode64);
+}
+
+HReg hregMIPS_GPR12(Bool mode64)
+{
+ return MkHRegGPR(12, mode64);
+}
+
+HReg hregMIPS_GPR13(Bool mode64)
+{
+ return MkHRegGPR(13, mode64);
+}
+
+HReg hregMIPS_GPR14(Bool mode64)
+{
+ return MkHRegGPR(14, mode64);
+}
+
+HReg hregMIPS_GPR15(Bool mode64)
+{
+ return MkHRegGPR(15, mode64);
+}
+
+HReg hregMIPS_GPR16(Bool mode64)
+{
+ return MkHRegGPR(16, mode64);
+}
+
+HReg hregMIPS_GPR17(Bool mode64)
+{
+ return MkHRegGPR(17, mode64);
+}
+
+HReg hregMIPS_GPR18(Bool mode64)
+{
+ return MkHRegGPR(18, mode64);
+}
+
+HReg hregMIPS_GPR19(Bool mode64)
+{
+ return MkHRegGPR(19, mode64);
+}
+
+HReg hregMIPS_GPR20(Bool mode64)
+{
+ return MkHRegGPR(20, mode64);
+}
+
+HReg hregMIPS_GPR21(Bool mode64)
+{
+ return MkHRegGPR(21, mode64);
+}
+
+HReg hregMIPS_GPR22(Bool mode64)
+{
+ return MkHRegGPR(22, mode64);
+}
+
+HReg hregMIPS_GPR23(Bool mode64)
+{
+ return MkHRegGPR(23, mode64);
+}
+
+HReg hregMIPS_GPR24(Bool mode64)
+{
+ return MkHRegGPR(24, mode64);
+}
+
+HReg hregMIPS_GPR25(Bool mode64)
+{
+ return MkHRegGPR(25, mode64);
+}
+
+HReg hregMIPS_GPR26(Bool mode64)
+{
+ return MkHRegGPR(26, mode64);
+}
+
+HReg hregMIPS_GPR27(Bool mode64)
+{
+ return MkHRegGPR(27, mode64);
+}
+
+HReg hregMIPS_GPR28(Bool mode64)
+{
+ return MkHRegGPR(28, mode64);
+}
+
+HReg hregMIPS_GPR29(Bool mode64)
+{
+ return MkHRegGPR(29, mode64);
+}
+
+HReg hregMIPS_GPR30(Bool mode64)
+{
+ return MkHRegGPR(30, mode64);
+}
+
+HReg hregMIPS_GPR31(Bool mode64)
+{
+ return MkHRegGPR(31, mode64);
+}
+
+#define MkHRegFPR(_n, _mode64) \
+ mkHReg(_n, _mode64 ? HRcFlt64 : HRcFlt32, False)
+
+HReg hregMIPS_F0(Bool mode64)
+{
+ return MkHRegFPR(0, mode64);
+}
+
+HReg hregMIPS_F1(Bool mode64)
+{
+ return MkHRegFPR(1, mode64);
+}
+
+HReg hregMIPS_F2(Bool mode64)
+{
+ return MkHRegFPR(2, mode64);
+}
+
+HReg hregMIPS_F3(Bool mode64)
+{
+ return MkHRegFPR(3, mode64);
+}
+
+HReg hregMIPS_F4(Bool mode64)
+{
+ return MkHRegFPR(4, mode64);
+}
+
+HReg hregMIPS_F5(Bool mode64)
+{
+ return MkHRegFPR(5, mode64);
+}
+
+HReg hregMIPS_F6(Bool mode64)
+{
+ return MkHRegFPR(6, mode64);
+}
+
+HReg hregMIPS_F7(Bool mode64)
+{
+ return MkHRegFPR(7, mode64);
+}
+
+HReg hregMIPS_F8(Bool mode64)
+{
+ return MkHRegFPR(8, mode64);
+}
+
+HReg hregMIPS_F9(Bool mode64)
+{
+ return MkHRegFPR(9, mode64);
+}
+
+HReg hregMIPS_F10(Bool mode64)
+{
+ return MkHRegFPR(10, mode64);
+}
+
+HReg hregMIPS_F11(Bool mode64)
+{
+ return MkHRegFPR(11, mode64);
+}
+
+HReg hregMIPS_F12(Bool mode64)
+{
+ return MkHRegFPR(12, mode64);
+}
+
+HReg hregMIPS_F13(Bool mode64)
+{
+ return MkHRegFPR(13, mode64);
+}
+
+HReg hregMIPS_F14(Bool mode64)
+{
+ return MkHRegFPR(14, mode64);
+}
+
+HReg hregMIPS_F15(Bool mode64)
+{
+ return MkHRegFPR(15, mode64);
+}
+
+HReg hregMIPS_F16(Bool mode64)
+{
+ return MkHRegFPR(16, mode64);
+}
+
+HReg hregMIPS_F17(Bool mode64)
+{
+ return MkHRegFPR(17, mode64);
+}
+
+HReg hregMIPS_F18(Bool mode64)
+{
+ return MkHRegFPR(18, mode64);
+}
+
+HReg hregMIPS_F19(Bool mode64)
+{
+ return MkHRegFPR(19, mode64);
+}
+
+HReg hregMIPS_F20(Bool mode64)
+{
+ return MkHRegFPR(20, mode64);
+}
+
+HReg hregMIPS_F21(Bool mode64)
+{
+ return MkHRegFPR(21, mode64);
+}
+
+HReg hregMIPS_F22(Bool mode64)
+{
+ return MkHRegFPR(22, mode64);
+}
+
+HReg hregMIPS_F23(Bool mode64)
+{
+ return MkHRegFPR(23, mode64);
+}
+
+HReg hregMIPS_F24(Bool mode64)
+{
+ return MkHRegFPR(24, mode64);
+}
+
+HReg hregMIPS_F25(Bool mode64)
+{
+ return MkHRegFPR(25, mode64);
+}
+
+HReg hregMIPS_F26(Bool mode64)
+{
+ return MkHRegFPR(26, mode64);
+}
+
+HReg hregMIPS_F27(Bool mode64)
+{
+ return MkHRegFPR(27, mode64);
+}
+
+HReg hregMIPS_F28(Bool mode64)
+{
+ return MkHRegFPR(28, mode64);
+}
+
+HReg hregMIPS_F29(Bool mode64)
+{
+ return MkHRegFPR(29, mode64);
+}
+
+HReg hregMIPS_F30(Bool mode64)
+{
+ return MkHRegFPR(30, mode64);
+}
+
+HReg hregMIPS_F31(Bool mode64)
+{
+ return MkHRegFPR(31, mode64);
+}
+
+HReg hregMIPS_PC(Bool mode64)
+{
+ return mkHReg(32, mode64 ? HRcFlt64 : HRcFlt32, False);
+}
+
+HReg hregMIPS_HI(Bool mode64)
+{
+ return mkHReg(33, mode64 ? HRcFlt64 : HRcFlt32, False);
+}
+
+HReg hregMIPS_LO(Bool mode64)
+{
+ return mkHReg(34, mode64 ? HRcFlt64 : HRcFlt32, False);
+}
+
+HReg hregMIPS_D0(void)
+{
+ return mkHReg(0, HRcFlt64, False);
+}
+
+HReg hregMIPS_D1(void)
+{
+ return mkHReg(2, HRcFlt64, False);
+}
+
+HReg hregMIPS_D2(void)
+{
+ return mkHReg(4, HRcFlt64, False);
+}
+
+HReg hregMIPS_D3(void)
+{
+ return mkHReg(6, HRcFlt64, False);
+}
+
+HReg hregMIPS_D4(void)
+{
+ return mkHReg(8, HRcFlt64, False);
+}
+
+HReg hregMIPS_D5(void)
+{
+ return mkHReg(10, HRcFlt64, False);
+}
+
+HReg hregMIPS_D6(void)
+{
+ return mkHReg(12, HRcFlt64, False);
+}
+
+HReg hregMIPS_D7(void)
+{
+ return mkHReg(14, HRcFlt64, False);
+}
+
+HReg hregMIPS_D8(void)
+{
+ return mkHReg(16, HRcFlt64, False);
+}
+
+HReg hregMIPS_D9(void)
+{
+ return mkHReg(18, HRcFlt64, False);
+}
+
+HReg hregMIPS_D10(void)
+{
+ return mkHReg(20, HRcFlt64, False);
+}
+
+HReg hregMIPS_D11(void)
+{
+ return mkHReg(22, HRcFlt64, False);
+}
+
+HReg hregMIPS_D12(void)
+{
+ return mkHReg(24, HRcFlt64, False);
+}
+
+HReg hregMIPS_D13(void)
+{
+ return mkHReg(26, HRcFlt64, False);
+}
+
+HReg hregMIPS_D14(void)
+{
+ return mkHReg(28, HRcFlt64, False);
+}
+
+HReg hregMIPS_D15(void)
+{
+ return mkHReg(30, HRcFlt64, False);
+}
+
+HReg hregMIPS_FIR(void)
+{
+ return mkHReg(35, HRcInt32, False);
+}
+
+HReg hregMIPS_FCCR(void)
+{
+ return mkHReg(36, HRcInt32, False);
+}
+
+HReg hregMIPS_FEXR(void)
+{
+ return mkHReg(37, HRcInt32, False);
+}
+
+HReg hregMIPS_FENR(void)
+{
+ return mkHReg(38, HRcInt32, False);
+}
+
+HReg hregMIPS_FCSR(void)
+{
+ return mkHReg(39, HRcInt32, False);
+}
+
+HReg hregMIPS_COND(void)
+{
+ return mkHReg(47, HRcInt32, False);
+}
+
+void getAllocableRegs_MIPS(Int * nregs, HReg ** arr, Bool mode64)
+{
+ if (mode64)
+ *nregs = 27;
+ else
+ *nregs = 34;
+ UInt i = 0;
+ *arr = LibVEX_Alloc(*nregs * sizeof(HReg));
+
+ //ZERO = constant 0
+ //AT = assembler temporary
+ // callee saves ones are listed first, since we prefer them
+ // if they're available
+ (*arr)[i++] = hregMIPS_GPR16(mode64);
+ (*arr)[i++] = hregMIPS_GPR17(mode64);
+ (*arr)[i++] = hregMIPS_GPR18(mode64);
+ (*arr)[i++] = hregMIPS_GPR19(mode64);
+ (*arr)[i++] = hregMIPS_GPR20(mode64);
+ (*arr)[i++] = hregMIPS_GPR21(mode64);
+ (*arr)[i++] = hregMIPS_GPR22(mode64);
+ if (!mode64)
+ (*arr)[i++] = hregMIPS_GPR23(mode64);
+
+ // otherwise we'll have to slum it out with caller-saves ones
+ if (mode64) {
+ (*arr)[i++] = hregMIPS_GPR8(mode64);
+ (*arr)[i++] = hregMIPS_GPR9(mode64);
+ (*arr)[i++] = hregMIPS_GPR10(mode64);
+ (*arr)[i++] = hregMIPS_GPR11(mode64);
+ }
+ (*arr)[i++] = hregMIPS_GPR12(mode64);
+ (*arr)[i++] = hregMIPS_GPR13(mode64);
+ (*arr)[i++] = hregMIPS_GPR14(mode64);
+ (*arr)[i++] = hregMIPS_GPR15(mode64);
+ (*arr)[i++] = hregMIPS_GPR24(mode64);
+ /***********mips32********************/
+ // t0 (=dispatch_ctr)
+ // t1 spill reg temp
+ // t2 (=guest_state)
+ // t3 (=PC = next guest address)
+ // K0 and K1 are reserved for OS kernel
+ // GP = global pointer
+ // SP = stack pointer
+ // FP = frame pointer
+ // RA = link register
+ // + PC, HI and LO
+ (*arr)[i++] = hregMIPS_F20(mode64);
+ (*arr)[i++] = hregMIPS_F21(mode64);
+ (*arr)[i++] = hregMIPS_F22(mode64);
+ (*arr)[i++] = hregMIPS_F23(mode64);
+ (*arr)[i++] = hregMIPS_F24(mode64);
+ (*arr)[i++] = hregMIPS_F25(mode64);
+ (*arr)[i++] = hregMIPS_F26(mode64);
+ (*arr)[i++] = hregMIPS_F27(mode64);
+ (*arr)[i++] = hregMIPS_F28(mode64);
+ (*arr)[i++] = hregMIPS_F29(mode64);
+ (*arr)[i++] = hregMIPS_F30(mode64);
+ if (!mode64) {
+ /* Fake double floating point */
+ (*arr)[i++] = hregMIPS_D0();
+ (*arr)[i++] = hregMIPS_D1();
+ (*arr)[i++] = hregMIPS_D2();
+ (*arr)[i++] = hregMIPS_D3();
+ (*arr)[i++] = hregMIPS_D4();
+ (*arr)[i++] = hregMIPS_D5();
+ (*arr)[i++] = hregMIPS_D6();
+ (*arr)[i++] = hregMIPS_D7();
+ (*arr)[i++] = hregMIPS_D8();
+ (*arr)[i++] = hregMIPS_D9();
+ }
+ vassert(i == *nregs);
+
+}
+
+/*----------------- Condition Codes ----------------------*/
+
+HChar *showMIPSCondCode(MIPSCondCode cond)
+{
+ HChar* ret;
+ switch (cond) {
+ case MIPScc_EQ:
+ ret = "EQ"; /* equal */
+ break;
+ case MIPScc_NE:
+ ret = "NEQ"; /* not equal */
+ break;
+ case MIPScc_HS:
+ ret = "GE"; /* >=u (Greater Than or Equal) */
+ break;
+ case MIPScc_LO:
+ ret = "LT"; /* <u (lower) */
+ break;
+ case MIPScc_MI:
+ ret = "mi"; /* minus (negative) */
+ break;
+ case MIPScc_PL:
+ ret = "pl"; /* plus (zero or +ve) */
+ break;
+ case MIPScc_VS:
+ ret = "vs"; /* overflow */
+ break;
+ case MIPScc_VC:
+ ret = "vc"; /* no overflow */
+ break;
+ case MIPScc_HI:
+ ret = "hi"; /* >u (higher) */
+ break;
+ case MIPScc_LS:
+ ret = "ls"; /* <=u (lower or same) */
+ break;
+ case MIPScc_GE:
+ ret = "ge"; /* >=s (signed greater or equal) */
+ break;
+ case MIPScc_LT:
+ ret = "lt"; /* <s (signed less than) */
+ break;
+ case MIPScc_GT:
+ ret = "gt"; /* >s (signed greater) */
+ break;
+ case MIPScc_LE:
+ ret = "le"; /* <=s (signed less or equal) */
+ break;
+ case MIPScc_AL:
+ ret = "al"; /* always (unconditional) */
+ break;
+ case MIPScc_NV:
+ ret = "nv"; /* never (unconditional): */
+ break;
+ default:
+ vpanic("showMIPSCondCode");
+ break;
+ }
+ return ret;
+}
+
+HChar *showMIPSFpOp(MIPSFpOp op)
+{
+ HChar *ret;
+ switch (op) {
+ case Mfp_ADDD:
+ ret = "ADD.D";
+ break;
+ case Mfp_SUBD:
+ ret = "SUB.D";
+ break;
+ case Mfp_MULD:
+ ret = "MUL.D";
+ break;
+ case Mfp_DIVD:
+ ret = "DIV.D";
+ break;
+ case Mfp_MADDD:
+ ret = "MADD.D";
+ break;
+ case Mfp_MSUBD:
+ ret = "MSUB.D";
+ break;
+ case Mfp_MADDS:
+ ret = "MADD.S";
+ break;
+ case Mfp_MSUBS:
+ ret = "MSUB.S";
+ break;
+ case Mfp_ADDS:
+ ret = "ADD.S";
+ break;
+ case Mfp_SUBS:
+ ret = "SUB.S";
+ break;
+ case Mfp_MULS:
+ ret = "MUL.S";
+ break;
+ case Mfp_DIVS:
+ ret = "DIV.S";
+ break;
+ case Mfp_SQRTS:
+ ret = "SQRT.S";
+ break;
+ case Mfp_SQRTD:
+ ret = "SQRT.D";
+ break;
+ case Mfp_RSQRTS:
+ ret = "RSQRT.S";
+ break;
+ case Mfp_RSQRTD:
+ ret = "RSQRT.D";
+ break;
+ case Mfp_RECIPS:
+ ret = "RECIP.S";
+ break;
+ case Mfp_RECIPD:
+ ret = "RECIP.D";
+ break;
+ case Mfp_ABSS:
+ ret = "ABS.S";
+ break;
+ case Mfp_ABSD:
+ ret = "ABS.D";
+ break;
+ case Mfp_NEGS:
+ ret = "NEG.S";
+ break;
+ case Mfp_NEGD:
+ ret = "NEG.D";
+ break;
+ case Mfp_MOVS:
+ ret = "MOV.S";
+ break;
+ case Mfp_MOVD:
+ ret = "MOV.D";
+ break;
+ case Mfp_RES:
+ ret = "RES";
+ break;
+ case Mfp_ROUNDWS:
+ ret = "ROUND.W.S";
+ break;
+ case Mfp_ROUNDWD:
+ ret = "ROUND.W.D";
+ break;
+ case Mfp_FLOORWS:
+ ret = "FLOOR.W.S";
+ break;
+ case Mfp_FLOORWD:
+ ret = "FLOOR.W.D";
+ break;
+ case Mfp_RSQRTE:
+ ret = "frsqrte";
+ break;
+ case Mfp_CVTDW:
+ case Mfp_CVTD:
+ ret = "CVT.D";
+ break;
+ case Mfp_CVTSD:
+ case Mfp_CVTSW:
+ ret = "CVT.S";
+ break;
+ case Mfp_CVTWS:
+ case Mfp_CVTWD:
+ ret = "CVT.W";
+ break;
+ case Mfp_TRUWD:
+ case Mfp_TRUWS:
+ ret = "TRUNC.W";
+ break;
+ case Mfp_TRULD:
+ case Mfp_TRULS:
+ ret = "TRUNC.L";
+ break;
+ case Mfp_CEILWS:
+ case Mfp_CEILWD:
+ ret = "CEIL.W";
+ break;
+ case Mfp_CEILLS:
+ case Mfp_CEILLD:
+ ret = "CEIL.L";
+ break;
+ case Mfp_CMP:
+ ret = "C.cond.d";
+ break;
+ default:
+ vpanic("showMIPSFpOp");
+ break;
+ }
+ return ret;
+}
+
+/* --------- MIPSAMode: memory address expressions. --------- */
+
+MIPSAMode *MIPSAMode_IR(Int idx, HReg base)
+{
+ MIPSAMode *am = LibVEX_Alloc(sizeof(MIPSAMode));
+ am->tag = Mam_IR;
+ am->Mam.IR.base = base;
+ am->Mam.IR.index = idx;
+
+ return am;
+}
+
+MIPSAMode *MIPSAMode_RR(HReg idx, HReg base)
+{
+ MIPSAMode *am = LibVEX_Alloc(sizeof(MIPSAMode));
+ am->tag = Mam_RR;
+ am->Mam.RR.base = base;
+ am->Mam.RR.index = idx;
+
+ return am;
+}
+
+MIPSAMode *dopyMIPSAMode(MIPSAMode * am)
+{
+ MIPSAMode* ret;
+ switch (am->tag) {
+ case Mam_IR:
+ ret = MIPSAMode_IR(am->Mam.IR.index, am->Mam.IR.base);
+ break;
+ case Mam_RR:
+ ret = MIPSAMode_RR(am->Mam.RR.index, am->Mam.RR.base);
+ break;
+ default:
+ vpanic("dopyMIPSAMode");
+ break;
+ }
+ return ret;
+}
+
+MIPSAMode *nextMIPSAModeFloat(MIPSAMode * am)
+{
+ MIPSAMode* ret;
+ switch (am->tag) {
+ case Mam_IR:
+ ret = MIPSAMode_IR(am->Mam.IR.index + 8, am->Mam.IR.base);
+ break;
+ case Mam_RR:
+ ret = MIPSAMode_RR(am->Mam.RR.index + 1, am->Mam.RR.base);
+ break;
+ default:
+ vpanic("dopyMIPSAMode");
+ break;
+ }
+ return ret;
+}
+
+MIPSAMode *nextMIPSAModeInt(MIPSAMode * am)
+{
+ MIPSAMode* ret;
+ switch (am->tag) {
+ case Mam_IR:
+ ret = MIPSAMode_IR(am->Mam.IR.index + 4, am->Mam.IR.base);
+ break;
+ case Mam_RR:
+ ret = MIPSAMode_RR(am->Mam.RR.index + 1, am->Mam.RR.base);
+ break;
+ default:
+ vpanic("dopyMIPSAMode");
+ break;
+ }
+ return ret;
+}
+
+void ppMIPSAMode(MIPSAMode * am, Bool mode64)
+{
+ switch (am->tag) {
+ case Mam_IR:
+ if (am->Mam.IR.index == 0)
+ vex_printf("0(");
+ else
+ vex_printf("%d(", (Int) am->Mam.IR.index);
+ ppHRegMIPS(am->Mam.IR.base, mode64);
+ vex_printf(")");
+ return;
+ case Mam_RR:
+ ppHRegMIPS(am->Mam.RR.base, mode64);
+ vex_printf(", ");
+ ppHRegMIPS(am->Mam.RR.index, mode64);
+ return;
+ default:
+ vpanic("ppMIPSAMode");
+ break;
+ }
+}
+
+static void addRegUsage_MIPSAMode(HRegUsage * u, MIPSAMode * am)
+{
+ switch (am->tag) {
+ case Mam_IR:
+ addHRegUse(u, HRmRead, am->Mam.IR.base);
+ return;
+ case Mam_RR:
+ addHRegUse(u, HRmRead, am->Mam.RR.base);
+ addHRegUse(u, HRmRead, am->Mam.RR.index);
+ return;
+ default:
+ vpanic("addRegUsage_MIPSAMode");
+ break;
+ }
+}
+
+static void mapRegs_MIPSAMode(HRegRemap * m, MIPSAMode * am)
+{
+ switch (am->tag) {
+ case Mam_IR:
+ am->Mam.IR.base = lookupHRegRemap(m, am->Mam.IR.base);
+ return;
+ case Mam_RR:
+ am->Mam.RR.base = lookupHRegRemap(m, am->Mam.RR.base);
+ am->Mam.RR.index = lookupHRegRemap(m, am->Mam.RR.index);
+ return;
+ default:
+ vpanic("mapRegs_MIPSAMode");
+ break;
+ }
+}
+
+/* --------- Operand, which can be a reg or a u16/s16. --------- */
+
+MIPSRH *MIPSRH_Imm(Bool syned, UShort imm16)
+{
+ MIPSRH *op = LibVEX_Alloc(sizeof(MIPSRH));
+ op->tag = Mrh_Imm;
+ op->Mrh.Imm.syned = syned;
+ op->Mrh.Imm.imm16 = imm16;
+ /* If this is a signed value, ensure it's not -32768, so that we
+ are guaranteed always to be able to negate if needed. */
+ if (syned)
+ vassert(imm16 != 0x8000);
+ vassert(syned == True || syned == False);
+ return op;
+}
+
+MIPSRH *MIPSRH_Reg(HReg reg)
+{
+ MIPSRH *op = LibVEX_Alloc(sizeof(MIPSRH));
+ op->tag = Mrh_Reg;
+ op->Mrh.Reg.reg = reg;
+ return op;
+}
+
+void ppMIPSRH(MIPSRH * op, Bool mode64)
+{
+ MIPSRHTag tag = op->tag;
+ switch (tag) {
+ case Mrh_Imm:
+ if (op->Mrh.Imm.syned)
+ vex_printf("%d", (Int) (Short) op->Mrh.Imm.imm16);
+ else
+ vex_printf("%u", (UInt) (UShort) op->Mrh.Imm.imm16);
+ return;
+ case Mrh_Reg:
+ ppHRegMIPS(op->Mrh.Reg.reg, mode64);
+ return;
+ default:
+ vpanic("ppMIPSRH");
+ break;
+ }
+}
+
+/* An MIPSRH can only be used in a "read" context (what would it mean
+ to write or modify a literal?) and so we enumerate its registers
+ accordingly. */
+static void addRegUsage_MIPSRH(HRegUsage * u, MIPSRH * op)
+{
+ switch (op->tag) {
+ case Mrh_Imm:
+ return;
+ case Mrh_Reg:
+ addHRegUse(u, HRmRead, op->Mrh.Reg.reg);
+ return;
+ default:
+ vpanic("addRegUsage_MIPSRH");
+ break;
+ }
+}
+
+static void mapRegs_MIPSRH(HRegRemap * m, MIPSRH * op)
+{
+ switch (op->tag) {
+ case Mrh_Imm:
+ return;
+ case Mrh_Reg:
+ op->Mrh.Reg.reg = lookupHRegRemap(m, op->Mrh.Reg.reg);
+ return;
+ default:
+ vpanic("mapRegs_MIPSRH");
+ break;
+ }
+}
+
+/* --------- Instructions. --------- */
+
+HChar *showMIPSUnaryOp(MIPSUnaryOp op)
+{
+ HChar* ret;
+ switch (op) {
+ case Mun_CLO:
+ ret = "clo";
+ break;
+ case Mun_CLZ:
+ ret = "clz";
+ break;
+ case Mun_NOP:
+ ret = "nop";
+ break;
+ default:
+ vpanic("showMIPSUnaryOp");
+ break;
+ }
+ return ret;
+}
+
+HChar *showMIPSAluOp(MIPSAluOp op, Bool immR)
+{
+ HChar* ret;
+ switch (op) {
+ case Malu_ADD:
+ ret = immR ? "addiu" : "addu";
+ break;
+ case Malu_SUB:
+ ret = "subu";
+ break;
+ case Malu_AND:
+ ret = immR ? "andi" : "and";
+ break;
+ case Malu_OR:
+ ret = immR ? "ori" : "or";
+ break;
+ case Malu_NOR:
+ vassert(immR == False); /*there's no nor with an immediate operand!? */
+ ret = "nor";
+ break;
+ case Malu_XOR:
+ ret = immR ? "xori" : "xor";
+ break;
+ default:
+ vpanic("showMIPSAluOp");
+ break;
+ }
+ return ret;
+}
+
+HChar *showMIPSShftOp(MIPSShftOp op, Bool immR, Bool sz32)
+{
+ HChar *ret;
+ switch (op) {
+ case Mshft_SRA:
+ ret = immR ? (sz32 ? "sar" : "dsar") : (sz32 ? "sarv" : "dsrav");
+ break;
+ case Mshft_SLL:
+ ret = immR ? (sz32 ? "sll" : "dsll") : (sz32 ? "sllv" : "dsllv");
+ break;
+ case Mshft_SRL:
+ ret = immR ? (sz32 ? "srl" : "dsrl") : (sz32 ? "srlv" : "dsrlv");
+ break;
+ default:
+ vpanic("showMIPSShftOp");
+ break;
+ }
+ return ret;
+}
+
+HChar *showMIPSMaccOp(MIPSMaccOp op, Bool variable)
+{
+ HChar *ret;
+ switch (op) {
+ case Macc_ADD:
+ ret = variable ? "madd" : "maddu";
+ break;
+ case Macc_SUB:
+ ret = variable ? "msub" : "msubu";
+ break;
+ default:
+ vpanic("showMIPSAccOp");
+ break;
+ }
+ return ret;
+}
+
+MIPSInstr *MIPSInstr_LI(HReg dst, ULong imm)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_LI;
+ i->Min.LI.dst = dst;
+ i->Min.LI.imm = imm;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Alu(MIPSAluOp op, HReg dst, HReg srcL, MIPSRH * srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Alu;
+ i->Min.Alu.op = op;
+ i->Min.Alu.dst = dst;
+ i->Min.Alu.srcL = srcL;
+ i->Min.Alu.srcR = srcR;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Shft(MIPSShftOp op, Bool sz32, HReg dst, HReg srcL,
+ MIPSRH * srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Shft;
+ i->Min.Shft.op = op;
+ i->Min.Shft.sz32 = sz32;
+ i->Min.Shft.dst = dst;
+ i->Min.Shft.srcL = srcL;
+ i->Min.Shft.srcR = srcR;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Unary(MIPSUnaryOp op, HReg dst, HReg src)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Unary;
+ i->Min.Unary.op = op;
+ i->Min.Unary.dst = dst;
+ i->Min.Unary.src = src;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Cmp(Bool syned, Bool sz32, HReg dst, HReg srcL, HReg srcR,
+ MIPSCondCode cond)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Cmp;
+ i->Min.Cmp.syned = syned;
+ i->Min.Cmp.sz32 = sz32;
+ i->Min.Cmp.dst = dst;
+ i->Min.Cmp.srcL = srcL;
+ i->Min.Cmp.srcR = srcR;
+ i->Min.Cmp.cond = cond;
+ return i;
+}
+
+/* multiply */
+MIPSInstr *MIPSInstr_Mul(Bool syned, Bool wid, Bool sz32, HReg dst, HReg srcL,
+ HReg srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Mul;
+ i->Min.Mul.syned = syned;
+ i->Min.Mul.widening = wid; /* widen=True else False */
+ i->Min.Mul.sz32 = sz32; /* True = 32 bits */
+ i->Min.Mul.dst = dst;
+ i->Min.Mul.srcL = srcL;
+ i->Min.Mul.srcR = srcR;
+ return i;
+}
+
+/* msub */
+MIPSInstr *MIPSInstr_Msub(Bool syned, HReg srcL, HReg srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Macc;
+
+ i->Min.Macc.op = Macc_SUB;
+ i->Min.Macc.syned = syned;
+ i->Min.Macc.srcL = srcL;
+ i->Min.Macc.srcR = srcR;
+ return i;
+}
+
+/* madd */
+MIPSInstr *MIPSInstr_Madd(Bool syned, HReg srcL, HReg srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Macc;
+
+ i->Min.Macc.op = Macc_ADD;
+ i->Min.Macc.syned = syned;
+ i->Min.Macc.srcL = srcL;
+ i->Min.Macc.srcR = srcR;
+ return i;
+}
+
+/* div */
+MIPSInstr *MIPSInstr_Div(Bool syned, Bool sz32, HReg srcL, HReg srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Div;
+ i->Min.Div.syned = syned;
+ i->Min.Div.sz32 = sz32; /* True = 32 bits */
+ i->Min.Div.srcL = srcL;
+ i->Min.Div.srcR = srcR;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Call(MIPSCondCode cond, Addr32 target, UInt argiregs,
+ HReg src)
+{
+ UInt mask;
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Call;
+ i->Min.Call.cond = cond;
+ i->Min.Call.target = target;
+ i->Min.Call.argiregs = argiregs;
+ i->Min.Call.src = src;
+ /* Only r4 .. r7 inclusive may be used as arg regs. Hence: */
+ mask = (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7);
+ vassert(0 == (argiregs & ~mask));
+ return i;
+}
+
+MIPSInstr *MIPSInstr_CallAlways(MIPSCondCode cond, Addr32 target, UInt argiregs)
+{
+ UInt mask;
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Call;
+ i->Min.Call.cond = cond;
+ i->Min.Call.target = target;
+ i->Min.Call.argiregs = argiregs;
+ /* Only r4 .. r7 inclusive may be used as arg regs. Hence: */
+ mask = (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7);
+ vassert(0 == (argiregs & ~mask));
+ return i;
+}
+
+MIPSInstr *MIPSInstr_XDirect ( Addr32 dstGA, MIPSAMode* amPC,
+ MIPSCondCode cond, Bool toFastEP ) {
+ MIPSInstr* i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_XDirect;
+ i->Min.XDirect.dstGA = dstGA;
+ i->Min.XDirect.amPC = amPC;
+ i->Min.XDirect.cond = cond;
+ i->Min.XDirect.toFastEP = toFastEP;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_XIndir ( HReg dstGA, MIPSAMode* amPC,
+ MIPSCondCode cond ) {
+ MIPSInstr* i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_XIndir;
+ i->Min.XIndir.dstGA = dstGA;
+ i->Min.XIndir.amPC = amPC;
+ i->Min.XIndir.cond = cond;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_XAssisted ( HReg dstGA, MIPSAMode* amPC,
+ MIPSCondCode cond, IRJumpKind jk ) {
+ MIPSInstr* i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_XAssisted;
+ i->Min.XAssisted.dstGA = dstGA;
+ i->Min.XAssisted.amPC = amPC;
+ i->Min.XAssisted.cond = cond;
+ i->Min.XAssisted.jk = jk;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Load(UChar sz, HReg dst, MIPSAMode * src, Bool mode64)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Load;
+ i->Min.Load.sz = sz;
+ i->Min.Load.src = src;
+ i->Min.Load.dst = dst;
+ vassert(sz == 1 || sz == 2 || sz == 4 || sz == 8);
+
+ if (sz == 8)
+ vassert(mode64);
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Store(UChar sz, MIPSAMode * dst, HReg src, Bool mode64)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Store;
+ i->Min.Store.sz = sz;
+ i->Min.Store.src = src;
+ i->Min.Store.dst = dst;
+ vassert(sz == 1 || sz == 2 || sz == 4 || sz == 8);
+
+ if (sz == 8)
+ vassert(mode64);
+ return i;
+}
+
+MIPSInstr *MIPSInstr_LoadL(UChar sz, HReg dst, MIPSAMode * src, Bool mode64)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_LoadL;
+ i->Min.LoadL.sz = sz;
+ i->Min.LoadL.src = src;
+ i->Min.LoadL.dst = dst;
+ vassert(sz == 4 || sz == 8);
+
+ if (sz == 8)
+ vassert(mode64);
+ return i;
+}
+
+MIPSInstr *MIPSInstr_StoreC(UChar sz, MIPSAMode * dst, HReg src, Bool mode64)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_StoreC;
+ i->Min.StoreC.sz = sz;
+ i->Min.StoreC.src = src;
+ i->Min.StoreC.dst = dst;
+ vassert(sz == 4 || sz == 8);
+
+ if (sz == 8)
+ vassert(mode64);
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Mthi(HReg src)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Mthi;
+ i->Min.MtHL.src = src;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Mtlo(HReg src)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Mtlo;
+ i->Min.MtHL.src = src;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Mfhi(HReg dst)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Mfhi;
+ i->Min.MfHL.dst = dst;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_Mflo(HReg dst)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_Mflo;
+ i->Min.MfHL.dst = dst;
+ return i;
+}
+
+/* Read/Write Link Register */
+MIPSInstr *MIPSInstr_RdWrLR(Bool wrLR, HReg gpr)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_RdWrLR;
+ i->Min.RdWrLR.wrLR = wrLR;
+ i->Min.RdWrLR.gpr = gpr;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_FpLdSt(Bool isLoad, UChar sz, HReg reg, MIPSAMode * addr)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_FpLdSt;
+ i->Min.FpLdSt.isLoad = isLoad;
+ i->Min.FpLdSt.sz = sz;
+ i->Min.FpLdSt.reg = reg;
+ i->Min.FpLdSt.addr = addr;
+ vassert(sz == 4 || sz == 8);
+ return i;
+}
+
+MIPSInstr *MIPSInstr_FpUnary(MIPSFpOp op, HReg dst, HReg src)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_FpUnary;
+ i->Min.FpUnary.op = op;
+ i->Min.FpUnary.dst = dst;
+ i->Min.FpUnary.src = src;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_FpBinary(MIPSFpOp op, HReg dst, HReg srcL, HReg srcR)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_FpBinary;
+ i->Min.FpBinary.op = op;
+ i->Min.FpBinary.dst = dst;
+ i->Min.FpBinary.srcL = srcL;
+ i->Min.FpBinary.srcR = srcR;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_FpConvert(MIPSFpOp op, HReg dst, HReg src)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_FpConvert;
+ i->Min.FpConvert.op = op;
+ i->Min.FpConvert.dst = dst;
+ i->Min.FpConvert.src = src;
+ return i;
+
+}
+
+MIPSInstr *MIPSInstr_FpCompare(MIPSFpOp op, HReg dst, HReg srcL, HReg srcR,
+ UChar cond1)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_FpCompare;
+ i->Min.FpCompare.op = op;
+ i->Min.FpCompare.dst = dst;
+ i->Min.FpCompare.srcL = srcL;
+ i->Min.FpCompare.srcR = srcR;
+ i->Min.FpCompare.cond1 = cond1;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_MovCond(HReg dst, HReg argL, MIPSRH * argR, HReg condR,
+ MIPSCondCode cond)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_MovCond;
+ i->Min.MovCond.dst = dst;
+ i->Min.MovCond.srcL = argL;
+ i->Min.MovCond.srcR = argR;
+ i->Min.MovCond.condR = condR;
+ i->Min.MovCond.cond = cond;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_MtFCSR(HReg src)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_MtFCSR;
+ i->Min.MtFCSR.src = src;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_MfFCSR(HReg dst)
+{
+ MIPSInstr *i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_MfFCSR;
+ i->Min.MfFCSR.dst = dst;
+ return i;
+}
+
+MIPSInstr *MIPSInstr_EvCheck ( MIPSAMode* amCounter,
+ MIPSAMode* amFailAddr ) {
+ MIPSInstr* i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_EvCheck;
+ i->Min.EvCheck.amCounter = amCounter;
+ i->Min.EvCheck.amFailAddr = amFailAddr;
+ return i;
+}
+
+MIPSInstr* MIPSInstr_ProfInc ( void ) {
+ MIPSInstr* i = LibVEX_Alloc(sizeof(MIPSInstr));
+ i->tag = Min_ProfInc;
+ return i;
+}
+
+/* -------- Pretty Print instructions ------------- */
+static void ppLoadImm(HReg dst, ULong imm, Bool mode64)
+{
+ vex_printf("li ");
+ ppHRegMIPS(dst, mode64);
+ vex_printf(",0x%016llx", imm);
+}
+
+void ppMIPSInstr(MIPSInstr * i, Bool mode64)
+{
+ switch (i->tag) {
+ case Min_LI:
+ ppLoadImm(i->Min.LI.dst, i->Min.LI.imm, mode64);
+ break;
+ case Min_Alu: {
+ HReg r_srcL = i->Min.Alu.srcL;
+ MIPSRH *rh_srcR = ...
[truncated message content] |
|
From: <sv...@va...> - 2012-06-07 08:51:14
|
sewardj 2012-06-07 09:51:02 +0100 (Thu, 07 Jun 2012)
New Revision: 2375
Log:
Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mip...@rt..., Bug 270777.
VEX: changes to existing files.
Modified files:
trunk/Makefile-gcc
trunk/Makefile-icc
trunk/auxprogs/genoffsets.c
trunk/priv/main_main.c
trunk/pub/libvex.h
trunk/pub/libvex_basictypes.h
Modified: trunk/Makefile-icc (+23 -1)
===================================================================
--- trunk/Makefile-icc 2012-06-06 13:53:14 +01:00 (rev 2374)
+++ trunk/Makefile-icc 2012-06-07 09:51:02 +01:00 (rev 2375)
@@ -9,12 +9,14 @@
pub/libvex_guest_arm.h \
pub/libvex_guest_ppc32.h \
pub/libvex_guest_ppc64.h \
+ pub/libvex_guest_mips.h \
pub/libvex_guest_offsets.h
PRIV_HEADERS = priv/host-x86/hdefs.h \
priv/host-amd64/hdefs.h \
priv/host-arm/hdefs.h \
priv/host-ppc/hdefs.h \
+ priv/host-mips/hdefs.h \
priv/host-generic/h_generic_regs.h \
priv/host-generic/h_generic_simd64.h \
priv/main/vex_globals.h \
@@ -25,6 +27,7 @@
priv/guest-amd64/gdefs.h \
priv/guest-arm/gdefs.h \
priv/guest-ppc/gdefs.h \
+ priv/guest-mips/gdefs.h \
priv/ir/irmatch.h \
priv/ir/iropt.h
@@ -42,6 +45,7 @@
priv/host-amd64/isel.o \
priv/host-arm/isel.o \
priv/host-ppc/isel.o \
+ priv/host-mips/isel.o \
priv/host-generic/h_generic_regs.o \
priv/host-generic/h_generic_simd64.o \
priv/host-generic/reg_alloc2.o \
@@ -51,10 +55,12 @@
priv/guest-amd64/ghelpers.o \
priv/guest-arm/ghelpers.o \
priv/guest-ppc/ghelpers.o \
+ priv/guest-mips/ghelpers.o \
priv/guest-x86/toIR.o \
priv/guest-amd64/toIR.o \
priv/guest-arm/toIR.o \
- priv/guest-ppc/toIR.o
+ priv/guest-ppc/toIR.o \
+ priv/guest-mips/toIR.o
PUB_INCLUDES = -Ipub
@@ -170,6 +176,10 @@
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-ppc/hdefs.o \
-c priv/host-ppc/hdefs.c
+priv/host-mips/hdefs.o: $(ALL_HEADERS) priv/host-mips/hdefs.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-mips/hdefs.o \
+ -c priv/host-mips/hdefs.c
+
priv/host-x86/isel.o: $(ALL_HEADERS) priv/host-x86/isel.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-x86/isel.o \
-c priv/host-x86/isel.c
@@ -186,6 +196,10 @@
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-ppc/isel.o \
-c priv/host-ppc/isel.c
+priv/host-mips/isel.o: $(ALL_HEADERS) priv/host-mips/isel.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-mips/isel.o \
+ -c priv/host-mips/isel.c
+
priv/host-generic/h_generic_regs.o: $(ALL_HEADERS) priv/host-generic/h_generic_regs.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host-generic/h_generic_regs.o \
-c priv/host-generic/h_generic_regs.c
@@ -237,3 +251,11 @@
priv/guest-ppc/toIR.o: $(ALL_HEADERS) priv/guest-ppc/toIR.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-ppc/toIR.o \
-c priv/guest-ppc/toIR.c
+
+priv/guest-mips/ghelpers.o: $(ALL_HEADERS) priv/guest-mips/ghelpers.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-mips/ghelpers.o \
+ -c priv/guest-mips/ghelpers.c
+
+priv/guest-mips/toIR.o: $(ALL_HEADERS) priv/guest-mips/toIR.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest-mips/toIR.o \
+ -c priv/guest-mips/toIR.c
Modified: trunk/Makefile-gcc (+30 -1)
===================================================================
--- trunk/Makefile-gcc 2012-06-06 13:53:14 +01:00 (rev 2374)
+++ trunk/Makefile-gcc 2012-06-07 09:51:02 +01:00 (rev 2375)
@@ -11,6 +11,7 @@
pub/libvex_guest_ppc64.h \
pub/libvex_guest_s390x.h \
pub/libvex_s390x_common.h \
+ pub/libvex_guest_mips.h \
pub/libvex_guest_offsets.h
PRIV_HEADERS = priv/host_x86_defs.h \
@@ -19,6 +20,7 @@
priv/host_ppc_defs.h \
priv/host_s390_defs.h \
priv/host_s390_disasm.h \
+ priv/host_mips_defs.h \
priv/host_generic_regs.h \
priv/host_generic_simd64.h \
priv/host_generic_simd128.h \
@@ -30,6 +32,7 @@
priv/guest_amd64_defs.h \
priv/guest_arm_defs.h \
priv/guest_ppc_defs.h \
+ priv/guest_mips_defs.h \
priv/ir_match.h \
priv/ir_opt.h
@@ -44,12 +47,14 @@
priv/host_arm_defs.o \
priv/host_ppc_defs.o \
priv/host_s390_defs.o \
+ priv/host_mips_defs.o \
priv/host_x86_isel.o \
priv/host_amd64_isel.o \
priv/host_arm_isel.o \
priv/host_ppc_isel.o \
priv/host_s390_isel.o \
priv/host_s390_disasm.o \
+ priv/host_mips_isel.o \
priv/host_generic_regs.o \
priv/host_generic_simd64.o \
priv/host_generic_simd128.o \
@@ -61,11 +66,13 @@
priv/guest_arm_helpers.o \
priv/guest_ppc_helpers.o \
priv/guest_s390_helpers.o \
+ priv/guest_mips_helpers.o \
priv/guest_x86_toIR.o \
priv/guest_amd64_toIR.o \
priv/guest_arm_toIR.o \
priv/guest_ppc_toIR.o \
- priv/guest_s390_toIR.o
+ priv/guest_s390_toIR.o \
+ priv/guest_mips_toIR.o
PUB_INCLUDES = -Ipub
@@ -151,6 +158,12 @@
if [ ! -f TAG-ppc64-linux ] ; then rm -f $(LIB_OBJS) TAG-* libvex.a ; fi
touch TAG-ppc64-linux
+libvex-mips-linux.a: TAG-mips32-linux libvex.a
+ mv -f libvex.a libvex-mips32-linux.a
+TAG-mips-linux:
+ if [ ! -f TAG-mips32-linux ] ; then rm -f $(LIB_OBJS) TAG-* libvex.a ; fi
+ touch TAG-mips32-linux
+
libvex-ppc32-aix5.a: TAG-ppc32-aix5 libvex.a
mv -f libvex.a libvex-ppc32-aix5.a
TAG-ppc32-aix5:
@@ -258,6 +271,10 @@
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_s390_defs.o \
-c priv/host_s390_defs.c
+priv/host_mips_defs.o: $(ALL_HEADERS) priv/host_mips_defs.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_mips_defs.o \
+ -c priv/host_mips_defs.c
+
priv/host_x86_isel.o: $(ALL_HEADERS) priv/host_x86_isel.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_x86_isel.o \
-c priv/host_x86_isel.c
@@ -278,6 +295,10 @@
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_s390_isel.o \
-c priv/host_s390_isel.c
+priv/host_mips_isel.o: $(ALL_HEADERS) priv/host_mips_isel.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_mips_isel.o \
+ -c priv/host_mips_isel.c
+
priv/host_generic_regs.o: $(ALL_HEADERS) priv/host_generic_regs.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_generic_regs.o \
-c priv/host_generic_regs.c
@@ -345,3 +366,11 @@
priv/host_s390_disasm.o: $(ALL_HEADERS) priv/host_s390_disasm.c
$(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/host_s390_disasm.o \
-c priv/host_s390_disasm.c
+
+priv/guest_mips_helpers.o: $(ALL_HEADERS) priv/guest_mips_helpers.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest_mips_helpers.o \
+ -c priv/guest_mips_helpers.c
+
+priv/guest_mips_toIR.o: $(ALL_HEADERS) priv/guest_mips_toIR.c
+ $(CC) $(CCFLAGS) $(ALL_INCLUDES) -o priv/guest_mips_toIR.o \
+ -c priv/guest_mips_toIR.c
Modified: trunk/priv/main_main.c (+75 -6)
===================================================================
--- trunk/priv/main_main.c 2012-06-06 13:53:14 +01:00 (rev 2374)
+++ trunk/priv/main_main.c 2012-06-07 09:51:02 +01:00 (rev 2375)
@@ -41,6 +41,7 @@
#include "libvex_guest_ppc32.h"
#include "libvex_guest_ppc64.h"
#include "libvex_guest_s390x.h"
+#include "libvex_guest_mips32.h"
#include "main_globals.h"
#include "main_util.h"
@@ -52,6 +53,7 @@
#include "host_ppc_defs.h"
#include "host_arm_defs.h"
#include "host_s390_defs.h"
+#include "host_mips_defs.h"
#include "guest_generic_bb_to_IR.h"
#include "guest_x86_defs.h"
@@ -59,6 +61,7 @@
#include "guest_arm_defs.h"
#include "guest_ppc_defs.h"
#include "guest_s390_defs.h"
+#include "guest_mips_defs.h"
#include "host_generic_simd128.h"
@@ -395,6 +398,30 @@
vassert(are_valid_hwcaps(VexArchARM, vta->archinfo_host.hwcaps));
break;
+ case VexArchMIPS32:
+ mode64 = False;
+ getAllocableRegs_MIPS ( &n_available_real_regs,
+ &available_real_regs, mode64 );
+ isMove = (Bool(*)(HInstr*,HReg*,HReg*)) isMove_MIPSInstr;
+ getRegUsage = (void(*)(HRegUsage*,HInstr*, Bool)) getRegUsage_MIPSInstr;
+ mapRegs = (void(*)(HRegRemap*,HInstr*, Bool)) mapRegs_MIPSInstr;
+ genSpill = (void(*)(HInstr**,HInstr**,HReg,Int,Bool)) genSpill_MIPS;
+ genReload = (void(*)(HInstr**,HInstr**,HReg,Int,Bool)) genReload_MIPS;
+ ppInstr = (void(*)(HInstr*, Bool)) ppMIPSInstr;
+ ppReg = (void(*)(HReg)) ppHRegMIPS;
+ iselSB = iselSB_MIPS;
+ emit = (Int(*)(Bool*,UChar*,Int,HInstr*,Bool,
+ void*,void*,void*,void*))
+ emit_MIPSInstr;
+#if defined(VKI_LITTLE_ENDIAN)
+ host_is_bigendian = False;
+#elif defined(VKI_BIG_ENDIAN)
+ host_is_bigendian = True;
+#endif
+ host_word_type = Ity_I32;
+ vassert(are_valid_hwcaps(VexArchMIPS32, vta->archinfo_host.hwcaps));
+ break;
+
default:
vpanic("LibVEX_Translate: unsupported host insn set");
}
@@ -523,6 +550,26 @@
vassert(sizeof( ((VexGuestARMState*)0)->guest_NRADDR ) == 4);
break;
+ case VexArchMIPS32:
+ preciseMemExnsFn = guest_mips32_state_requires_precise_mem_exns;
+ disInstrFn = disInstr_MIPS;
+ specHelper = guest_mips32_spechelper;
+ guest_sizeB = sizeof(VexGuestMIPS32State);
+ guest_word_type = Ity_I32;
+ guest_layout = &mips32Guest_layout;
+ offB_TISTART = offsetof(VexGuestMIPS32State,guest_TISTART);
+ offB_TILEN = offsetof(VexGuestMIPS32State,guest_TILEN);
+ offB_GUEST_IP = offsetof(VexGuestMIPS32State,guest_PC);
+ szB_GUEST_IP = sizeof( ((VexGuestMIPS32State*)0)->guest_PC );
+ offB_HOST_EvC_COUNTER = offsetof(VexGuestMIPS32State,host_EvC_COUNTER);
+ offB_HOST_EvC_FAILADDR = offsetof(VexGuestMIPS32State,host_EvC_FAILADDR);
+ vassert(are_valid_hwcaps(VexArchMIPS32, vta->archinfo_guest.hwcaps));
+ vassert(0 == sizeof(VexGuestMIPS32State) % 16);
+ vassert(sizeof( ((VexGuestMIPS32State*)0)->guest_TISTART) == 4);
+ vassert(sizeof( ((VexGuestMIPS32State*)0)->guest_TILEN ) == 4);
+ vassert(sizeof( ((VexGuestMIPS32State*)0)->guest_NRADDR ) == 4);
+ break;
+
default:
vpanic("LibVEX_Translate: unsupported guest insn set");
}
@@ -845,6 +892,10 @@
return chainXDirect_PPC(place_to_chain,
disp_cp_chain_me_EXPECTED,
place_to_jump_to, True/*mode64*/);
+ case VexArchMIPS32:
+ return chainXDirect_MIPS(place_to_chain,
+ disp_cp_chain_me_EXPECTED,
+ place_to_jump_to, False/*!mode64*/);
default:
vassert(0);
}
@@ -878,6 +929,10 @@
return unchainXDirect_PPC(place_to_unchain,
place_to_jump_to_EXPECTED,
disp_cp_chain_me, True/*mode64*/);
+ case VexArchMIPS32:
+ return unchainXDirect_MIPS(place_to_unchain,
+ place_to_jump_to_EXPECTED,
+ disp_cp_chain_me, False/*!mode64*/);
default:
vassert(0);
}
@@ -904,6 +959,8 @@
case VexArchPPC32:
case VexArchPPC64:
cached = evCheckSzB_PPC(); break;
+ case VexArchMIPS32:
+ cached = evCheckSzB_MIPS(); break;
default:
vassert(0);
}
@@ -931,6 +988,9 @@
case VexArchPPC64:
return patchProfInc_PPC(place_to_patch,
location_of_counter, True/*mode64*/);
+ case VexArchMIPS32:
+ return patchProfInc_MIPS(place_to_patch,
+ location_of_counter, False/*!mode64*/);
default:
vassert(0);
}
@@ -983,6 +1043,7 @@
case VexArchPPC32: return "PPC32";
case VexArchPPC64: return "PPC64";
case VexArchS390X: return "S390X";
+ case VexArchMIPS32: return "MIPS32";
default: return "VexArch???";
}
}
@@ -1217,16 +1278,24 @@
return buf;
}
+static HChar* show_hwcaps_mips32 ( UInt hwcaps )
+{
+ if (hwcaps == 0x00010000) return "MIPS-baseline";
+ if (hwcaps == 0x00020000) return "Broadcom-baseline";
+ return NULL;
+}
+
/* ---- */
static HChar* show_hwcaps ( VexArch arch, UInt hwcaps )
{
switch (arch) {
- case VexArchX86: return show_hwcaps_x86(hwcaps);
- case VexArchAMD64: return show_hwcaps_amd64(hwcaps);
- case VexArchPPC32: return show_hwcaps_ppc32(hwcaps);
- case VexArchPPC64: return show_hwcaps_ppc64(hwcaps);
- case VexArchARM: return show_hwcaps_arm(hwcaps);
- case VexArchS390X: return show_hwcaps_s390x(hwcaps);
+ case VexArchX86: return show_hwcaps_x86(hwcaps);
+ case VexArchAMD64: return show_hwcaps_amd64(hwcaps);
+ case VexArchPPC32: return show_hwcaps_ppc32(hwcaps);
+ case VexArchPPC64: return show_hwcaps_ppc64(hwcaps);
+ case VexArchARM: return show_hwcaps_arm(hwcaps);
+ case VexArchS390X: return show_hwcaps_s390x(hwcaps);
+ case VexArchMIPS32: return show_hwcaps_mips32(hwcaps);
default: return NULL;
}
}
Modified: trunk/pub/libvex.h (+18 -1)
===================================================================
--- trunk/pub/libvex.h 2012-06-06 13:53:14 +01:00 (rev 2374)
+++ trunk/pub/libvex.h 2012-06-07 09:51:02 +01:00 (rev 2375)
@@ -57,7 +57,8 @@
VexArchARM,
VexArchPPC32,
VexArchPPC64,
- VexArchS390X
+ VexArchS390X,
+ VexArchMIPS32
}
VexArch;
@@ -154,6 +155,22 @@
/* Get an ARM architecure level from HWCAPS */
#define VEX_ARM_ARCHLEVEL(x) ((x) & 0x3f)
+/* MIPS baseline capability */
+/* Assigned Company values for bits 23:16 of the PRId Register
+ (CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from
+ MTI, the PRId register is defined in this (backwards compatible)
+ way:
+
+ +----------------+----------------+----------------+----------------+
+ | Company Options| Company ID | Processor ID | Revision |
+ +----------------+----------------+----------------+----------------+
+ 31 24 23 16 15 8 7
+
+*/
+
+#define VEX_PRID_COMP_MIPS 0x00010000
+#define VEX_PRID_COMP_BROADCOM 0x00020000
+
/* These return statically allocated strings. */
extern const HChar* LibVEX_ppVexArch ( VexArch );
Modified: trunk/pub/libvex_basictypes.h (+4 -0)
===================================================================
--- trunk/pub/libvex_basictypes.h 2012-06-06 13:53:14 +01:00 (rev 2374)
+++ trunk/pub/libvex_basictypes.h 2012-06-07 09:51:02 +01:00 (rev 2375)
@@ -174,6 +174,10 @@
# define VEX_HOST_WORDSIZE 8
# define VEX_REGPARM(_n) /* */
+#elif defined(__mips__)
+# define VEX_HOST_WORDSIZE 4
+# define VEX_REGPARM(_n) /* */
+
#else
# error "Vex: Fatal: Can't establish the host architecture"
#endif
Modified: trunk/auxprogs/genoffsets.c (+38 -0)
===================================================================
--- trunk/auxprogs/genoffsets.c 2012-06-06 13:53:14 +01:00 (rev 2374)
+++ trunk/auxprogs/genoffsets.c 2012-06-07 09:51:02 +01:00 (rev 2375)
@@ -52,6 +52,7 @@
#include "../pub/libvex_guest_ppc64.h"
#include "../pub/libvex_guest_arm.h"
#include "../pub/libvex_guest_s390x.h"
+#include "../pub/libvex_guest_mips32.h"
#define VG_STRINGIFZ(__str) #__str
#define VG_STRINGIFY(__str) VG_STRINGIFZ(__str)
@@ -173,6 +174,43 @@
GENOFFSET(S390X,s390x,CC_DEP1);
GENOFFSET(S390X,s390x,CC_DEP2);
GENOFFSET(S390X,s390x,CC_NDEP);
+
+ // MIPS32
+ GENOFFSET(MIPS32,mips32,r0);
+ GENOFFSET(MIPS32,mips32,r1);
+ GENOFFSET(MIPS32,mips32,r2);
+ GENOFFSET(MIPS32,mips32,r3);
+ GENOFFSET(MIPS32,mips32,r4);
+ GENOFFSET(MIPS32,mips32,r5);
+ GENOFFSET(MIPS32,mips32,r6);
+ GENOFFSET(MIPS32,mips32,r7);
+ GENOFFSET(MIPS32,mips32,r8);
+ GENOFFSET(MIPS32,mips32,r9);
+ GENOFFSET(MIPS32,mips32,r10);
+ GENOFFSET(MIPS32,mips32,r11);
+ GENOFFSET(MIPS32,mips32,r12);
+ GENOFFSET(MIPS32,mips32,r13);
+ GENOFFSET(MIPS32,mips32,r14);
+ GENOFFSET(MIPS32,mips32,r15);
+ GENOFFSET(MIPS32,mips32,r15);
+ GENOFFSET(MIPS32,mips32,r17);
+ GENOFFSET(MIPS32,mips32,r18);
+ GENOFFSET(MIPS32,mips32,r19);
+ GENOFFSET(MIPS32,mips32,r20);
+ GENOFFSET(MIPS32,mips32,r21);
+ GENOFFSET(MIPS32,mips32,r22);
+ GENOFFSET(MIPS32,mips32,r23);
+ GENOFFSET(MIPS32,mips32,r24);
+ GENOFFSET(MIPS32,mips32,r25);
+ GENOFFSET(MIPS32,mips32,r26);
+ GENOFFSET(MIPS32,mips32,r27);
+ GENOFFSET(MIPS32,mips32,r28);
+ GENOFFSET(MIPS32,mips32,r29);
+ GENOFFSET(MIPS32,mips32,r30);
+ GENOFFSET(MIPS32,mips32,r31);
+ GENOFFSET(MIPS32,mips32,PC);
+ GENOFFSET(MIPS32,mips32,HI);
+ GENOFFSET(MIPS32,mips32,LO);
}
/*--------------------------------------------------------------------*/
|
|
From: Rich C. <rc...@wi...> - 2012-06-07 04:33:47
|
valgrind revision: 12615 VEX revision: 2374 C compiler: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) Assembler: C library: unknown uname -mrs: Darwin 10.8.0 i386 Vendor version: unknown Nightly build on macbook ( Darwin 10.8.0 i386 ) Started at 2012-06-06 23:05:01 CDT Ended at 2012-06-06 23:33:19 CDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 493 tests, 478 stderr failures, 130 stdout failures, 3 stderrB failures, 3 stdoutB failures, 32 post failures == gdbserver_tests/mchelp (stdoutB) gdbserver_tests/mchelp (stderrB) gdbserver_tests/mcinvokeRU (stdoutB) gdbserver_tests/mcinvokeRU (stderrB) gdbserver_tests/mcinvokeWS (stdoutB) gdbserver_tests/mcinvokeWS (stderrB) gdbserver_tests/nlfork_chain (stdout) gdbserver_tests/nlfork_chain (stderr) memcheck/tests/accounting (stderr) memcheck/tests/addressable (stdout) memcheck/tests/addressable (stderr) memcheck/tests/atomic_incs (stdout) memcheck/tests/atomic_incs (stderr) memcheck/tests/badaddrvalue (stdout) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badfree3 (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/big_blocks_freed_list (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/bug287260 (stderr) memcheck/tests/calloc-overflow (stderr) memcheck/tests/clientperm (stdout) memcheck/tests/clientperm (stderr) memcheck/tests/clireq_nofill (stdout) memcheck/tests/clireq_nofill (stderr) memcheck/tests/custom-overlap (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/darwin/aio (stderr) memcheck/tests/darwin/env (stderr) memcheck/tests/darwin/pth-supp (stderr) memcheck/tests/darwin/scalar (stderr) memcheck/tests/darwin/scalar_fork (stderr) memcheck/tests/darwin/scalar_nocancel (stderr) memcheck/tests/darwin/scalar_vfork (stderr) memcheck/tests/deep_templates (stdout) memcheck/tests/deep_templates (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/err_disable1 (stderr) memcheck/tests/err_disable2 (stderr) memcheck/tests/err_disable3 (stderr) memcheck/tests/err_disable4 (stderr) memcheck/tests/erringfds (stdout) memcheck/tests/erringfds (stderr) memcheck/tests/error_counts (stderr) memcheck/tests/errs1 (stderr) memcheck/tests/execve1 (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/file_locking (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/holey_buffer_too_small (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stdout) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-possible (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-delta (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long-supps (stderr) memcheck/tests/long_namespace_xml (stdout) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/mallinfo (stderr) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stdout) memcheck/tests/malloc3 (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/malloc_usable (stderr) memcheck/tests/manuel1 (stdout) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stdout) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stdout) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mempool2 (stderr) memcheck/tests/metadata (stdout) memcheck/tests/metadata (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak2 (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stdout) memcheck/tests/new_override (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/origin1-yes (stderr) memcheck/tests/origin2-not-quite (stderr) memcheck/tests/origin3-no (stderr) memcheck/tests/origin4-many (stderr) memcheck/tests/origin5-bz2 (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/origin6-fp (stderr) memcheck/tests/overlap (stdout) memcheck/tests/overlap (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stdout) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pdb-realloc (stderr) memcheck/tests/pdb-realloc2 (stdout) memcheck/tests/pdb-realloc2 (stderr) memcheck/tests/pipe (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/sbfragment (stdout) memcheck/tests/sbfragment (stderr) memcheck/tests/sh-mem-random (stdout) memcheck/tests/sh-mem-random (stderr) memcheck/tests/sh-mem (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/signal2 (stdout) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/static_malloc (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/strchr (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/test-plo-no (stderr) memcheck/tests/test-plo-yes (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/unit_libcbase (stderr) memcheck/tests/unit_oset (stdout) memcheck/tests/unit_oset (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stdout) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stdout) memcheck/tests/varinfo6 (stderr) memcheck/tests/vcpu_bz2 (stdout) memcheck/tests/vcpu_bz2 (stderr) memcheck/tests/vcpu_fbench (stdout) memcheck/tests/vcpu_fbench (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/vcpu_fnfns (stderr) memcheck/tests/wrap1 (stdout) memcheck/tests/wrap1 (stderr) memcheck/tests/wrap2 (stdout) memcheck/tests/wrap2 (stderr) memcheck/tests/wrap3 (stdout) memcheck/tests/wrap3 (stderr) memcheck/tests/wrap4 (stdout) memcheck/tests/wrap4 (stderr) memcheck/tests/wrap5 (stdout) memcheck/tests/wrap5 (stderr) memcheck/tests/wrap6 (stdout) memcheck/tests/wrap6 (stderr) memcheck/tests/wrap7 (stdout) memcheck/tests/wrap7 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) memcheck/tests/writev1 (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/espindola2 (stderr) memcheck/tests/x86/fpeflags (stderr) memcheck/tests/x86/fprem (stdout) memcheck/tests/x86/fprem (stderr) memcheck/tests/x86/fxsave (stdout) memcheck/tests/x86/fxsave (stderr) memcheck/tests/x86/insn_basic (stdout) memcheck/tests/x86/insn_basic (stderr) memcheck/tests/x86/insn_cmov (stdout) memcheck/tests/x86/insn_cmov (stderr) memcheck/tests/x86/insn_fpu (stdout) memcheck/tests/x86/insn_fpu (stderr) memcheck/tests/x86/insn_mmx (stdout) memcheck/tests/x86/insn_mmx (stderr) memcheck/tests/x86/insn_sse (stdout) memcheck/tests/x86/insn_sse (stderr) memcheck/tests/x86/insn_sse2 (stdout) memcheck/tests/x86/insn_sse2 (stderr) memcheck/tests/x86/more_x86_fp (stdout) memcheck/tests/x86/more_x86_fp (stderr) memcheck/tests/x86/pushfpopf (stdout) memcheck/tests/x86/pushfpopf (stderr) memcheck/tests/x86/pushfw_x86 (stdout) memcheck/tests/x86/pushfw_x86 (stderr) memcheck/tests/x86/pushpopmem (stdout) memcheck/tests/x86/pushpopmem (stderr) memcheck/tests/x86/sse1_memory (stdout) memcheck/tests/x86/sse1_memory (stderr) memcheck/tests/x86/sse2_memory (stdout) memcheck/tests/x86/sse2_memory (stderr) memcheck/tests/x86/tronical (stderr) memcheck/tests/x86/xor-undef-x86 (stdout) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stdout) memcheck/tests/xml1 (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/clreq (stderr) cachegrind/tests/dlclose (stdout) cachegrind/tests/dlclose (stderr) cachegrind/tests/notpower2 (stderr) cachegrind/tests/wrap5 (stdout) cachegrind/tests/wrap5 (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) callgrind/tests/clreq (stderr) callgrind/tests/notpower2-hwpref (stderr) callgrind/tests/notpower2-use (stderr) callgrind/tests/notpower2-wb (stderr) callgrind/tests/notpower2 (stderr) callgrind/tests/simwork-both (stdout) callgrind/tests/simwork-both (stderr) callgrind/tests/simwork-branch (stdout) callgrind/tests/simwork-branch (stderr) callgrind/tests/simwork-cache (stdout) callgrind/tests/simwork-cache (stderr) callgrind/tests/simwork1 (stdout) callgrind/tests/simwork1 (stderr) callgrind/tests/simwork2 (stdout) callgrind/tests/simwork2 (stderr) callgrind/tests/simwork3 (stdout) callgrind/tests/simwork3 (stderr) callgrind/tests/threads-use (stderr) callgrind/tests/threads (stderr) massif/tests/alloc-fns-A (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (stderr) massif/tests/alloc-fns-B (post) massif/tests/basic (stderr) massif/tests/basic (post) massif/tests/basic2 (stderr) massif/tests/basic2 (post) massif/tests/big-alloc (stderr) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (stderr) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (stderr) massif/tests/deep-D (post) massif/tests/ignored (stderr) massif/tests/ignored (post) massif/tests/ignoring (stderr) massif/tests/ignoring (post) massif/tests/insig (stderr) massif/tests/insig (post) massif/tests/long-names (stderr) massif/tests/long-names (post) massif/tests/long-time (stderr) massif/tests/long-time (post) massif/tests/malloc_usable (stderr) massif/tests/new-cpp (stderr) massif/tests/new-cpp (post) massif/tests/no-stack-no-heap (stderr) massif/tests/no-stack-no-heap (post) massif/tests/null (stderr) massif/tests/null (post) massif/tests/one (stderr) massif/tests/one (post) massif/tests/overloaded-new (stderr) massif/tests/overloaded-new (post) massif/tests/pages_as_heap (stderr) massif/tests/peak (stderr) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (stderr) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (stderr) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (stderr) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (stderr) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (stderr) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (stderr) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (stderr) massif/tests/zero1 (post) massif/tests/zero2 (stderr) massif/tests/zero2 (post) lackey/tests/true (stderr) none/tests/allexec32 (stdout) none/tests/allexec32 (stderr) none/tests/allexec64 (stdout) none/tests/allexec64 (stderr) none/tests/ansi (stderr) none/tests/args (stdout) none/tests/args (stderr) none/tests/async-sigs (stderr) none/tests/bitfield1 (stderr) none/tests/bug129866 (stdout) none/tests/bug129866 (stderr) none/tests/closeall (stderr) none/tests/cmd-with-special (stderr) none/tests/cmdline5 (stderr) none/tests/coolo_sigaction (stdout) none/tests/coolo_sigaction (stderr) none/tests/coolo_strlen (stderr) none/tests/darwin/access_extended (stderr) none/tests/darwin/apple-main-arg (stderr) none/tests/darwin/rlimit (stderr) none/tests/discard (stdout) none/tests/discard (stderr) none/tests/empty-exe (stderr) none/tests/exec-sigmask (stderr) none/tests/execve (stderr) none/tests/faultstatus (stderr) none/tests/fcntl_setown (stderr) none/tests/fdleak_cmsg (stderr) none/tests/fdleak_creat (stderr) none/tests/fdleak_dup (stderr) none/tests/fdleak_dup2 (stderr) none/tests/fdleak_fcntl (stderr) none/tests/fdleak_ipv4 (stdout) none/tests/fdleak_ipv4 (stderr) none/tests/fdleak_open (stderr) none/tests/fdleak_pipe (stderr) none/tests/fdleak_socketpair (stderr) none/tests/floored (stdout) none/tests/floored (stderr) none/tests/fork (stdout) none/tests/fork (stderr) none/tests/fucomip (stderr) none/tests/gxx304 (stderr) none/tests/manythreads (stdout) none/tests/manythreads (stderr) none/tests/map_unaligned (stderr) none/tests/map_unmap (stdout) none/tests/map_unmap (stderr) none/tests/mmap_fcntl_bug (stderr) none/tests/mq (stderr) none/tests/munmap_exe (stderr) none/tests/nestedfns (stdout) none/tests/nestedfns (stderr) none/tests/nodir (stderr) none/tests/pending (stdout) none/tests/pending (stderr) none/tests/process_vm_readv_writev (stderr) none/tests/procfs-non-linux (stderr) none/tests/pth_atfork1 (stdout) none/tests/pth_atfork1 (stderr) none/tests/pth_blockedsig (stdout) none/tests/pth_blockedsig (stderr) none/tests/pth_cancel1 (stdout) none/tests/pth_cancel1 (stderr) none/tests/pth_cancel2 (stderr) none/tests/pth_cvsimple (stdout) none/tests/pth_cvsimple (stderr) none/tests/pth_empty (stderr) none/tests/pth_exit (stderr) none/tests/pth_exit2 (stderr) none/tests/pth_mutexspeed (stdout) none/tests/pth_mutexspeed (stderr) none/tests/pth_once (stdout) none/tests/pth_once (stderr) none/tests/pth_rwlock (stderr) none/tests/pth_stackalign (stdout) none/tests/pth_stackalign (stderr) none/tests/rcrl (stdout) none/tests/rcrl (stderr) none/tests/readline1 (stdout) none/tests/readline1 (stderr) none/tests/require-text-symbol-1 (stderr) none/tests/require-text-symbol-2 (stderr) none/tests/res_search (stdout) none/tests/res_search (stderr) none/tests/resolv (stdout) none/tests/resolv (stderr) none/tests/rlimit64_nofile (stderr) none/tests/rlimit_nofile (stderr) none/tests/sem (stderr) none/tests/semlimit (stderr) none/tests/sha1_test (stderr) none/tests/shell (stdout) none/tests/shell (stderr) none/tests/shell_nosuchfile (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) none/tests/shortpush (stderr) none/tests/shorts (stderr) none/tests/sigstackgrowth (stdout) none/tests/sigstackgrowth (stderr) none/tests/stackgrowth (stdout) none/tests/stackgrowth (stderr) none/tests/syscall-restart1 (stderr) none/tests/syscall-restart2 (stderr) none/tests/syslog (stderr) none/tests/system (stderr) none/tests/thread-exits (stdout) none/tests/thread-exits (stderr) none/tests/threaded-fork (stdout) none/tests/threaded-fork (stderr) none/tests/threadederrno (stdout) none/tests/threadederrno (stderr) none/tests/timestamp (stderr) none/tests/vgprintf (stderr) none/tests/x86/aad_aam (stdout) none/tests/x86/aad_aam (stderr) none/tests/x86/badseg (stdout) none/tests/x86/badseg (stderr) none/tests/x86/bt_everything (stdout) none/tests/x86/bt_everything (stderr) none/tests/x86/bt_literal (stdout) none/tests/x86/bt_literal (stderr) none/tests/x86/bug125959-x86 (stdout) none/tests/x86/bug125959-x86 (stderr) none/tests/x86/bug126147-x86 (stdout) none/tests/x86/bug126147-x86 (stderr) none/tests/x86/bug132813-x86 (stdout) none/tests/x86/bug132813-x86 (stderr) none/tests/x86/bug135421-x86 (stdout) none/tests/x86/bug135421-x86 (stderr) none/tests/x86/bug137714-x86 (stdout) none/tests/x86/bug137714-x86 (stderr) none/tests/x86/bug152818-x86 (stdout) none/tests/x86/bug152818-x86 (stderr) none/tests/x86/cmpxchg8b (stdout) none/tests/x86/cmpxchg8b (stderr) none/tests/x86/cpuid (stdout) none/tests/x86/cpuid (stderr) none/tests/x86/cse_fail (stdout) none/tests/x86/fcmovnu (stdout) none/tests/x86/fcmovnu (stderr) none/tests/x86/fpu_lazy_eflags (stdout) none/tests/x86/fpu_lazy_eflags (stderr) none/tests/x86/fxtract (stdout) none/tests/x86/fxtract (stderr) none/tests/x86/getseg (stdout) none/tests/x86/getseg (stderr) none/tests/x86/incdec_alt (stdout) none/tests/x86/incdec_alt (stderr) none/tests/x86/insn_basic (stdout) none/tests/x86/insn_basic (stderr) none/tests/x86/insn_cmov (stdout) none/tests/x86/insn_cmov (stderr) none/tests/x86/insn_fpu (stdout) none/tests/x86/insn_fpu (stderr) none/tests/x86/insn_mmx (stdout) none/tests/x86/insn_mmx (stderr) none/tests/x86/insn_sse (stdout) none/tests/x86/insn_sse (stderr) none/tests/x86/insn_sse2 (stdout) none/tests/x86/insn_sse2 (stderr) none/tests/x86/insn_sse3 (stdout) none/tests/x86/insn_sse3 (stderr) none/tests/x86/jcxz (stdout) none/tests/x86/jcxz (stderr) none/tests/x86/lahf (stdout) none/tests/x86/lahf (stderr) none/tests/x86/looper (stdout) none/tests/x86/looper (stderr) none/tests/x86/movx (stdout) none/tests/x86/movx (stderr) none/tests/x86/pushpopseg (stdout) none/tests/x86/pushpopseg (stderr) none/tests/x86/sbbmisc (stdout) none/tests/x86/sbbmisc (stderr) none/tests/x86/shift_ndep (stdout) none/tests/x86/shift_ndep (stderr) none/tests/x86/smc1 (stdout) none/tests/x86/smc1 (stderr) none/tests/x86/x86locked (stdout) none/tests/x86/x86locked (stderr) none/tests/x86/xadd (stdout) none/tests/x86/xadd (stderr) helgrind/tests/annotate_hbefore (stderr) helgrind/tests/annotate_rwlock (stderr) helgrind/tests/annotate_smart_pointer (stderr) helgrind/tests/cond_timedwait_invalid (stderr) helgrind/tests/free_is_write (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/locked_vs_unlocked1_fwd (stderr) helgrind/tests/locked_vs_unlocked1_rev (stderr) helgrind/tests/locked_vs_unlocked2 (stderr) helgrind/tests/locked_vs_unlocked3 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/rwlock_test (stderr) helgrind/tests/t2t_laog (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc04_free_lock (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc23_bogus_condwait (stderr) helgrind/tests/tc24_nonzero_sem (stderr) drd/tests/annotate_barrier (stderr) drd/tests/annotate_barrier_xml (stderr) drd/tests/annotate_hb_err (stderr) drd/tests/annotate_hb_race (stderr) drd/tests/annotate_hbefore (stderr) drd/tests/annotate_ignore_read (stderr) drd/tests/annotate_ignore_rw (stderr) drd/tests/annotate_ignore_rw2 (stderr) drd/tests/annotate_ignore_write (stderr) drd/tests/annotate_ignore_write2 (stderr) drd/tests/annotate_order_1 (stderr) drd/tests/annotate_order_2 (stderr) drd/tests/annotate_order_3 (stderr) drd/tests/annotate_publish_hg (stderr) drd/tests/annotate_rwlock (stderr) drd/tests/annotate_rwlock_hg (stderr) drd/tests/annotate_smart_pointer (stderr) drd/tests/annotate_smart_pointer2 (stderr) drd/tests/annotate_spinlock (stderr) drd/tests/annotate_static (stderr) drd/tests/annotate_trace_memory (stderr) drd/tests/annotate_trace_memory_xml (stderr) drd/tests/atomic_var (stderr) drd/tests/bug-235681 (stderr) drd/tests/circular_buffer (stderr) drd/tests/custom_alloc (stderr) drd/tests/custom_alloc_fiw (stderr) drd/tests/fp_race (stderr) drd/tests/fp_race2 (stderr) drd/tests/fp_race_xml (stderr) drd/tests/free_is_write (stderr) drd/tests/free_is_write2 (stderr) drd/tests/hg01_all_ok (stderr) drd/tests/hg02_deadlock (stderr) drd/tests/hg03_inherit (stderr) drd/tests/hg04_race (stderr) drd/tests/hg05_race2 (stderr) drd/tests/hg06_readshared (stderr) drd/tests/hold_lock_1 (stderr) drd/tests/hold_lock_2 (stderr) drd/tests/linuxthreads_det (stderr) drd/tests/memory_allocation (stderr) drd/tests/monitor_example (stderr) drd/tests/new_delete (stderr) drd/tests/pth_broadcast (stderr) drd/tests/pth_cancel_locked (stderr) drd/tests/pth_cleanup_handler (stderr) drd/tests/pth_cond_race (stderr) drd/tests/pth_cond_race2 (stderr) drd/tests/pth_cond_race3 (stderr) drd/tests/pth_create_chain (stderr) drd/tests/pth_detached (stderr) drd/tests/pth_detached2 (stderr) drd/tests/pth_detached3 (stderr) drd/tests/pth_inconsistent_cond_wait (stderr) drd/tests/pth_mutex_reinit (stderr) drd/tests/pth_once (stderr) drd/tests/pth_process_shared_mutex (stderr) drd/tests/pth_uninitialized_cond (stderr) drd/tests/read_and_free_race (stderr) drd/tests/recursive_mutex (stderr) drd/tests/rwlock_race (stderr) drd/tests/rwlock_test (stderr) drd/tests/rwlock_type_checking (stderr) drd/tests/sem_open (stderr) drd/tests/sem_open2 (stderr) drd/tests/sem_open3 (stderr) drd/tests/sem_open_traced (stderr) drd/tests/sigalrm (stderr) drd/tests/sigaltstack (stderr) drd/tests/tc01_simple_race (stderr) drd/tests/tc02_simple_tls (stderr) drd/tests/tc03_re_excl (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc05_simple_race (stderr) drd/tests/tc06_two_races (stderr) drd/tests/tc07_hbl1 (stdout) drd/tests/tc07_hbl1 (stderr) drd/tests/tc08_hbl2 (stdout) drd/tests/tc08_hbl2 (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc10_rec_lock (stderr) drd/tests/tc11_XCHG (stdout) drd/tests/tc11_XCHG (stderr) drd/tests/tc12_rwl_trivial (stderr) drd/tests/tc13_laog1 (stderr) drd/tests/tc15_laog_lockdel (stderr) drd/tests/tc16_byterace (stderr) drd/tests/tc17_sembar (stderr) drd/tests/tc19_shadowmem (stderr) drd/tests/tc21_pthonce (stdout) drd/tests/tc21_pthonce (stderr) drd/tests/tc23_bogus_condwait (stderr) drd/tests/thread_name (stderr) drd/tests/thread_name_xml (stderr) drd/tests/threaded-fork (stderr) drd/tests/trylock (stderr) drd/tests/unit_bitmap (stderr) drd/tests/unit_vc (stderr) exp-bbv/tests/x86/complex_rep (stderr) exp-bbv/tests/x86/fldcw_check (stderr) exp-bbv/tests/x86/million (stderr) exp-bbv/tests/x86/rep_prefix (stderr) ================================================= ./valgrind-new/cachegrind/tests/chdir.stderr.diff ================================================= --- chdir.stderr.exp 2012-06-06 23:18:26.000000000 -0500 +++ chdir.stderr.out 2012-06-06 23:30:38.000000000 -0500 @@ -1,17 +1,28 @@ -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3800CE85: ??? + by 0x3800D048: ??? + by 0x380541A7: ??? + by 0x38056037: ??? + by 0x3807B498: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. + ================================================= ./valgrind-new/cachegrind/tests/clreq.stderr.diff ================================================= --- clreq.stderr.exp 2012-06-06 23:18:26.000000000 -0500 +++ clreq.stderr.out 2012-06-06 23:30:39.000000000 -0500 @@ -0,0 +1,27 @@ + +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3800CE85: ??? + by 0x3800D048: ??? + by 0x380541A7: ??? + by 0x38056037: ??? + by 0x3807B498: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. + ================================================= ./valgrind-new/cachegrind/tests/dlclose.stderr.diff ================================================= --- dlclose.stderr.exp 2012-06-06 23:18:26.000000000 -0500 +++ dlclose.stderr.out 2012-06-06 23:30:39.000000000 -0500 @@ -1,17 +1,28 @@ -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3800CE85: ??? + by 0x3800D048: ??? + by 0x380541A7: ??? + by 0x38056037: ??? + by 0x3807B498: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. + ================================================= ./valgrind-new/cachegrind/tests/dlclose.stdout.diff ================================================= --- dlclose.stdout.exp 2012-06-06 23:18:26.000000000 -0500 +++ dlclose.stdout.out 2012-06-06 23:30:39.000000000 -0500 @@ -1 +0,0 @@ -This is myprint! ================================================= ./valgrind-new/cachegrind/tests/notpower2.stderr.diff ================================================= --- notpower2.stderr.exp 2012-06-06 23:18:26.000000000 -0500 +++ notpower2.stderr.out 2012-06-06 23:30:39.000000000 -0500 @@ -1,17 +1,28 @@ -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3800CE85: ??? + by 0x3800D048: ??? + by 0x380541A7: ??? + by 0x38056037: ??? + by 0x3807B498: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. + ================================================= ./valgrind-new/cachegrind/tests/wrap5.stderr.diff ================================================= --- wrap5.stderr.exp 2012-06-06 23:18:26.000000000 -0500 +++ wrap5.stderr.out 2012-06-06 23:30:39.000000000 -0500 @@ -1,17 +1,28 @@ -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3800CE85: ??? + by 0x3800D048: ??? + by 0x380541A7: ??? + by 0x38056037: ??? + by 0x3807B498: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. + ================================================= ./valgrind-new/cachegrind/tests/wrap5.stdout.diff ================================================= --- wrap5.stdout.exp 2012-06-06 23:18:26.000000000 -0500 +++ wrap5.stdout.out 2012-06-06 23:30:39.000000000 -0500 @@ -1,37 +0,0 @@ -computing fact1(7) -in wrapper1-pre: fact(7) -in wrapper2-pre: fact(6) -in wrapper1-pre: fact(5) -in wrapper2-pre: fact(4) -in wrapper1-pre: fact(3) -in wrapper2-pre: fact(2) -in wrapper1-pre: fact(1) -in wrapper2-pre: fact(0) -in wrapper2-post: fact(0) = 1 -in wrapper1-post: fact(1) = 1 -in wrapper2-post: fact(2) = 2 -in wrapper1-post: fact(3) = 6 -in wrapper2-pre: fact(2) -in wrapper1-pre: fact(1) -in wrapper2-pre: fact(0) -in wrapper2-post: fact(0) = 1 -in wrapper1-post: fact(1) = 1 -in wrapper2-post: fact(2) = 2 -in wrapper2-post: fact(4) = 32 -in wrapper1-post: fact(5) = 160 -in wrapper2-pre: fact(2) -in wrapper1-pre: fact(1) -in wrapper2-pre: fact(0) -in wrapper2-post: fact(0) = 1 -in wrapper1-post: fact(1) = 1 -in wrapper2-post: fact(2) = 2 -in wrapper2-post: fact(6) = 972 -in wrapper1-post: fact(7) = 6804 -in wrapper2-pre: fact(2) -in wrapper1-pre: fact(1) -in wrapper2-pre: fact(0) -in wrapper2-post: fact(0) = 1 -in wrapper1-post: fact(1) = 1 -in wrapper2-post: fact(2) = 2 -fact1(7) = 6806 -allocated 51 Lards ================================================= ./valgrind-new/cachegrind/tests/x86/fpu-28-108.stderr.diff ================================================= --- fpu-28-108.stderr.exp 2012-06-06 23:18:26.000000000 -0500 +++ fpu-28-108.stderr.out 2012-06-06 23:30:40.000000000 -0500 @@ -1,17 +1,28 @@ -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3800CE85: ??? + by 0x3800D048: ??? + by 0x380541A7: ??? + by 0x38056037: ??? + by 0x3807B498: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. + ================================================= ./valgrind-new/callgrind/tests/clreq.stderr.diff ================================================= --- clreq.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ clreq.stderr.out 2012-06-06 23:30:40.000000000 -0500 @@ -1,6 +1,28 @@ -Events : Ir -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: ================================================= ./valgrind-new/callgrind/tests/notpower2-hwpref.stderr.diff ================================================= --- notpower2-hwpref.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ notpower2-hwpref.stderr.out 2012-06-06 23:30:40.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/notpower2-use.stderr.diff ================================================= --- notpower2-use.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ notpower2-use.stderr.out 2012-06-06 23:30:40.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw AcCost1 SpLoss1 AcCost2 SpLoss2 -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/notpower2-wb.stderr.diff ================================================= --- notpower2-wb.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ notpower2-wb.stderr.out 2012-06-06 23:30:40.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw ILdmr DLdmr DLdmw -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/notpower2.stderr.diff ================================================= --- notpower2.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ notpower2.stderr.out 2012-06-06 23:30:40.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/simwork-both.stderr.diff ================================================= --- simwork-both.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork-both.stderr.out 2012-06-06 23:30:41.000000000 -0500 @@ -1,24 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw Bc Bcm Bi Bim -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: - -Branches: -Mispredicts: -Mispred rate: ================================================= ./valgrind-new/callgrind/tests/simwork-both.stdout.diff ================================================= --- simwork-both.stdout.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork-both.stdout.out 2012-06-06 23:30:40.000000000 -0500 @@ -1 +0,0 @@ -Sum: 1000000 ================================================= ./valgrind-new/callgrind/tests/simwork-branch.stderr.diff ================================================= --- simwork-branch.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork-branch.stderr.out 2012-06-06 23:30:41.000000000 -0500 @@ -1,10 +1,28 @@ -Events : Ir Bc Bcm Bi Bim -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? -I refs: +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -Branches: -Mispredicts: -Mispred rate: ================================================= ./valgrind-new/callgrind/tests/simwork-branch.stdout.diff ================================================= --- simwork-branch.stdout.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork-branch.stdout.out 2012-06-06 23:30:41.000000000 -0500 @@ -1 +0,0 @@ -Sum: 1000000 ================================================= ./valgrind-new/callgrind/tests/simwork-cache.stderr.diff ================================================= --- simwork-cache.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork-cache.stderr.out 2012-06-06 23:30:41.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/simwork-cache.stdout.diff ================================================= --- simwork-cache.stdout.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork-cache.stdout.out 2012-06-06 23:30:41.000000000 -0500 @@ -1 +0,0 @@ -Sum: 1000000 ================================================= ./valgrind-new/callgrind/tests/simwork1.stderr.diff ================================================= --- simwork1.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork1.stderr.out 2012-06-06 23:30:41.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/simwork1.stdout.diff ================================================= --- simwork1.stdout.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork1.stdout.out 2012-06-06 23:30:41.000000000 -0500 @@ -1 +0,0 @@ -Sum: 1000000 ================================================= ./valgrind-new/callgrind/tests/simwork2.stderr.diff ================================================= --- simwork2.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork2.stderr.out 2012-06-06 23:30:41.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw ILdmr DLdmr DLdmw -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/simwork2.stdout.diff ================================================= --- simwork2.stdout.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork2.stdout.out 2012-06-06 23:30:41.000000000 -0500 @@ -1 +0,0 @@ -Sum: 1000000 ================================================= ./valgrind-new/callgrind/tests/simwork3.stderr.diff ================================================= --- simwork3.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork3.stderr.out 2012-06-06 23:30:41.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw AcCost1 SpLoss1 AcCost2 SpLoss2 -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happened in m_mallocfree.c. + +If that doesn't help, please report this bug to: www.valgrind.org + +In the bug report, send all the above text, the valgrind +version, and what OS and version you are using. Thanks. -I refs: -I1 misses: -LLi misses: -I1 miss rate: -LLi miss rate: - -D refs: -D1 misses: -LLd misses: -D1 miss rate: -LLd miss rate: - -LL refs: -LL misses: -LL miss rate: ================================================= ./valgrind-new/callgrind/tests/simwork3.stdout.diff ================================================= --- simwork3.stdout.exp 2012-06-06 23:18:22.000000000 -0500 +++ simwork3.stdout.out 2012-06-06 23:30:41.000000000 -0500 @@ -1 +0,0 @@ -Sum: 1000000 ================================================= ./valgrind-new/callgrind/tests/threads-use.stderr.diff ================================================= --- threads-use.stderr.exp 2012-06-06 23:18:22.000000000 -0500 +++ threads-use.stderr.out 2012-06-06 23:30:42.000000000 -0500 @@ -1,20 +1,28 @@ -Events : Ir Dr Dw I1mr D1mr D1mw ILmr DLmr DLmw AcCost1 SpLoss1 AcCost2 SpLoss2 Ge sysCount sysTime -Collected : +valgrind: m_scheduler/scheduler.c:707 (do_pre_run_checks): Assertion 'VG_IS_32_ALIGNED(a_vex)' failed. + at 0x3801E985: ??? + by 0x3801EB48: ??? + by 0x38064397: ??? + by 0x38066227: ??? + by 0x3808B688: ??? + +sched status: + running_tid=1 + +Thread 1: status = VgTs_Runnable + at 0x8FE01030: _dyld_start (in /usr/lib/dyld) + + +Note: see also the FAQ in the source distribution. +It contains workarounds to several common problems. +In particular, if Valgrind aborted or crashed after +identifying problems in your program, there's a good chance +that fixing those problems will prevent Valgrind aborting or +crashing, especially if it happe... [truncated message content] |
|
From: Philippe W. <phi...@sk...> - 2012-06-07 03:46:00
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) Assembler: GNU assembler version 2.21.53.0.1-6.fc16 20110716 C library: GNU C Library development release version 2.14.90 uname -mrs: Linux 3.3.1-3.fc16.ppc64 ppc64 Vendor version: Fedora release 16 (Verne) Nightly build on gcc110 ( Fedora release 16 (Verne), ppc64 ) Started at 2012-06-06 20:00:19 PDT Ended at 2012-06-06 20:44:54 PDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 526 tests, 15 stderr failures, 8 stdout failures, 1 stderrB failure, 1 stdoutB failure, 2 post failures == gdbserver_tests/mcmain_pic (stdout) gdbserver_tests/mcmain_pic (stderr) gdbserver_tests/mcmain_pic (stdoutB) gdbserver_tests/mcmain_pic (stderrB) memcheck/tests/ppc32/power_ISA2_05 (stdout) memcheck/tests/ppc32/power_ISA2_05 (stderr) memcheck/tests/ppc64/power_ISA2_05 (stdout) memcheck/tests/ppc64/power_ISA2_05 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) massif/tests/big-alloc (post) massif/tests/deep-D (post) none/tests/empty-exe (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) |
|
From: Tom H. <to...@co...> - 2012-06-07 03:11:00
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8) Assembler: GNU assembler version 2.18.50.0.6-2 20080403 C library: GNU C Library stable release version 2.8 uname -mrs: Linux 3.3.4-5.fc17.x86_64 x86_64 Vendor version: Fedora release 9 (Sulphur) Nightly build on bristol ( x86_64, Fedora 9 ) Started at 2012-06-07 03:41:53 BST Ended at 2012-06-07 04:10:39 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 600 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) none/tests/amd64/sse4-64 (stdout) |
|
From: Tom H. <to...@co...> - 2012-06-07 03:02:25
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2) Assembler: GNU assembler version 2.19.51.0.14-3.fc11 20090722 C library: GNU C Library stable release version 2.10.2 uname -mrs: Linux 3.3.4-5.fc17.x86_64 x86_64 Vendor version: Fedora release 11 (Leonidas) Nightly build on bristol ( x86_64, Fedora 11 ) Started at 2012-06-07 03:31:36 BST Ended at 2012-06-07 04:02:07 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 602 tests, 2 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) memcheck/tests/long_namespace_xml (stderr) none/tests/amd64/sse4-64 (stdout) |
|
From: Rich C. <rc...@wi...> - 2012-06-07 02:59:17
|
valgrind revision: 12615
VEX revision: 2374
C compiler: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
Assembler: GNU assembler (GNU Binutils; openSUSE 11.4) 2.21
C library: GNU C Library stable release version 2.11.3 (20110203)
uname -mrs: Linux 2.6.37.6-0.7-desktop x86_64
Vendor version: Welcome to openSUSE 11.4 "Celadon" - Kernel %r (%t).
Nightly build on ultra ( gcc 4.5.1 Linux 2.6.37.6-0.7-desktop x86_64 )
Started at 2012-06-06 21:30:01 CDT
Ended at 2012-06-06 21:59:07 CDT
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 610 tests, 1 stderr failure, 0 stdout failures, 6 stderrB failures, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mcbreak (stderrB)
gdbserver_tests/mcclean_after_fork (stderrB)
gdbserver_tests/mcleak (stderrB)
gdbserver_tests/mcmain_pic (stderrB)
gdbserver_tests/mcvabits (stderrB)
gdbserver_tests/mssnapshot (stderrB)
memcheck/tests/origin5-bz2 (stderr)
=================================================
./valgrind-new/gdbserver_tests/mcbreak.stderrB.diff
=================================================
--- mcbreak.stderrB.exp 2012-06-06 21:47:25.910166148 -0500
+++ mcbreak.stderrB.out 2012-06-06 21:50:27.808912985 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
vgdb-error value changed from 999999 to 0
n_errs_found 1 n_errs_shown 1 (vgdb-error 0)
vgdb-error value changed from 0 to 0
=================================================
./valgrind-new/gdbserver_tests/mcclean_after_fork.stderrB.diff
=================================================
--- mcclean_after_fork.stderrB.exp 2012-06-06 21:47:25.910166148 -0500
+++ mcclean_after_fork.stderrB.out 2012-06-06 21:50:29.484671111 -0500
@@ -1,4 +1,6 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-new/gdbserver_tests/mcleak.stderrB.diff
=================================================
--- mcleak.stderrB.exp 2012-06-06 21:47:25.905166935 -0500
+++ mcleak.stderrB.out 2012-06-06 21:50:48.151976684 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
10 bytes in 1 blocks are still reachable in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: f (leak-delta.c:14)
=================================================
./valgrind-new/gdbserver_tests/mcmain_pic.stderrB.diff
=================================================
--- mcmain_pic.stderrB.exp 2012-06-06 21:47:25.913165677 -0500
+++ mcmain_pic.stderrB.out 2012-06-06 21:50:49.723749813 -0500
@@ -1,3 +1,5 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Remote connection closed
=================================================
./valgrind-new/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2012-06-06 21:47:25.914165525 -0500
+++ mcvabits.stderrB.out 2012-06-06 21:50:54.617043509 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Address 0x........ len 10 addressable
Address 0x........ is 0 bytes inside data symbol "undefined"
Address 0x........ len 10 defined
=================================================
./valgrind-new/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2012-06-06 21:47:25.913165677 -0500
+++ mssnapshot.stderrB.out 2012-06-06 21:50:57.747591643 -0500
@@ -1,5 +1,9 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=92ec8fe859846a62345f74696ab349721415587a"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
v.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2012-06-06 21:47:50.983547521 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:52:18.828887900 -0500
@@ -75,17 +75,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -131,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc234-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc234-s390x 2012-06-06 21:47:50.967549830 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:52:18.828887900 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2012-06-06 21:47:50.912557767 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:52:18.828887900 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2012-06-06 21:47:50.941553583 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:52:18.828887900 -0500
@@ -12,7 +12,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -21,7 +21,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -30,7 +30,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -41,7 +41,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -52,7 +52,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -63,7 +63,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -74,7 +74,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -85,7 +85,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -96,7 +96,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -107,7 +107,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2012-06-06 21:47:50.953551850 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:52:18.828887900 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -10,7 +10,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -19,7 +19,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -28,7 +28,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -39,7 +39,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -50,7 +50,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -61,7 +61,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -72,7 +72,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -83,7 +83,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -94,7 +94,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -105,7 +105,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/mcbreak.stderrB.diff
=================================================
--- mcbreak.stderrB.exp 2012-06-06 21:31:53.518406160 -0500
+++ mcbreak.stderrB.out 2012-06-06 21:38:10.619680024 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
vgdb-error value changed from 999999 to 0
n_errs_found 1 n_errs_shown 1 (vgdb-error 0)
vgdb-error value changed from 0 to 0
=================================================
./valgrind-old/gdbserver_tests/mcclean_after_fork.stderrB.diff
=================================================
--- mcclean_after_fork.stderrB.exp 2012-06-06 21:31:53.518406160 -0500
+++ mcclean_after_fork.stderrB.out 2012-06-06 21:38:12.295436840 -0500
@@ -1,4 +1,6 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-old/gdbserver_tests/mcleak.stderrB.diff
=================================================
--- mcleak.stderrB.exp 2012-06-06 21:31:53.513406890 -0500
+++ mcleak.stderrB.out 2012-06-06 21:38:30.830747020 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
10 bytes in 1 blocks are still reachable in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: f (leak-delta.c:14)
=================================================
./valgrind-old/gdbserver_tests/mcmain_pic.stderrB.diff
=================================================
--- mcmain_pic.stderrB.exp 2012-06-06 21:31:53.522405580 -0500
+++ mcmain_pic.stderrB.out 2012-06-06 21:38:32.405518492 -0500
@@ -1,3 +1,5 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Remote connection closed
=================================================
./valgrind-old/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2012-06-06 21:31:53.523405435 -0500
+++ mcvabits.stderrB.out 2012-06-06 21:38:37.296808675 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Address 0x........ len 10 addressable
Address 0x........ is 0 bytes inside data symbol "undefined"
Address 0x........ len 10 defined
=================================================
./valgrind-old/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2012-06-06 21:31:53.522405580 -0500
+++ mssnapshot.stderrB.out 2012-06-06 21:38:40.428354231 -0500
@@ -1,5 +1,9 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=92ec8fe859846a62345f74696ab349721415587a"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
v.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2012-06-06 21:33:49.311601535 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:40:00.377752181 -0500
@@ -75,17 +75,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -131,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc234-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc234-s390x 2012-06-06 21:33:49.295603857 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:40:00.377752181 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2012-06-06 21:33:49.240611784 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:40:00.377752181 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2012-06-06 21:33:49.269607629 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:40:00.377752181 -0500
@@ -12,7 +12,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -21,7 +21,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -30,7 +30,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -41,7 +41,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -52,7 +52,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -63,7 +63,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -74,7 +74,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -85,7 +85,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -96,7 +96,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -107,7 +107,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
<truncated beyond 100 lines>
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2012-06-06 21:33:49.282605742 -0500
+++ origin5-bz2.stderr.out 2012-06-06 21:40:00.377752181 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -10,7 +10,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -19,7 +19,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -28,7 +28,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -39,7 +39,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -50,7 +50,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -61,7 +61,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -72,7 +72,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -83,7 +83,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -94,7 +94,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -105,7 +105,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
|
|
From: <br...@ac...> - 2012-06-07 02:57:22
|
valgrind revision: 12615
VEX revision: 2374
C compiler: gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)
Assembler: GNU assembler 2.15.92.0.2 20040927
C library: GNU C Library stable release version 2.3.4
uname -mrs: Linux 2.6.9-42.EL s390x
Vendor version: Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Nightly build on z10-ec ( s390x build on z10-EC )
Started at 2012-06-06 22:20:17 EDT
Ended at 2012-06-06 22:57:11 EDT
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 508 tests, 8 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
memcheck/tests/partial_load_ok (stderr)
memcheck/tests/varinfo6 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc20_verifywrap (stderr)
drd/tests/tc04_free_lock (stderr)
drd/tests/tc09_bad_unlock (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 504 tests, 8 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
memcheck/tests/partial_load_ok (stderr)
memcheck/tests/varinfo6 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc20_verifywrap (stderr)
drd/tests/tc04_free_lock (stderr)
drd/tests/tc09_bad_unlock (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Wed Jun 6 22:38:20 2012
--- new.short Wed Jun 6 22:57:11 2012
***************
*** 8,10 ****
! == 504 tests, 8 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
--- 8,10 ----
! == 508 tests, 8 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
=================================================
./valgrind-new/drd/tests/tc04_free_lock.stderr.diff-ppc
=================================================
--- tc04_free_lock.stderr.exp-ppc 2012-06-06 22:42:14.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-06-06 22:56:29.000000000 -0400
@@ -7,28 +7,22 @@
by 0x........: main (tc04_free_lock.c:20)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:26)
+ at 0x........: bar (tc04_free_lock.c:40)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
by 0x........: main (tc04_free_lock.c:26)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: foo (tc04_free_lock.c:47)
- by 0x........: main (tc04_free_lock.c:27)
+ at 0x........: foo (tc04_free_lock.c:49)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc04_free_lock.stderr.diff-x86
=================================================
--- tc04_free_lock.stderr.exp-x86 2012-06-06 22:42:14.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-06-06 22:56:29.000000000 -0400
@@ -8,7 +8,8 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:26)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
@@ -16,19 +17,12 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: foo (tc04_free_lock.c:49)
- by 0x........: main (tc04_free_lock.c:27)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc09_bad_unlock.stderr.diff-glibc2.8
=================================================
--- tc09_bad_unlock.stderr.exp-glibc2.8 2012-06-06 22:42:14.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:56:32.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc09_bad_unlock.stderr.diff-ppc
=================================================
--- tc09_bad_unlock.stderr.exp-ppc 2012-06-06 22:42:14.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:56:32.000000000 -0400
@@ -25,8 +25,8 @@
by 0x........: main (tc09_bad_unlock.c:49)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
+ at 0x........: nearly_main (tc09_bad_unlock.c:45)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc09_bad_unlock.stderr.diff-x86
=================================================
--- tc09_bad_unlock.stderr.exp-x86 2012-06-06 22:42:14.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:56:32.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:49)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2012-06-06 22:39:17.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:52:46.000000000 -0400
@@ -42,14 +42,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:49)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
---------------------
----------------------------------------------------------------
@@ -110,16 +102,8 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-----------------------------------------------------------------
-
Thread #x: Exiting thread still holds 1 lock
...
-ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2012-06-06 22:39:17.000000000 -0400
+++ tc18_semabuse.stderr.out 2012-06-06 22:52:54.000000000 -0400
@@ -18,13 +18,5 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
-----------------------------------------------------------------
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:37)
-
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc20_verifywrap.stderr.diff
=================================================
--- tc20_verifywrap.stderr.exp 2012-06-06 22:39:17.000000000 -0400
+++ tc20_verifywrap.stderr.out 2012-06-06 22:53:03.000000000 -0400
@@ -1,7 +1,7 @@
------- This is output for >= glibc 2.4 ------
+------ This is output for < glibc 2.4 ------
---------------- pthread_create/join ----------------
@@ -45,13 +45,6 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_init failed
- with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:92)
-
-----------------------------------------------------------------
-
Thread #x: pthread_mutex_destroy of a locked mutex
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
@@ -63,26 +56,8 @@
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_lock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:108)
-
-----------------------------------------------------------------
-Thread #x's call to pthread_mutex_trylock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:116)
-
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_timedlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:121)
+make pthread_mutex_lock fail: skipped on glibc < 2.4
----------------------------------------------------------------
@@ -90,13 +65,6 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:125)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:125)
-
---------------- pthread_cond_wait et al ----------------
@@ -215,14 +183,6 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
-----------------------------------------------------------------
-
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:245)
-
FIXME: can't figure out how to verify wrap of sem_post
@@ -235,4 +195,4 @@
...
-ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 17 errors from 17 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/manuel3.stderr.diff
=================================================
--- manuel3.stderr.exp 2012-06-06 22:39:55.000000000 -0400
+++ manuel3.stderr.out 2012-06-06 22:47:48.000000000 -0400
@@ -1,4 +1,3 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: gcc_cant_inline_me (manuel3.c:22)
- by 0x........: main (manuel3.c:14)
+ at 0x........: main (manuel3.c:12)
=================================================
./valgrind-new/memcheck/tests/partial_load_ok.stderr.diff
=================================================
--- partial_load_ok.stderr.exp 2012-06-06 22:39:55.000000000 -0400
+++ partial_load_ok.stderr.out 2012-06-06 22:48:18.000000000 -0400
@@ -1,7 +1,13 @@
-Invalid read of size 4
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
+Invalid read of size 8
at 0x........: main (partial_load.c:23)
- Address 0x........ is 1 bytes inside a block of size 4 alloc'd
+ Address 0x........ is 1 bytes inside a block of size 8 alloc'd
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:20)
@@ -11,9 +17,9 @@
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:28)
-Invalid read of size 4
+Invalid read of size 8
at 0x........: main (partial_load.c:37)
- Address 0x........ is 0 bytes inside a block of size 4 free'd
+ Address 0x........ is 0 bytes inside a block of size 8 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:36)
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/partial_load_ok.stderr.diff64
=================================================
--- partial_load_ok.stderr.exp64 2012-06-06 22:39:55.000000000 -0400
+++ partial_load_ok.stderr.out 2012-06-06 22:48:18.000000000 -0400
@@ -1,4 +1,10 @@
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
Invalid read of size 8
at 0x........: main (partial_load.c:23)
Address 0x........ is 1 bytes inside a block of size 8 alloc'd
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2012-06-06 22:39:55.000000000 -0400
+++ varinfo6.stderr.out 2012-06-06 22:49:15.000000000 -0400
@@ -7,8 +7,7 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo6.c:34)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff-ppc64
=================================================
--- varinfo6.stderr.exp-ppc64 2012-06-06 22:39:55.000000000 -0400
+++ varinfo6.stderr.out 2012-06-06 22:49:15.000000000 -0400
@@ -1,5 +1,5 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -10,7 +10,7 @@
Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
=================================================
./valgrind-old/drd/tests/tc04_free_lock.stderr.diff-ppc
=================================================
--- tc04_free_lock.stderr.exp-ppc 2012-06-06 22:23:08.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-06-06 22:37:37.000000000 -0400
@@ -7,28 +7,22 @@
by 0x........: main (tc04_free_lock.c:20)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:26)
+ at 0x........: bar (tc04_free_lock.c:40)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
by 0x........: main (tc04_free_lock.c:26)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: foo (tc04_free_lock.c:47)
- by 0x........: main (tc04_free_lock.c:27)
+ at 0x........: foo (tc04_free_lock.c:49)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc04_free_lock.stderr.diff-x86
=================================================
--- tc04_free_lock.stderr.exp-x86 2012-06-06 22:23:08.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-06-06 22:37:37.000000000 -0400
@@ -8,7 +8,8 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:26)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
@@ -16,19 +17,12 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: foo (tc04_free_lock.c:49)
- by 0x........: main (tc04_free_lock.c:27)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc09_bad_unlock.stderr.diff-glibc2.8
=================================================
--- tc09_bad_unlock.stderr.exp-glibc2.8 2012-06-06 22:23:08.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:37:41.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc09_bad_unlock.stderr.diff-ppc
=================================================
--- tc09_bad_unlock.stderr.exp-ppc 2012-06-06 22:23:08.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:37:41.000000000 -0400
@@ -25,8 +25,8 @@
by 0x........: main (tc09_bad_unlock.c:49)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
+ at 0x........: nearly_main (tc09_bad_unlock.c:45)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc09_bad_unlock.stderr.diff-x86
=================================================
--- tc09_bad_unlock.stderr.exp-x86 2012-06-06 22:23:08.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:37:41.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:49)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2012-06-06 22:20:57.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-06-06 22:33:55.000000000 -0400
@@ -42,14 +42,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:49)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
---------------------
----------------------------------------------------------------
@@ -110,16 +102,8 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-----------------------------------------------------------------
-
Thread #x: Exiting thread still holds 1 lock
...
-ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2012-06-06 22:20:57.000000000 -0400
+++ tc18_semabuse.stderr.out 2012-06-06 22:34:02.000000000 -0400
@@ -18,13 +18,5 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
-----------------------------------------------------------------
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:37)
-
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc20_verifywrap.stderr.diff
=================================================
--- tc20_verifywrap.stderr.exp 2012-06-06 22:20:57.000000000 -0400
+++ tc20_verifywrap.stderr.out 2012-06-06 22:34:12.000000000 -0400
@@ -1,7 +1,7 @@
------- This is output for >= glibc 2.4 ------
+------ This is output for < glibc 2.4 ------
---------------- pthread_create/join ----------------
@@ -45,13 +45,6 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_init failed
- with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:92)
-
-----------------------------------------------------------------
-
Thread #x: pthread_mutex_destroy of a locked mutex
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
@@ -63,26 +56,8 @@
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_lock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:108)
-
-----------------------------------------------------------------
-Thread #x's call to pthread_mutex_trylock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:116)
-
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_timedlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:121)
+make pthread_mutex_lock fail: skipped on glibc < 2.4
----------------------------------------------------------------
@@ -90,13 +65,6 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:125)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:125)
-
---------------- pthread_cond_wait et al ----------------
@@ -215,14 +183,6 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
-----------------------------------------------------------------
-
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:245)
-
FIXME: can't figure out how to verify wrap of sem_post
@@ -235,4 +195,4 @@
...
-ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 17 errors from 17 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/manuel3.stderr.diff
=================================================
--- manuel3.stderr.exp 2012-06-06 22:22:23.000000000 -0400
+++ manuel3.stderr.out 2012-06-06 22:28:59.000000000 -0400
@@ -1,4 +1,3 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: gcc_cant_inline_me (manuel3.c:22)
- by 0x........: main (manuel3.c:14)
+ at 0x........: main (manuel3.c:12)
=================================================
./valgrind-old/memcheck/tests/partial_load_ok.stderr.diff
=================================================
--- partial_load_ok.stderr.exp 2012-06-06 22:22:23.000000000 -0400
+++ partial_load_ok.stderr.out 2012-06-06 22:29:30.000000000 -0400
@@ -1,7 +1,13 @@
-Invalid read of size 4
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
+Invalid read of size 8
at 0x........: main (partial_load.c:23)
- Address 0x........ is 1 bytes inside a block of size 4 alloc'd
+ Address 0x........ is 1 bytes inside a block of size 8 alloc'd
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:20)
@@ -11,9 +17,9 @@
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:28)
-Invalid read of size 4
+Invalid read of size 8
at 0x........: main (partial_load.c:37)
- Address 0x........ is 0 bytes inside a block of size 4 free'd
+ Address 0x........ is 0 bytes inside a block of size 8 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:36)
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/partial_load_ok.stderr.diff64
=================================================
--- partial_load_ok.stderr.exp64 2012-06-06 22:22:23.000000000 -0400
+++ partial_load_ok.stderr.out 2012-06-06 22:29:30.000000000 -0400
@@ -1,4 +1,10 @@
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
Invalid read of size 8
at 0x........: main (partial_load.c:23)
Address 0x........ is 1 bytes inside a block of size 8 alloc'd
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2012-06-06 22:22:23.000000000 -0400
+++ varinfo6.stderr.out 2012-06-06 22:30:26.000000000 -0400
@@ -7,8 +7,7 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo6.c:34)
=================================================
./valgrind-old/memcheck/tests/varinfo6.stderr.diff-ppc64
=================================================
--- varinfo6.stderr.exp-ppc64 2012-06-06 22:22:23.000000000 -0400
+++ varinfo6.stderr.out 2012-06-06 22:30:26.000000000 -0400
@@ -1,5 +1,5 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -10,7 +10,7 @@
Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
|
|
From: Tom H. <to...@co...> - 2012-06-07 02:55:24
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2) Assembler: GNU assembler version 2.20.51.0.2-20.fc13 20091009 C library: GNU C Library stable release version 2.12.2 uname -mrs: Linux 3.3.4-5.fc17.x86_64 x86_64 Vendor version: Fedora release 13 (Goddard) Nightly build on bristol ( x86_64, Fedora 13 ) Started at 2012-06-07 03:22:10 BST Ended at 2012-06-07 03:55:08 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 602 tests, 2 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) helgrind/tests/pth_barrier3 (stderr) |
|
From: Tom H. <to...@co...> - 2012-06-07 02:50:58
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) Assembler: GNU assembler version 2.20.51.0.7-8.fc14 20100318 C library: GNU C Library stable release version 2.13 uname -mrs: Linux 3.3.4-5.fc17.x86_64 x86_64 Vendor version: Fedora release 14 (Laughlin) Nightly build on bristol ( x86_64, Fedora 14 ) Started at 2012-06-07 03:11:37 BST Ended at 2012-06-07 03:50:39 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 617 tests, 2 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/origin5-bz2 (stderr) |
|
From: Tom H. <to...@co...> - 2012-06-07 02:40:44
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) Assembler: GNU assembler version 2.21.51.0.6-6.fc15 20110118 C library: GNU C Library stable release version 2.14.1 uname -mrs: Linux 3.3.4-5.fc17.x86_64 x86_64 Vendor version: Fedora release 15 (Lovelock) Nightly build on bristol ( x86_64, Fedora 15 ) Started at 2012-06-07 03:03:02 BST Ended at 2012-06-07 03:40:20 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 618 tests, 3 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/overlap (stderr) |
|
From: Tom H. <to...@co...> - 2012-06-07 02:28:15
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) Assembler: GNU assembler version 2.21.53.0.1-6.fc16 20110716 C library: GNU C Library development release version 2.14.90 uname -mrs: Linux 3.3.4-5.fc17.x86_64 x86_64 Vendor version: Fedora release 16 (Verne) Nightly build on bristol ( x86_64, Fedora 16 ) Started at 2012-06-07 02:52:04 BST Ended at 2012-06-07 03:27:55 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 618 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/overlap (stderr) memcheck/tests/str_tester (stderr) |
|
From: Christian B. <bor...@de...> - 2012-06-07 02:12:00
|
valgrind revision: 12615 VEX revision: 2374 C compiler: gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] Assembler: GNU assembler (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9 C library: GNU C Library stable release version 2.11.1 (20100118) uname -mrs: Linux 2.6.32.54-0.3-default s390x Vendor version: Welcome to SUSE Linux Enterprise Server 11 SP1 (s390x) - Kernel %r (%t). Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP1 gcc 4.3.4 on z196 (s390x) ) Started at 2012-06-07 03:45:01 CEST Ended at 2012-06-07 04:11:47 CEST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 544 tests, 6 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/s390x/cdsg (stderr) none/tests/s390x/cdsg (stdout) none/tests/s390x/cdsg (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 540 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Jun 7 03:58:27 2012 --- new.short Thu Jun 7 04:11:47 2012 *************** *** 8,10 **** ! == 540 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == helgrind/tests/tc18_semabuse (stderr) --- 8,13 ---- ! == 544 tests, 6 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures == ! memcheck/tests/s390x/cdsg (stderr) ! none/tests/s390x/cdsg (stdout) ! none/tests/s390x/cdsg (stderr) helgrind/tests/tc18_semabuse (stderr) |