revamp pt tests as well
authorYunsup Lee <yunsup@cs.berkeley.edu>
Sat, 19 Oct 2013 05:28:58 +0000 (22:28 -0700)
committerYunsup Lee <yunsup@cs.berkeley.edu>
Sat, 19 Oct 2013 05:28:58 +0000 (22:28 -0700)
env/p/riscv_test.h
env/pt/riscv_test.h
env/v/entry.S
env/v/riscv_test.h
isa/rv64uf/Makefrag
isa/rv64ui/Makefrag
isa/rv64uv/Makefrag

index 955afc0464ace01488706e1eacf04fe52daa4bc3..8cc7955fc9e5c1873320260aba81044cfc352817 100644 (file)
@@ -57,9 +57,9 @@
 2:fssr x0;                                                              \
 
 #define RVTEST_VEC_ENABLE                                               \
-  setpcr status, SR_EV;                                                 \
+  setpcr status, SR_EA;                                                 \
   mfpcr a0, status;                                                     \
-  and   a0, a0, SR_EV;                                                  \
+  and   a0, a0, SR_EA;                                                  \
   bnez  a0, 2f;                                                         \
   RVTEST_PASS;                                                          \
 2:                                                                      \
index e56267f598c650c985bb9158c05d06aaac8feda7..66eb59c727208407acad29f6c391166c80d6b41d 100644 (file)
@@ -43,38 +43,7 @@ regspill:                          \
         .dword 0xdeadbeefcafebabe; \
         .dword 0xdeadbeefcafebabe; \
 evac:                              \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
-        .dword 0xdeadbeefcafebabe; \
+        .skip 32768;               \
 
 //-----------------------------------------------------------------------
 // Misc
@@ -84,13 +53,32 @@ evac:                              \
         mtpcr x0,clear_ipi;          \
         mfpcr a0,status;             \
         li a1,SR_IM;                 \
+        or a0,a0,a1;                 \
         mtpcr a0,status;             \
+        setpcr status,SR_EI;         \
         la a0,_handler;              \
         mtpcr a0,evec;               \
         mtpcr x0,count;              \
         addi a0,x0,60;               \
         mtpcr a0,compare;            \
 
+#define XCPT_HANDLER \
+_handler: \
+        mtpcr a0,sup0;               \
+        mtpcr a1,sup1;               \
+        vxcptcause x0;               \
+        la a0,evac;                  \
+        vxcptsave a0;                \
+        vxcptrestore a0;             \
+        setpcr status,SR_PEI;        \
+        mfpcr a0,count;              \
+        addi a0,a0,60;               \
+        mtpcr a0,compare;            \
+        mfpcr a0,sup0;               \
+        mfpcr a1,sup1;               \
+        eret;                        \
+
+#if 0
 #define XCPT_HANDLER \
 _handler: \
         mtpcr a0,sup0;               \
@@ -167,3 +155,5 @@ _done_skip: \
         eret;                        \
 
 #endif
+
+#endif
index 77107ffc3dccfcf65d55a467f53786a4054b09ab..541abae28cb9c78c48a45f16c42043c25a4ceb14 100644 (file)
@@ -156,7 +156,8 @@ trap_entry:
 2:jal   handle_trap
 
   # when coming from kernel, continue below its stack
-1:add   x2, sp, -SIZEOF_TRAPFRAME_T
+1:li x2,17712
+  sub   x2, sp, x2
   jal   save_tf
   move  sp,x2
   setpcr status, SR_EI
index 75a13888844e2a60332fc6d583b0c8243e90db64..d9b23fb60e4d1f3b0782257351aeb25d7ad6a893 100644 (file)
@@ -86,7 +86,7 @@ userstart:                                                              \
 #define PGSHIFT 13
 #define PGSIZE (1 << PGSHIFT)
 
-#define SIZEOF_TRAPFRAME_T 1328
+#define SIZEOF_TRAPFRAME_T 20784
 
 #ifndef __ASSEMBLER__
 
@@ -147,7 +147,7 @@ typedef struct
   long cause;
   long insn;
   long hwacha_cause;
-  long evac[128];
+  long evac[2560];
 } trapframe_t;
 #endif
 
index f18361ad10ee32f141b48937c6810f74cc632e4a..fc9da14b4151ac02476f29266de5cf1b65805ede 100644 (file)
@@ -15,4 +15,4 @@ rv64uf_p_vec_tests = $(addprefix rv64uf-p-vec-, $(rv64uf_sc_vec_tests))
 rv64uf_pt_vec_tests = $(addprefix rv64uf-pt-vec-, $(rv64uf_sc_vec_tests))
 rv64uf_v_vec_tests = $(addprefix rv64uf-v-vec-, $(rv64uf_sc_vec_tests))
 
-spike_tests += $(rv64uf_p_tests) $(rv64uf_v_tests) $(rv64uf_p_vec_tests) $(rv64uf_v_vec_tests) #$(rv64uf_pt_vec_tests)
+spike_tests += $(rv64uf_p_tests) $(rv64uf_v_tests) $(rv64uf_p_vec_tests) $(rv64uf_pt_vec_tests) $(rv64uf_v_vec_tests)
index 473d07dfde2b3e4bb43ed1f9af47e95e80c57eee..fd4ac41e1a8e872f0593a7406d54b959ee45c0d7 100644 (file)
@@ -49,4 +49,4 @@ rv64ui_p_vec_tests = $(addprefix rv64ui-p-vec-, $(rv64ui_sc_vec_tests))
 rv64ui_pt_vec_tests = $(addprefix rv64ui-pt-vec-, $(rv64ui_sc_vec_tests))
 rv64ui_v_vec_tests = $(addprefix rv64ui-v-vec-, $(rv64ui_sc_vec_tests))
 
-spike_tests += $(rv64ui_p_tests) $(rv64ui_pm_tests) $(rv64ui_v_tests) $(rv64ui_p_vec_tests) $(rv64ui_v_vec_tests) #$(rv64ui_pt_vec_tests)
+spike_tests += $(rv64ui_p_tests) $(rv64ui_pm_tests) $(rv64ui_v_tests) $(rv64ui_p_vec_tests) $(rv64ui_pt_vec_tests) $(rv64ui_v_vec_tests)
index 78d78e2503df8c7965430c3fa729fae1a23f306e..53c652567dddceaa583ffab694fdb5077f7c6350 100644 (file)
@@ -30,4 +30,4 @@ rv64uv_p_vec_tests = $(addprefix rv64uv-p-vec-, $(rv64uv_sc_vec_tests))
 rv64uv_pt_vec_tests = $(addprefix rv64uv-pt-vec-, $(rv64uv_sc_vec_tests))
 rv64uv_v_vec_tests = $(addprefix rv64uv-v-vec-, $(rv64uv_sc_vec_tests))
 
-spike_tests += $(rv64uv_p_tests) $(rv64uv_v_tests)
+spike_tests += $(rv64uv_p_tests) $(rv64uv_pt_tests) $(rv64uv_v_tests)