Home | History | Annotate | Download | only in arm-neon-tests
      1 /*
      2 
      3 Copyright (c) 2009, 2010, 2011, 2013 STMicroelectronics
      4 Written by Christophe Lyon
      5 
      6 Permission is hereby granted, free of charge, to any person obtaining a copy
      7 of this software and associated documentation files (the "Software"), to deal
      8 in the Software without restriction, including without limitation the rights
      9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     10 copies of the Software, and to permit persons to whom the Software is
     11 furnished to do so, subject to the following conditions:
     12 
     13 The above copyright notice and this permission notice shall be included in
     14 all copies or substantial portions of the Software.
     15 
     16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     22 THE SOFTWARE.
     23 
     24 */
     25 
     26 #define INSN_NAME vceq
     27 #define TEST_MSG "VCEQ/VCEQQ"
     28 
     29 /* Extra tests for _p8 variants, which exist only for vceq */
     30 void exec_vceq_p8(void);
     31 #define EXTRA_TESTS exec_vceq_p8
     32 
     33 #include "ref_v_comp_op.c"
     34 
     35 void exec_vceq_p8(void)
     36 {
     37   int i;  /* Used by DUMP() */
     38 
     39   DECL_VARIABLE(vector, poly, 8, 8);
     40   DECL_VARIABLE(vector, poly, 8, 16);
     41 
     42   DECL_VARIABLE(vector2, poly, 8, 8);
     43   DECL_VARIABLE(vector2, poly, 8, 16);
     44 
     45   DECL_VARIABLE(vector_res, uint, 8, 8);
     46   DECL_VARIABLE(vector_res, uint, 8, 16);
     47 
     48   clean_results ();
     49 
     50   VLOAD(vector, buffer, , poly, p, 8, 8);
     51   VLOAD(vector, buffer, q, poly, p, 8, 16);
     52 
     53   VDUP(vector2, , poly, p, 8, 8, 0xF3);
     54   VDUP(vector2, q, poly, p, 8, 16, 0xF4);
     55 
     56   fprintf(ref_file, "\n%s output:\n", TEST_MSG " p8");
     57   TEST_VCOMP(INSN_NAME, , poly, p, uint, 8, 8);
     58   TEST_VCOMP(INSN_NAME, q, poly, p, uint, 8, 16);
     59 
     60   DUMP(TEST_MSG, uint, 8, 8, PRIx8);
     61   DUMP(TEST_MSG, uint, 8, 16, PRIx8);
     62 
     63 }
     64