+++ /dev/null
-Index: coregrind/vg_to_ucode.c
-===================================================================
-RCS file: /home/kde/valgrind/coregrind/vg_to_ucode.c,v
-retrieving revision 1.129
-diff -u -u -r1.129 vg_to_ucode.c
---- coregrind/vg_to_ucode.c 11 Feb 2004 23:33:27 -0000 1.129
-+++ coregrind/vg_to_ucode.c 17 Feb 2004 19:23:07 -0000
-@@ -3769,6 +3769,19 @@
- DIP("pop %s\n", VG_(name_of_seg_reg)(sreg));
- }
-
-+static
-+void dis_ret ( UCodeBlock* cb, UInt d32 )
-+{
-+ Int t1 = newTemp(cb), t2 = newTemp(cb);
-+ uInstr2(cb, GET, 4, ArchReg, R_ESP, TempReg, t1);
-+ uInstr2(cb, LOAD, 4, TempReg, t1, TempReg, t2);
-+ uInstr2(cb, ADD, 4, Literal, 0, TempReg, t1);
-+ uLiteral(cb, 4+d32);
-+ uInstr2(cb, PUT, 4, TempReg, t1, ArchReg, R_ESP);
-+ jmp_treg(cb, t2);
-+ LAST_UINSTR(cb).jmpkind = JmpRet;
-+}
-+
- /*------------------------------------------------------------*/
- /*--- Disassembling entire basic blocks ---*/
- /*------------------------------------------------------------*/
-@@ -5187,24 +5200,14 @@
-
- case 0xC2: /* RET imm16 */
- d32 = getUDisp16(eip); eip += 2;
-- goto do_Ret;
-+ dis_ret(cb, d32);
-+ *isEnd = True;
-+ DIP("ret %d\n", d32);
-+ break;
- case 0xC3: /* RET */
-- d32 = 0;
-- goto do_Ret;
-- do_Ret:
-- t1 = newTemp(cb); t2 = newTemp(cb);
-- uInstr2(cb, GET, 4, ArchReg, R_ESP, TempReg, t1);
-- uInstr2(cb, LOAD, 4, TempReg, t1, TempReg, t2);
-- uInstr2(cb, ADD, 4, Literal, 0, TempReg, t1);
-- uLiteral(cb, 4+d32);
-- uInstr2(cb, PUT, 4, TempReg, t1, ArchReg, R_ESP);
-- jmp_treg(cb, t2);
-- LAST_UINSTR(cb).jmpkind = JmpRet;
--
-+ dis_ret(cb, 0);
- *isEnd = True;
-- if (d32 == 0) { DIP("ret\n"); }
-- else { DIP("ret %d\n", d32); }
--
-+ DIP("ret\n");
- break;
-
- case 0xE8: /* CALL J4 */
-@@ -6216,7 +6219,14 @@
- jmp_lit(cb, eip);
- LAST_UINSTR(cb).jmpkind = JmpYield;
- *isEnd = True;
-- }
-+ }
-+ else
-+ if (abyte == 0xC3) { /* REP RET */
-+ /* an Athlon specific optimisation */
-+ dis_ret(cb, 0);
-+ *isEnd = True;
-+ DIP("rep ret\n");
-+ }
- else {
- goto decode_failure;
- }
+++ /dev/null
-diff -ruN valgrind./helgrind/hg_main.c valgrind/helgrind/hg_main.c
---- valgrind./helgrind/hg_main.c 2004-01-05 00:08:03.000000000 +0100
-+++ valgrind/helgrind/hg_main.c 2004-02-29 15:25:04.411765536 +0100
-@@ -3103,42 +3103,42 @@
-
- #undef DEBUG_STATE
-
--static void eraser_mem_help_read_1(Addr a)
-+REGPARM(1) static void eraser_mem_help_read_1(Addr a)
- {
- eraser_mem_read(a, 1, VG_(get_current_tid)());
- }
-
--static void eraser_mem_help_read_2(Addr a)
-+REGPARM(1) static void eraser_mem_help_read_2(Addr a)
- {
- eraser_mem_read(a, 2, VG_(get_current_tid)());
- }
-
--static void eraser_mem_help_read_4(Addr a)
-+REGPARM(1) static void eraser_mem_help_read_4(Addr a)
- {
- eraser_mem_read(a, 4, VG_(get_current_tid)());
- }
-
--static void eraser_mem_help_read_N(Addr a, UInt size)
-+REGPARM(2) static void eraser_mem_help_read_N(Addr a, UInt size)
- {
- eraser_mem_read(a, size, VG_(get_current_tid)());
- }
-
--static void eraser_mem_help_write_1(Addr a, UInt val)
-+REGPARM(2) static void eraser_mem_help_write_1(Addr a, UInt val)
- {
- if (*(UChar *)a != val)
- eraser_mem_write(a, 1, VG_(get_current_tid)());
- }
--static void eraser_mem_help_write_2(Addr a, UInt val)
-+REGPARM(2) static void eraser_mem_help_write_2(Addr a, UInt val)
- {
- if (*(UShort *)a != val)
- eraser_mem_write(a, 2, VG_(get_current_tid)());
- }
--static void eraser_mem_help_write_4(Addr a, UInt val)
-+REGPARM(2) static void eraser_mem_help_write_4(Addr a, UInt val)
- {
- if (*(UInt *)a != val)
- eraser_mem_write(a, 4, VG_(get_current_tid)());
- }
--static void eraser_mem_help_write_N(Addr a, UInt size)
-+REGPARM(2) static void eraser_mem_help_write_N(Addr a, UInt size)
- {
- eraser_mem_write(a, size, VG_(get_current_tid)());
- }
-diff -ruN valgrind./memcheck/mc_include.h valgrind/memcheck/mc_include.h
---- valgrind./memcheck/mc_include.h 2004-01-04 17:43:22.000000000 +0100
-+++ valgrind/memcheck/mc_include.h 2004-02-29 15:16:14.271359128 +0100
-@@ -121,16 +121,16 @@
-
-
- /* Functions defined in mc_main.c */
--extern void MC_(helperc_STOREV4) ( Addr, UInt );
--extern void MC_(helperc_STOREV2) ( Addr, UInt );
--extern void MC_(helperc_STOREV1) ( Addr, UInt );
-+extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV4) ( Addr, UInt );
-+extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV2) ( Addr, UInt );
-+extern __attribute__ ((regparm(2))) void MC_(helperc_STOREV1) ( Addr, UInt );
-
--extern UInt MC_(helperc_LOADV1) ( Addr );
--extern UInt MC_(helperc_LOADV2) ( Addr );
--extern UInt MC_(helperc_LOADV4) ( Addr );
-+extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV1) ( Addr );
-+extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV2) ( Addr );
-+extern __attribute__ ((regparm(1))) UInt MC_(helperc_LOADV4) ( Addr );
-
--extern void MC_(fpu_write_check) ( Addr addr, Int size );
--extern void MC_(fpu_read_check) ( Addr addr, Int size );
-+extern __attribute__ ((regparm(2))) void MC_(fpu_write_check) ( Addr addr, Int size );
-+extern __attribute__ ((regparm(2))) void MC_(fpu_read_check) ( Addr addr, Int size );
-
-
- /* For client requests */
+++ /dev/null
---- valgrind-2.1.0/coregrind/vg_syscalls.c~ 2003-12-12 07:46:54.000000000 +0000
-+++ valgrind-2.1.0/coregrind/vg_syscalls.c 2004-02-08 20:09:01.000000000 +0000
-@@ -34,6 +34,11 @@
- one. */
- #include "vg_unsafe.h"
-
-+#include <linux/version.h>
-+#ifdef LIBC_HEADERS_VERSION
-+/* Fixed headers detected -- BLKGETSIZE definition is there */
-+#include <linux/fs.h>
-+#endif
-
- /* All system calls are channelled through here, doing two things:
-
---- valgrind-2.1.0/coregrind/vg_intercept.c~ 2003-11-20 16:20:54.000000000 +0000
-+++ valgrind-2.1.0/coregrind/vg_intercept.c 2004-02-08 21:11:33.000000000 +0000
-@@ -57,9 +57,12 @@
- #include <stdio.h>
- #include <sys/ipc.h>
- #include <sys/msg.h>
-+#include <linux/version.h>
-+#ifndef LIBC_HEADERS_VERSION
- #ifdef KERNEL_2_6
- #include <linux/compiler.h>
- #endif
-+#endif
- #include <asm/ipc.h> /* for ipc_kludge */
- #include <sys/poll.h>
- #include <sys/socket.h>
---- valgrind-2.1.0/coregrind/vg_unsafe.h~ 2003-11-19 22:07:14.000000000 +0000
-+++ valgrind-2.1.0/coregrind/vg_unsafe.h 2004-02-08 21:15:38.000000000 +0000
-@@ -50,9 +50,12 @@
- #include <net/if.h> /* for struct ifreq et al */
- #include <net/if_arp.h> /* for struct arpreq */
- #include <net/route.h> /* for struct rtentry */
-+#include <linux/version.h>
-+#ifndef LIBC_HEADERS_VERSION
- #ifdef KERNEL_2_6
- #include <linux/compiler.h> /* for __user definition */
- #endif
-+#endif
- #include <asm/ipc.h> /* for struct ipc_kludge */
- #include <linux/msg.h> /* for struct msgbuf */
- #include <linux/sem.h> /* for struct sembuf */
+++ /dev/null
---- valgrind-20031012/configure.in.orig 2003-10-13 00:31:53.000000000 +0200
-+++ valgrind-20031012/configure.in 2003-10-21 19:56:45.411847328 +0200
-@@ -97,7 +97,7 @@
- kernel=`uname -r`
-
- case "${kernel}" in
-- 2.5.*)
-+ 2.[[56]].*)
- AC_MSG_RESULT([2.5 family (${kernel})])
- AC_DEFINE([KERNEL_2_5], 1, [Define to 1 if you're using Linux 2.5.x])
- ;;