* config/arm/neon.ml (Fixed_return_reg): Renamed to fixed_vector_reg.
All callers changed.
(Fixed_core_reg): New feature.
(Vget_lane [sizes S64 and U64]): Add Fixed_core_reg. Allow fmrrd in
disassembly.
* neon-testgen.ml: Handle Fixed_core_reg.
* gcc.target/arm/neon/vgetQ_laneu64.c: Regenerated.
* gcc.target/arm/neon/vgetQ_lanes64.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185603
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-03-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * neon.md (neon_vget_lanev2di): Use gen_lowpart and gen_highpart.
+ * config/arm/neon.ml (Fixed_return_reg): Renamed to fixed_vector_reg.
+ All callers changed.
+ (Fixed_core_reg): New feature.
+ (Vget_lane [sizes S64 and U64]): Add Fixed_core_reg. Allow fmrrd in
+ disassembly.
+ * neon-testgen.ml: Handle Fixed_core_reg.
+
2012-03-21 Andrew Stubbs <ams@codesourcery.com>
* config/arm/arm.c (thumb2_reorg): Add complete support
(* 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
+ ((if List.mem Fixed_vector_reg features then
Printf.fprintf chan " register %s out_%s asm (\"d18\");\n"
return_ty return_ty
+ else if List.mem Fixed_core_reg features then
+ Printf.fprintf chan " register %s out_%s asm (\"r0\");\n"
+ return_ty return_ty
else
Printf.fprintf chan " %s out_%s;\n" return_ty return_ty);
emit ())
})
(define_expand "neon_vget_lanev2di"
- [(match_operand:DI 0 "s_register_operand" "=r")
- (match_operand:V2DI 1 "s_register_operand" "w")
- (match_operand:SI 2 "immediate_operand" "i")
- (match_operand:SI 3 "immediate_operand" "i")]
+ [(match_operand:DI 0 "s_register_operand" "")
+ (match_operand:V2DI 1 "s_register_operand" "")
+ (match_operand:SI 2 "immediate_operand" "")
+ (match_operand:SI 3 "immediate_operand" "")]
"TARGET_NEON"
{
- neon_lane_bounds (operands[2], 0, 2);
- emit_insn (gen_vec_extractv2di (operands[0], operands[1], operands[2]));
+ switch (INTVAL (operands[2]))
+ {
+ case 0:
+ emit_move_insn (operands[0], gen_lowpart (DImode, operands[1]));
+ break;
+ case 1:
+ emit_move_insn (operands[0], gen_highpart (DImode, operands[1]));
+ break;
+ default:
+ neon_lane_bounds (operands[2], 0, 1);
+ FAIL;
+ }
DONE;
})
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
+ | Fixed_vector_reg
+ | Fixed_core_reg
exception MixedMode of elts * elts
Vget_lane,
[InfoWord;
Disassembles_as [Use_operands [| Corereg; Corereg; Dreg |]];
- Instruction_name ["vmov"]; Const_valuator (fun _ -> 0)],
+ Instruction_name ["vmov"; "fmrrd"]; Const_valuator (fun _ -> 0);
+ Fixed_core_reg],
Use_operands [| Corereg; Qreg; Immed |],
"vgetQ_lane", notype_2, [S64; U64];
notype_1, pf_su_8_64;
Vget_low, [Instruction_name ["vmov"];
Disassembles_as [Use_operands [| Dreg; Dreg |]];
- Fixed_return_reg],
+ Fixed_vector_reg],
Use_operands [| Dreg; Qreg |], "vget_low",
notype_1, pf_su_8_32;
Vget_low, [No_op],
+2012-03-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/neon/vgetQ_laneu64.c: Regenerated.
+ * gcc.target/arm/neon/vgetQ_lanes64.c: Likewise.
+
2012-03-21 Martin Jambor <mjambor@suse.cz>
PR testsuite/52641
void test_vgetQ_lanes64 (void)
{
- int64_t out_int64_t;
+ register int64_t out_int64_t asm ("r0");
int64x2_t arg0_int64x2_t;
out_int64_t = vgetq_lane_s64 (arg0_int64x2_t, 0);
}
-/* { dg-final { scan-assembler "vmov\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "((vmov)|(fmrrd))\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
void test_vgetQ_laneu64 (void)
{
- uint64_t out_uint64_t;
+ register uint64_t out_uint64_t asm ("r0");
uint64x2_t arg0_uint64x2_t;
out_uint64_t = vgetq_lane_u64 (arg0_uint64x2_t, 0);
}
-/* { dg-final { scan-assembler "vmov\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "((vmov)|(fmrrd))\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */