This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Fix broken NEON tests vget_low*.c
- From: Julian Brown <julian at codesourcery dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 27 Aug 2009 17:03:23 +0100
- Subject: Re: [PATCH][ARM] Fix broken NEON tests vget_low*.c
- References: <498552560907301651v2e43b4e2ga30fc503b240fa93@mail.gmail.com> <Pine.LNX.4.64.0907302359120.17071@digraph.polyomino.org.uk> <498552560907301702n7cc1bf97t4f343b07cc81ef64@mail.gmail.com> <498552560907311347p26f76f96o916ca9b164c672b3@mail.gmail.com> <498552560908262236g51e97eacgd8bb41b12465ee81@mail.gmail.com>
On Wed, 26 Aug 2009 22:36:49 -0700
Doug Kwan (éæå) <dougkwan@google.com> wrote:
> Ping. This is almost 4 week old.
I can't approve (or disapprove) this, but I think the test_intrinsic
parts disabling vget_lane can be done more simply and cleanly by
changing the instruction table in neon.ml instead, something like this
(untested!):
--- neon.ml (revision 259211)
+++ neon.ml (working copy)
@@ -1076,9 +1076,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,
...which, if it works, seems better than pushing knowledge of
particular instructions into the general-case test_intrinsic function.
The emit_automatics function also hardwires knowledge of Vget_low:
maybe consider introducing a new feature to "type features ..." in
neon.ml, something like:
...
| Const_valuator of (int -> int)
| Fixed_return_reg
Then add the new feature to the feature list for Vget_low (as
shown above). You'll need to pass "features" to emit_automatics in
test_intrinsic (like it's passed to emit_epilogue below). Then test for
the "fixed return register" feature in emit_automatics using something
like:
List.mem Fixed_return_reg features
(Where "mem" is for "membership" -- returns a boolean).
HTH,
Julian