This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][ARM] Fix broken NEON tests vget_low*.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]