diff options
author | 2010-07-21 17:20:57 +0000 | |
---|---|---|
committer | 2010-07-21 17:20:57 +0000 | |
commit | 201c03b83e6a8dc107256e1c94b21fca70eff4ff (patch) | |
tree | 38a1c312cad0aae2c4fe885a70ed630dfb6c2d52 /4.5.0 | |
parent | Document patch. (diff) | |
download | gcc-patches-201c03b83e6a8dc107256e1c94b21fca70eff4ff.tar.gz gcc-patches-201c03b83e6a8dc107256e1c94b21fca70eff4ff.tar.bz2 gcc-patches-201c03b83e6a8dc107256e1c94b21fca70eff4ff.zip |
Add patch from upstream to fix bug #317579
Diffstat (limited to '4.5.0')
-rw-r--r-- | 4.5.0/gentoo/75_all_arm-pr43698.patch | 90 | ||||
-rw-r--r-- | 4.5.0/gentoo/README.history | 5 |
2 files changed, 94 insertions, 1 deletions
diff --git a/4.5.0/gentoo/75_all_arm-pr43698.patch b/4.5.0/gentoo/75_all_arm-pr43698.patch new file mode 100644 index 0000000..4417d01 --- /dev/null +++ b/4.5.0/gentoo/75_all_arm-pr43698.patch @@ -0,0 +1,90 @@ +From a9a24f37eebc6c8088377c02e31427b412ba000e Mon Sep 17 00:00:00 2001 +From: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> +Date: Mon, 5 Jul 2010 11:06:34 +0100 +Subject: [PATCH 1/2] Fix for PR43698 + +--- + gcc/config/arm/arm.md | 18 ++++++++++----- + gcc/testsuite/gcc.target/arm/pr43698.c | 38 ++++++++++++++++++++++++++++++++ + 2 files changed, 50 insertions(+), 6 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/arm/pr43698.c + +diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md +index 725d505..2096ec6 100644 +--- a/gcc/config/arm/arm.md ++++ b/gcc/config/arm/arm.md +@@ -11242,15 +11242,21 @@ + (set_attr "length" "4")] + ) + +-(define_insn "arm_rev" ++(define_insn "*arm_rev" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))] +- "TARGET_EITHER && arm_arch6" ++ "TARGET_32BIT && arm_arch6" + "rev\t%0, %1" +- [(set (attr "length") +- (if_then_else (eq_attr "is_thumb" "yes") +- (const_int 2) +- (const_int 4)))] ++ [(set_attr "predicable" "yes") ++ (set_attr "length" "4")] ++) ++ ++(define_insn "*thumb1_rev" ++ [(set (match_operand:SI 0 "s_register_operand" "=l") ++ (bswap:SI (match_operand:SI 1 "s_register_operand" "l")))] ++ "TARGET_THUMB1 && arm_arch6" ++ "rev\t%0, %1" ++ [(set_attr "length" "2")] + ) + + (define_expand "arm_legacy_rev" +diff --git a/gcc/testsuite/gcc.target/arm/pr43698.c b/gcc/testsuite/gcc.target/arm/pr43698.c +new file mode 100644 +index 0000000..4d2ff85 +--- /dev/null ++++ b/gcc/testsuite/gcc.target/arm/pr43698.c +@@ -0,0 +1,38 @@ ++/* { dg-do run } */ ++/* { dg-options "-Os" } */ ++ ++#include <stdint.h> ++#include <stdlib.h> ++ ++char do_reverse_endian = 0; ++ ++# define bswap_32(x) \ ++ ((((x) & 0xff000000) >> 24) | \ ++ (((x) & 0x00ff0000) >> 8) | \ ++ (((x) & 0x0000ff00) << 8) | \ ++ (((x) & 0x000000ff) << 24)) ++ ++#define EGET(X) \ ++ (__extension__ ({ \ ++ uint64_t __res; \ ++ if (!do_reverse_endian) { __res = (X); \ ++ } else if (sizeof(X) == 4) { __res = bswap_32((X)); \ ++ } \ ++ __res; \ ++ })) ++ ++void __attribute__((noinline)) X(char **phdr, char **data, int *phoff) ++{ ++ *phdr = *data EGET(*phoff); ++} ++ ++int main() ++{ ++ char *phdr; ++ char *data = (char *)0x40164000; ++ int phoff = 0x34; ++ X(&phdr, &data, &phoff); ++ if (phdr != (char *)0x40164034) ++ abort (); ++ exit (0); ++} +-- +1.6.2 + diff --git a/4.5.0/gentoo/README.history b/4.5.0/gentoo/README.history index 662e2d1..5ce6490 100644 --- a/4.5.0/gentoo/README.history +++ b/4.5.0/gentoo/README.history @@ -1,4 +1,7 @@ -1.2 27.06.2010 +1.3 21.07.2010 + + 75_all_arm-pr43698.patch + +1.2 27.06.2010 + 30_all_gcc45-pr44046-core2-native.patch + 31_all_gcc45-pr43921-atom-bootstrap.patch + 32_all_gcc45-pr43572-tailcall.patch |