aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Schmidt <colins@berkeley.edu>2016-08-08 16:08:32 -0700
committerAndrew Waterman <waterman@eecs.berkeley.edu>2016-08-08 16:08:32 -0700
commitac905c1ae59d30a3a8e2d68411d5fd90fa9536a9 (patch)
tree3dc6b383d6159b2dd99d2a8c89e33cfe200f6903
parenteb60ed426347614dfbdcbe4dcd6ed5bae8b7968a (diff)
downloadriscv-tests-ac905c1ae59d30a3a8e2d68411d5fd90fa9536a9.zip
riscv-tests-ac905c1ae59d30a3a8e2d68411d5fd90fa9536a9.tar.gz
riscv-tests-ac905c1ae59d30a3a8e2d68411d5fd90fa9536a9.tar.bz2
move fclass macros into the same file as the rest (#22)
-rw-r--r--isa/macros/scalar/test_macros.h8
-rw-r--r--isa/rv64ud/fclass.S4
-rw-r--r--isa/rv64uf/fclass.S4
3 files changed, 8 insertions, 8 deletions
diff --git a/isa/macros/scalar/test_macros.h b/isa/macros/scalar/test_macros.h
index 721b80b..c8069fd 100644
--- a/isa/macros/scalar/test_macros.h
+++ b/isa/macros/scalar/test_macros.h
@@ -504,6 +504,14 @@ test_ ## testnum: \
TEST_FP_OP_D_INTERNAL( testnum, 0, dword result, val1, val2, 0.0, \
inst a0, f0, f1)
+#define TEST_FCLASS_S(testnum, correct, input) \
+ TEST_CASE(testnum, a0, correct, li a0, input; fmv.s.x fa0, a0; \
+ fclass.s a0, fa0)
+
+#define TEST_FCLASS_D(testnum, correct, input) \
+ TEST_CASE(testnum, a0, correct, li a0, input; fmv.d.x fa0, a0; \
+ fclass.d a0, fa0)
+
#define TEST_INT_FP_OP_S( testnum, inst, result, val1 ) \
test_ ## testnum: \
li TESTNUM, testnum; \
diff --git a/isa/rv64ud/fclass.S b/isa/rv64ud/fclass.S
index 3daace0..3939490 100644
--- a/isa/rv64ud/fclass.S
+++ b/isa/rv64ud/fclass.S
@@ -17,10 +17,6 @@ RVTEST_CODE_BEGIN
# Arithmetic tests
#-------------------------------------------------------------
- #define TEST_FCLASS_D(testnum, correct, input) \
- TEST_CASE(testnum, a0, correct, li a0, input; fmv.d.x fa0, a0; \
- fclass.d a0, fa0)
-
TEST_FCLASS_D( 2, 1 << 0, 0xfff0000000000000 )
TEST_FCLASS_D( 3, 1 << 1, 0xbff0000000000000 )
TEST_FCLASS_D( 4, 1 << 2, 0x800fffffffffffff )
diff --git a/isa/rv64uf/fclass.S b/isa/rv64uf/fclass.S
index 5a6361e..9bb86b1 100644
--- a/isa/rv64uf/fclass.S
+++ b/isa/rv64uf/fclass.S
@@ -17,10 +17,6 @@ RVTEST_CODE_BEGIN
# Arithmetic tests
#-------------------------------------------------------------
- #define TEST_FCLASS_S(testnum, correct, input) \
- TEST_CASE(testnum, a0, correct, li a0, input; fmv.s.x fa0, a0; \
- fclass.s a0, fa0)
-
TEST_FCLASS_S( 2, 1 << 0, 0xff800000 )
TEST_FCLASS_S( 3, 1 << 1, 0xbf800000 )
TEST_FCLASS_S( 4, 1 << 2, 0x807fffff )