Updating SV_ELWIDTH_TEST to accept code... parameter to account for differing assembl...
authorDaniel Benusovich <flyingmonkeys1996@gmail.com>
Thu, 22 Nov 2018 23:35:30 +0000 (15:35 -0800)
committerDaniel Benusovich <flyingmonkeys1996@gmail.com>
Thu, 22 Nov 2018 23:35:30 +0000 (15:35 -0800)
isa/macros/simplev/sv_test_macros.h

index 5459c354eeb62625d86b64458e9e4a3151b77e69..b17a5bf7cf20ada4566e6b8c04dce32abddaa33b 100644 (file)
         fmv.x.s x2, freg; \
         bne     x2, x1, fail;
 
-#define SV_ELWIDTH_TEST(code, load_instruction, testdata, elwidth, vl, wid1, wid2, wid3, isvec1, isvec2, isvec3, \
-                         expect1, expect2, expect3 )                   \
+#define SV_ELWIDTH_NONLOAD_TEST(code, load_instruction, testdata, elwidth, vl, wid1, wid2, wid3, isvec1, isvec2, isvec3, \
+                 expect1, expect2, expect3 )                                                                           \
+       SV_ELDWIDTH_TEST(load_instruction, testdata, elwidth, vl, wid1, wid2, wid3, isvec1, isvec2, isvec3,             \
+                         expect1, expect2, expect3, code x28, x15, x12)                                                \
+
+#define SV_ELWIDTH_TEST(load_instruction, testdata, elwidth, vl, wid1, wid2, wid3, isvec1, isvec2, isvec3, \
+                         expect1, expect2, expect3, code... )                   \
                                                                        \
         load_instruction( x12, testdata   , 0);                             \
         load_instruction( x13, testdata+elwidth , 0);                             \
                       SV_REG_CSR( 1, 28, wid3, 28, isvec3));           \
         SET_SV_VL( vl );                                               \
                                                                        \
-        code   x28, x15, x12;                                          \
+        code;                                          \
                                                                        \
         CLR_SV_CSRS();                                                         \
         SET_SV_VL( 1);                                                 \