diff options
author | Kevin Buettner <kevinb@redhat.com> | 2012-03-29 00:57:19 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2012-03-29 00:57:19 +0000 |
commit | 2aaed97917d92e80a00b7fb9d160e2d13f1ae720 (patch) | |
tree | a05d69cab5edb7a5c0738eecda4460b372386f5c /sim/v850/simops.h | |
parent | 1c1b6f059a33df3da4f61b21f22c341658f06c27 (diff) | |
download | gdb-2aaed97917d92e80a00b7fb9d160e2d13f1ae720.zip gdb-2aaed97917d92e80a00b7fb9d160e2d13f1ae720.tar.gz gdb-2aaed97917d92e80a00b7fb9d160e2d13f1ae720.tar.bz2 |
Commit gdb and sim support for v850e2 and v850e2v3 on behalf of
Rathish C <Rathish.C@kpitcummins.com>.
Diffstat (limited to 'sim/v850/simops.h')
-rw-r--r-- | sim/v850/simops.h | 47 |
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 |