diff --git a/.gitignore b/.gitignore
index 0be23c4..2b94c20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 /valgrind-3.8.0.tar.bz2
 /valgrind-3.8.1.tar.bz2
 /valgrind-3.9.0.TEST1.tar.bz2
+/valgrind-3.9.0.tar.bz2
diff --git a/sources b/sources
index 39d03a6..bc67358 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c955bdb3f24379e8b225b3da2d1d30a1  valgrind-3.9.0.TEST1.tar.bz2
+0947de8112f946b9ce64764af7be6df2  valgrind-3.9.0.tar.bz2
diff --git a/valgrind-3.8.1-gdbserver_tests-mcinvoke-ppc64.patch b/valgrind-3.8.1-gdbserver_tests-mcinvoke-ppc64.patch
deleted file mode 100644
index 9e6c3c9..0000000
--- a/valgrind-3.8.1-gdbserver_tests-mcinvoke-ppc64.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- valgrind/gdbserver_tests/mcinvokeWS.vgtest	(revision 12990)
-+++ valgrind/gdbserver_tests/mcinvokeWS.vgtest	(working copy)
-@@ -4,7 +4,8 @@
- args: 1 10000000 0 -S-S-S-S
- vgopts: --tool=memcheck --vgdb=yes --vgdb-prefix=./vgdb-prefix-mcinvokeWS
- stderr_filter: filter_make_empty
--prereq: test -f vgdb.ptraceinvoker
-+# One some ppc64 installs this test just hangs
-+prereq: test -f vgdb.ptraceinvoker && ! `../tests/arch_test ppc64`
- progB: invoker
- argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeWS --wait=60 -c v.wait 0
- # if the --wait is not enough, the test will fail or block
-Index: gdbserver_tests/mcinvokeRU.vgtest
-===================================================================
---- valgrind/gdbserver_tests/mcinvokeRU.vgtest	(revision 12990)
-+++ valgrind/gdbserver_tests/mcinvokeRU.vgtest	(working copy)
-@@ -7,6 +7,8 @@
- # as the Valgrind process is always busy, we do not need the vgdb.ptraceinvoker prereq.
- # We even disable ptrace invoker to avoid spurious attach error message
- # on kernels where ptrace is restricted.
-+# One some ppc64 installs this test just hangs
-+prereq: ! `../tests/arch_test ppc64`
- progB: invoker
- argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeRU --max-invoke-ms=0 --wait=60 -c v.wait 0
- # if the --wait is not enough, the test will fail or block.
diff --git a/valgrind-3.8.1-ldso-supp.patch b/valgrind-3.8.1-ldso-supp.patch
deleted file mode 100644
index d7a42c7..0000000
--- a/valgrind-3.8.1-ldso-supp.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- valgrind/glibc-2.X.supp.in.jj	2011-10-26 23:24:45.000000000 +0200
-+++ valgrind/glibc-2.X.supp.in	2012-05-07 10:55:20.395942656 +0200
-@@ -124,7 +124,7 @@
-    glibc-2.5.x-on-SUSE-10.2-(PPC)-2a
-    Memcheck:Cond
-    fun:index
--   obj:*ld-@GLIBC_VERSION@.*.so
-+   obj:*ld-@GLIBC_VERSION@*.so
- }
- {
-    glibc-2.5.x-on-SuSE-10.2-(PPC)-2b
-@@ -136,14 +136,14 @@
-    glibc-2.5.5-on-SuSE-10.2-(PPC)-2c
-    Memcheck:Addr4
-    fun:index
--   obj:*ld-@GLIBC_VERSION@.*.so
-+   obj:*ld-@GLIBC_VERSION@*.so
- }
- {
-    glibc-2.3.5-on-SuSE-10.1-(PPC)-3
-    Memcheck:Addr4
-    fun:*wordcopy_fwd_dest_aligned*
-    fun:mem*cpy
--   obj:*lib*@GLIBC_VERSION@.*.so
-+   obj:*lib*@GLIBC_VERSION@*.so
- }
- 
- {
diff --git a/valgrind-3.9.0-amd64_gen_insn_test.patch b/valgrind-3.9.0-amd64_gen_insn_test.patch
new file mode 100644
index 0000000..c6dec0b
--- /dev/null
+++ b/valgrind-3.9.0-amd64_gen_insn_test.patch
@@ -0,0 +1,21 @@
+commit 56d49b46587a6faffc98662f7d22450df0294019
+Author: tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>
+Date:   Fri Nov 1 10:46:28 2013 +0000
+
+    Clear direction flag after tests on amd64. BZ#326983.
+    
+    
+    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13709 a5019735-40e9-0310-863c-91ae7b9d1cf9
+
+diff --git a/none/tests/amd64/gen_insn_test.pl b/none/tests/amd64/gen_insn_test.pl
+index 409249e..863e560 100644
+--- a/none/tests/amd64/gen_insn_test.pl
++++ b/none/tests/amd64/gen_insn_test.pl
+@@ -850,6 +850,7 @@ while (<>)
+     }
+ 
+ #    print qq|         \"frstor %$stateargnum\\n\"\n|;
++    print qq|         \"cld\\n\"\n|;
+ 
+     print qq|         :|;
+ 
diff --git a/valgrind-3.9.0-config_h.patch b/valgrind-3.9.0-config_h.patch
deleted file mode 100644
index 47a498f..0000000
--- a/valgrind-3.9.0-config_h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- valgrind/include/pub_tool_basics.h.jj	2011-10-26 23:24:32.000000000 +0200
-+++ valgrind/include/pub_tool_basics.h	2011-12-09 17:42:50.828630546 +0100
-@@ -297,7 +297,7 @@ static inline Bool sr_EQ ( SysRes sr1, S
- #define VG_BUGS_TO "www.valgrind.org"
- 
- /* Branch prediction hints. */
--#if defined(__GNUC__)
-+#if defined(__GNUC__) && (__GNUC__ >= 3)
- #  define LIKELY(x)   __builtin_expect(!!(x), 1)
- #  define UNLIKELY(x) __builtin_expect(!!(x), 0)
- #else
diff --git a/valgrind-3.9.0-gdbserver_tests-mcinvoke-ppc64.patch b/valgrind-3.9.0-gdbserver_tests-mcinvoke-ppc64.patch
new file mode 100644
index 0000000..9e6c3c9
--- /dev/null
+++ b/valgrind-3.9.0-gdbserver_tests-mcinvoke-ppc64.patch
@@ -0,0 +1,25 @@
+--- valgrind/gdbserver_tests/mcinvokeWS.vgtest	(revision 12990)
++++ valgrind/gdbserver_tests/mcinvokeWS.vgtest	(working copy)
+@@ -4,7 +4,8 @@
+ args: 1 10000000 0 -S-S-S-S
+ vgopts: --tool=memcheck --vgdb=yes --vgdb-prefix=./vgdb-prefix-mcinvokeWS
+ stderr_filter: filter_make_empty
+-prereq: test -f vgdb.ptraceinvoker
++# One some ppc64 installs this test just hangs
++prereq: test -f vgdb.ptraceinvoker && ! `../tests/arch_test ppc64`
+ progB: invoker
+ argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeWS --wait=60 -c v.wait 0
+ # if the --wait is not enough, the test will fail or block
+Index: gdbserver_tests/mcinvokeRU.vgtest
+===================================================================
+--- valgrind/gdbserver_tests/mcinvokeRU.vgtest	(revision 12990)
++++ valgrind/gdbserver_tests/mcinvokeRU.vgtest	(working copy)
+@@ -7,6 +7,8 @@
+ # as the Valgrind process is always busy, we do not need the vgdb.ptraceinvoker prereq.
+ # We even disable ptrace invoker to avoid spurious attach error message
+ # on kernels where ptrace is restricted.
++# One some ppc64 installs this test just hangs
++prereq: ! `../tests/arch_test ppc64`
+ progB: invoker
+ argsB: 10 --vgdb-prefix=./vgdb-prefix-mcinvokeRU --max-invoke-ms=0 --wait=60 -c v.wait 0
+ # if the --wait is not enough, the test will fail or block.
diff --git a/valgrind-3.9.0-ldso-supp.patch b/valgrind-3.9.0-ldso-supp.patch
new file mode 100644
index 0000000..d7a42c7
--- /dev/null
+++ b/valgrind-3.9.0-ldso-supp.patch
@@ -0,0 +1,28 @@
+--- valgrind/glibc-2.X.supp.in.jj	2011-10-26 23:24:45.000000000 +0200
++++ valgrind/glibc-2.X.supp.in	2012-05-07 10:55:20.395942656 +0200
+@@ -124,7 +124,7 @@
+    glibc-2.5.x-on-SUSE-10.2-(PPC)-2a
+    Memcheck:Cond
+    fun:index
+-   obj:*ld-@GLIBC_VERSION@.*.so
++   obj:*ld-@GLIBC_VERSION@*.so
+ }
+ {
+    glibc-2.5.x-on-SuSE-10.2-(PPC)-2b
+@@ -136,14 +136,14 @@
+    glibc-2.5.5-on-SuSE-10.2-(PPC)-2c
+    Memcheck:Addr4
+    fun:index
+-   obj:*ld-@GLIBC_VERSION@.*.so
++   obj:*ld-@GLIBC_VERSION@*.so
+ }
+ {
+    glibc-2.3.5-on-SuSE-10.1-(PPC)-3
+    Memcheck:Addr4
+    fun:*wordcopy_fwd_dest_aligned*
+    fun:mem*cpy
+-   obj:*lib*@GLIBC_VERSION@.*.so
++   obj:*lib*@GLIBC_VERSION@*.so
+ }
+ 
+ {
diff --git a/valgrind.spec b/valgrind.spec
index 11b9b1d..6f35ba0 100644
--- a/valgrind.spec
+++ b/valgrind.spec
@@ -3,7 +3,7 @@
 Summary: Tool for finding memory management bugs in programs
 Name: %{?scl_prefix}valgrind
 Version: 3.9.0
-Release: 0.1.TEST1%{?dist}
+Release: 1%{?dist}
 Epoch: 1
 License: GPLv2+
 URL: http://www.valgrind.org/
@@ -12,9 +12,9 @@ Group: Development/Debuggers
 # Only necessary for RHEL, will be ignored on Fedora
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-Source0: http://www.valgrind.org/downloads/valgrind-%{version}.TEST1.tar.bz2
+Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
 
-# Needs investigation and pushing upstrea
+# Needs investigation and pushing upstream
 Patch1: valgrind-3.9.0-cachegrind-improvements.patch
 
 # KDE#211352 - helgrind races in helgrind's own mythread_wrapper
@@ -23,15 +23,14 @@ Patch2: valgrind-3.9.0-helgrind-race-supp.patch
 # undef st_atime, st_mtime and st_ctime. Unknown why this is (still?) needed.
 Patch3: valgrind-3.9.0-stat_h.patch
 
-# Support really ancient gcc. Check __GNUC__ >= 3 for __builtin_expect.
-Patch4: valgrind-3.9.0-config_h.patch
-
 # Make ld.so supressions slightly less specific.
-Patch5: valgrind-3.8.1-ldso-supp.patch
+Patch4: valgrind-3.9.0-ldso-supp.patch
 
 # On some ppc64 installs these test just hangs
-Patch6: valgrind-3.8.1-gdbserver_tests-mcinvoke-ppc64.patch
+Patch5: valgrind-3.9.0-gdbserver_tests-mcinvoke-ppc64.patch
 
+# KDE#326983 - insn_basic test might crash because of setting DF flag 
+Patch6: valgrind-3.9.0-amd64_gen_insn_test.patch
 
 %ifarch x86_64 ppc64
 # Ensure glibc{,-devel} is installed for both multilib arches
@@ -119,7 +118,7 @@ See the section on Debugging MPI Parallel Programs with Valgrind in the
 Valgrind User Manual for details.
 
 %prep
-%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}.TEST1
+%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}
 
 %patch1 -p1
 %patch2 -p1
@@ -225,6 +224,12 @@ done
 # Make sure no extra CFLAGS leak through, the testsuite sets all flags
 # necessary. See also configure above.
 make %{?_smp_mflags} CFLAGS="" check || :
+
+# Remove and cleanup fake 32-bit libgcc package created in  %%build.
+%ifarch x86_64 ppc64
+rm -rf libgcc
+%endif
+
 echo ===============TESTING===================
 ./close_fds make regtest || :
 # Make sure test failures show up in build.log
@@ -274,6 +279,12 @@ echo ===============END TESTING===============
 %endif
 
 %changelog
+* Fri Nov  1 2013 Mark Wielaard <mjw@redhat.com> - 3.9.0-1
+- Upgrade to valgrind 3.9.0 final.
+- Remove support for really ancient GCCs (valgrind-3.9.0-config_h.patch).
+- Add valgrind-3.9.0-amd64_gen_insn_test.patch.
+- Remove and cleanup fake 32-bit libgcc package.
+
 * Mon Oct 28 2013 Mark Wielaard <mjw@redhat.com> - 3.9.0-0.1.TEST1
 - Upgrade to valgrind 3.9.0.TEST1
 - Remove patches that are now upstream: