diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0285-2011-05-19-Uros-Bizjak-ubizjak-gmail.com.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0285-2011-05-19-Uros-Bizjak-ubizjak-gmail.com.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0285-2011-05-19-Uros-Bizjak-ubizjak-gmail.com.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0285-2011-05-19-Uros-Bizjak-ubizjak-gmail.com.patch new file mode 100644 index 0000000000..ce830067d5 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0285-2011-05-19-Uros-Bizjak-ubizjak-gmail.com.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From dd2ac3e2496d44b75e7ed9e4b9311200dcc1be56 Mon Sep 17 00:00:00 2001 | ||
2 | From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Thu, 19 May 2011 21:10:45 +0000 | ||
4 | Subject: [PATCH] 2011-05-19 Uros Bizjak <ubizjak@gmail.com> | ||
5 | |||
6 | * config/i386/i386.c (option_override_internal): Enable TARGET_CMOVE | ||
7 | when TARGET_RDRND is active. | ||
8 | (ix86_expand_builtin) <case IX86_BUILTIN_RDRAND{16,32,64}_STEP>: | ||
9 | Generate dummy SImode target register when target is NULL. | ||
10 | |||
11 | |||
12 | |||
13 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173922 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
14 | |||
15 | index e8b9af5..66800c4 100644 | ||
16 | --- a/gcc/config/i386/i386.c | ||
17 | +++ b/gcc/config/i386/i386.c | ||
18 | @@ -4164,8 +4164,9 @@ ix86_option_override_internal (bool main_args_p) | ||
19 | } | ||
20 | |||
21 | /* For sane SSE instruction set generation we need fcomi instruction. | ||
22 | - It is safe to enable all CMOVE instructions. */ | ||
23 | - if (TARGET_SSE) | ||
24 | + It is safe to enable all CMOVE instructions. Also, RDRAND intrinsic | ||
25 | + expands to a sequence that includes conditional move. */ | ||
26 | + if (TARGET_SSE || TARGET_RDRND) | ||
27 | TARGET_CMOVE = 1; | ||
28 | |||
29 | /* Figure out what ASM_GENERATE_INTERNAL_LABEL builds as a prefix. */ | ||
30 | @@ -27450,6 +27451,12 @@ rdrand_step: | ||
31 | op0 = gen_reg_rtx (mode0); | ||
32 | emit_insn (GEN_FCN (icode) (op0)); | ||
33 | |||
34 | + arg0 = CALL_EXPR_ARG (exp, 0); | ||
35 | + op1 = expand_normal (arg0); | ||
36 | + if (!address_operand (op1, VOIDmode)) | ||
37 | + op1 = copy_addr_to_reg (op1); | ||
38 | + emit_move_insn (gen_rtx_MEM (mode0, op1), op0); | ||
39 | + | ||
40 | op1 = gen_reg_rtx (SImode); | ||
41 | emit_move_insn (op1, CONST1_RTX (SImode)); | ||
42 | |||
43 | @@ -27464,17 +27471,13 @@ rdrand_step: | ||
44 | else | ||
45 | op2 = gen_rtx_SUBREG (SImode, op0, 0); | ||
46 | |||
47 | + if (target == 0) | ||
48 | + target = gen_reg_rtx (SImode); | ||
49 | + | ||
50 | pat = gen_rtx_GEU (VOIDmode, gen_rtx_REG (CCCmode, FLAGS_REG), | ||
51 | const0_rtx); | ||
52 | - emit_insn (gen_rtx_SET (VOIDmode, op1, | ||
53 | + emit_insn (gen_rtx_SET (VOIDmode, target, | ||
54 | gen_rtx_IF_THEN_ELSE (SImode, pat, op2, op1))); | ||
55 | - emit_move_insn (target, op1); | ||
56 | - | ||
57 | - arg0 = CALL_EXPR_ARG (exp, 0); | ||
58 | - op1 = expand_normal (arg0); | ||
59 | - if (!address_operand (op1, VOIDmode)) | ||
60 | - op1 = copy_addr_to_reg (op1); | ||
61 | - emit_move_insn (gen_rtx_MEM (mode0, op1), op0); | ||
62 | return target; | ||
63 | |||
64 | default: | ||
65 | -- | ||
66 | 1.7.0.4 | ||
67 | |||