add operators test class
[riscv-isa-sim.git] / operators / operators.t.cc
index 75bd379a1c91b37ea4d513f66a8004116306999b..24b20da9e9805917652e62e014a9476035f9c30d 100644 (file)
@@ -1,6 +1,19 @@
 #include <stdio.h>
 
+#include "operators.h"
+#include "operators_test.h"
+#include "decode.h"
+
 int main(int argc, char *argv[])
 {
-    printf("hello\n");
+    /*op2<uint16_t, uint16_t, uint32_t> o(0xfff0);
+    uint32_t p = 0xfffffef;
+    o = o + p;
+    */
+    opcvt cvt(u64_u64_cvt, u64_u64_cvt, sext32);
+    uint64_t o = 0xff00;
+    uint64_t  s1 = 0x1ff01;
+    uint64_t  s2 = 0x2ff01;
+    cvt.add(o, s1, s2);
+    printf("hello %lx\n", o);
 }