diff options
author | Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> | 2010-01-19 14:21:14 +0000 |
---|---|---|
committer | Ramana Radhakrishnan <ramana@gcc.gnu.org> | 2010-01-19 14:21:14 +0000 |
commit | b3d7e1910fd9146716cc75a562bd59327c79ee58 (patch) | |
tree | 13f5fd60ab76419af0f8bb108775317aa2249670 /gcc/config | |
parent | f89cc1a337524ae9d1e32e020562ec27ca056ad2 (diff) | |
download | gcc-b3d7e1910fd9146716cc75a562bd59327c79ee58.zip gcc-b3d7e1910fd9146716cc75a562bd59327c79ee58.tar.gz gcc-b3d7e1910fd9146716cc75a562bd59327c79ee58.tar.bz2 |
Fix target/38697
2010-01-19 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/38697
* config/arm/neon-testgen.m (emit_automatics): New parameter
features. Adjust for Fixed_return_reg feature.
(test_intrinsic): Call emit_automatics with new feature.
* config/arm/neon.ml: Update copyright years.
(features): New Fixed_return_reg feature.
(ops): Update feature for Vget_low.
2010-01-19 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/38697.
* gcc.target/arm/neon/vget_lowf32.c: Regenerate.
* gcc.target/arm/neon/vget_lowp16.c: Likewise.
* gcc.target/arm/neon/vget_lowp8.c: Likewise.
* gcc.target/arm/neon/vget_lows16.c: Likewise.
* gcc.target/arm/neon/vget_lows32.c: Likewise.
* gcc.target/arm/neon/vget_lows64.c: Likewise.
* gcc.target/arm/neon/vget_lows8.c: Likewise.
* gcc.target/arm/neon/vget_lowu16.c: Likewise.
* gcc.target/arm/neon/vget_lowu32.c: Likewise.
* gcc.target/arm/neon/vget_lowu64.c: Likewise.
* gcc.target/arm/neon/vget_lowu8.c: Likewise.
From-SVN: r156042
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arm/neon-testgen.ml | 22 | ||||
-rw-r--r-- | gcc/config/arm/neon.ml | 11 |
2 files changed, 22 insertions, 11 deletions
diff --git a/gcc/config/arm/neon-testgen.ml b/gcc/config/arm/neon-testgen.ml index f1c431a..be86386 100644 --- a/gcc/config/arm/neon-testgen.ml +++ b/gcc/config/arm/neon-testgen.ml @@ -1,5 +1,5 @@ (* Auto-generate ARM Neon intrinsics tests. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by CodeSourcery. This file is part of GCC. @@ -58,7 +58,7 @@ let emit_prologue chan test_name = (* Emit declarations of local variables that are going to be passed to an intrinsic, together with one to take a returned value if needed. *) -let emit_automatics chan c_types = +let emit_automatics chan c_types features = let emit () = ignore ( List.fold_left (fun arg_number -> fun (flags, ty) -> @@ -75,11 +75,17 @@ let emit_automatics chan c_types = in match c_types with (_, return_ty) :: tys -> - if return_ty <> "void" then - (* The intrinsic returns a value. *) - (Printf.fprintf chan " %s out_%s;\n" return_ty return_ty; - emit ()) - else + if return_ty <> "void" then begin + (* The intrinsic returns a value. We need to do explict register + allocation for vget_low tests or they fail because of copy + elimination. *) + ((if List.mem Fixed_return_reg features then + Printf.fprintf chan " register %s out_%s asm (\"d18\");\n" + return_ty return_ty + else + Printf.fprintf chan " %s out_%s;\n" return_ty return_ty); + emit ()) + end else (* The intrinsic does not return a value. *) emit () | _ -> assert false @@ -257,7 +263,7 @@ let test_intrinsic dir opcode features shape name munge elt_ty = (* Emit file and function prologues. *) emit_prologue chan test_name; (* Emit local variable declarations. *) - emit_automatics chan c_types; + emit_automatics chan c_types features; Printf.fprintf chan "\n"; (* Emit the call to the intrinsic. *) emit_call chan const_valuator c_types name elt_ty; diff --git a/gcc/config/arm/neon.ml b/gcc/config/arm/neon.ml index 466b06b..f77f05c 100644 --- a/gcc/config/arm/neon.ml +++ b/gcc/config/arm/neon.ml @@ -1,7 +1,7 @@ (* Common code for ARM NEON header file, documentation and test case generators. - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by CodeSourcery. This file is part of GCC. @@ -234,6 +234,7 @@ type features = cases. The function supplied must return the integer to be written into the testcase for the argument number (0-based) supplied to it. *) | Const_valuator of (int -> int) + | Fixed_return_reg exception MixedMode of elts * elts @@ -1089,9 +1090,13 @@ let ops = Use_operands [| Dreg; Qreg |], "vget_high", notype_1, pf_su_8_64; Vget_low, [Instruction_name ["vmov"]; - Disassembles_as [Use_operands [| Dreg; Dreg |]]], + Disassembles_as [Use_operands [| Dreg; Dreg |]]; + Fixed_return_reg], Use_operands [| Dreg; Qreg |], "vget_low", - notype_1, pf_su_8_64; + notype_1, pf_su_8_32; + Vget_low, [No_op], + Use_operands [| Dreg; Qreg |], "vget_low", + notype_1, [S64; U64]; (* Conversions. *) Vcvt, [InfoWord], All (2, Dreg), "vcvt", conv_1, |