aboutsummaryrefslogtreecommitdiff
path: root/sim/v850/simops.h
diff options
context:
space:
mode:
Diffstat (limited to 'sim/v850/simops.h')
-rw-r--r--sim/v850/simops.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/sim/v850/simops.h b/sim/v850/simops.h
index 750fb70..f18da2f 100644
--- a/sim/v850/simops.h
+++ b/sim/v850/simops.h
@@ -75,4 +75,51 @@ int OP_22007E0 (void);
int OP_307F0 (void);
int OP_107F0 (void);
int OP_307E0 (void);
+
+int v850_float_compare(SIM_DESC sd, int cmp, sim_fpu wop1, sim_fpu wop2, int double_op_p);
+
+/* MEMORY ACCESS */
+unsigned32 load_data_mem(SIM_DESC sd, SIM_ADDR addr, int len);
+void store_data_mem(SIM_DESC sd, SIM_ADDR addr, int len, unsigned32 data);
+
+unsigned long Add32 (unsigned long a1, unsigned long a2, int * carry);
+
+/* FPU */
+
+/*
+ FPU: update FPSR flags
+ invalid, inexact, overflow, underflow
+ */
+
+extern void check_invalid_snan (SIM_DESC sd, sim_fpu_status, unsigned int);
+
+#define check_cvt_fi(sd, status, double_op_p) \
+ update_fpsr (sd, status, FPSR_XEV | FPSR_XEI, double_op_p)
+
+#define check_cvt_if(sd, status, double_op_p) \
+ update_fpsr (sd, status, FPSR_XEI, double_op_p)
+
+#define check_cvt_ff(sd, status, double_op_p) \
+ update_fpsr (sd, status, FPSR_XEV | FPSR_XEI | FPSR_XEO | FPSR_XEU, double_op_p)
+
+extern void update_fpsr (SIM_DESC sd, sim_fpu_status, unsigned int, unsigned int);
+
+
+/*
+ Exception
+ */
+void SignalException (SIM_DESC sd);
+void SignalExceptionFPE (SIM_DESC sd, unsigned int double_op_p);
+
+int mpu_load_mem_test (SIM_DESC sd, unsigned int addr, int len, int base_reg);
+int mpu_store_mem_test (SIM_DESC sd, unsigned int addr, int len, int base_reg);
+
+void v850_sar (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p);
+void v850_shl (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p);
+void v850_shr (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p);
+void v850_satadd (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p);
+void v850_satsub (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p);
+void v850_div (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p, unsigned int *op3p);
+void v850_divu (SIM_DESC sd, unsigned int op0, unsigned int op1, unsigned int *op2p, unsigned int *op3p);
+
#endif