diff options
author | Dave Brolley <brolley@redhat.com> | 2006-10-18 18:13:22 +0000 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2006-10-18 18:13:22 +0000 |
commit | c7e628df2ea65e93345a60bab86af1428213f94d (patch) | |
tree | 53fbbd6ae5ad2d04d4b4db43b7022bd97ce75308 /sim/sh64/cpu.h | |
parent | 4ce7dc156114d9acd1243857ea79e4b24ac6af32 (diff) | |
download | gdb-c7e628df2ea65e93345a60bab86af1428213f94d.zip gdb-c7e628df2ea65e93345a60bab86af1428213f94d.tar.gz gdb-c7e628df2ea65e93345a60bab86af1428213f94d.tar.bz2 |
2006-10-18 Dave Brolley <brolley@redhat.com>
* Contribute the following changes:
2006-06-14 Dave Brolley <brolley@redhat.com>
* sh64-sim.h (sh64_fipr,sh64_fiprs,sh64_fldp,sh64_fstp,sh64_ftrv)
(sh64_fpref): New functions.
* sh64.c (sh64_fipr,sh64_fiprs,sh64_fldp,sh64_fstp,sh64_ftrv)
(sh64_fpref): New functions.
(sh_models): Add sh2e, sh2a, sh2a_nofpu, sh4_nofpu, sh4a,
sh4a_nofpu and sh4al.
(sh2e_mach): New MACH.
(sh2a_fpu_mach): New MACH.
(sh2a_nofpu_mach): New MACH.
(sh4_nofpu): New MACH.
(sh4a_mach): New MACH.
(sh4a_nofpu_mach): New MACH.
(sh4al_mach): New MACH.
* Makefile.in (stamp-*): Depend on $(CGEN_CPU_DIR)/sh-sim.cpu. Pass
archfile to CGEN script.
* arch.c: Regenerated.
* arch.h: Regenerated.
* cpu.c: Regenerated.
* cpu.h: Regenerated.
* cpuall.h: Regenerated.
* decode-compact.c: Regenerated.
* decode-compact.h: Regenerated.
* decode-media.c: Regenerated.
* decode-media.h: Regenerated.
* defs-compact.h: Regenerated.
* defs-media.h: Regenerated.
* sem-compact-switch.c: Regenerated.
* sem-compact.c: Regenerated.
* sem-media-switch.c: Regenerated.
* sem-media.c: Regenerated.
* sh-desc.c: Regenerated.
* sh-desc.h: Regenerated.
* sh-opc.h: Regenerated.
Diffstat (limited to 'sim/sh64/cpu.h')
-rw-r--r-- | sim/sh64/cpu.h | 96 |
1 files changed, 65 insertions, 31 deletions
diff --git a/sim/sh64/cpu.h b/sim/sh64/cpu.h index 6e0d358..a5d6f34b 100644 --- a/sim/sh64/cpu.h +++ b/sim/sh64/cpu.h @@ -2,9 +2,9 @@ THIS FILE IS MACHINE GENERATED WITH CGEN. -Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +Copyright 1996-2005 Free Software Foundation, Inc. -This file is part of the GNU Simulators. +This file is part of the GNU simulators. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -80,10 +80,32 @@ CPU (h_cr[(index)]) = (x);\ SF h_fr[64]; #define GET_H_FR(a1) CPU (h_fr)[a1] #define SET_H_FR(a1, x) (CPU (h_fr)[a1] = (x)) - /* Single precision floating point register pairs */ - DF h_fp[32]; -#define GET_H_FP(a1) CPU (h_fp)[a1] -#define SET_H_FP(a1, x) (CPU (h_fp)[a1] = (x)) + /* Single/Double precision floating point registers */ + DF h_fsd[16]; +#define GET_H_FSD(index) ((GET_H_PRBIT ()) ? (GET_H_DRC (index)) : (CGEN_CPU_FPU (current_cpu)->ops->fextsfdf (CGEN_CPU_FPU (current_cpu), CPU (h_fr[index])))) +#define SET_H_FSD(index, x) \ +do { \ +if (GET_H_PRBIT ()) {\ +SET_H_DRC ((index), (x));\ +} else {\ +SET_H_FRC ((index), CGEN_CPU_FPU (current_cpu)->ops->ftruncdfsf (CGEN_CPU_FPU (current_cpu), (x)));\ +}\ +;} while (0) + /* floating point registers for fmov */ + DF h_fmov[16]; +#define GET_H_FMOV(index) ((NOTBI (GET_H_SZBIT ())) ? (CGEN_CPU_FPU (current_cpu)->ops->fextsfdf (CGEN_CPU_FPU (current_cpu), GET_H_FRC (index))) : (((((((index) & (1))) == (1))) ? (GET_H_XD (((index) & ((~ (1)))))) : (GET_H_DR (index))))) +#define SET_H_FMOV(index, x) \ +do { \ +if (NOTBI (GET_H_SZBIT ())) {\ +SET_H_FRC ((index), CGEN_CPU_FPU (current_cpu)->ops->ftruncdfsf (CGEN_CPU_FPU (current_cpu), (x)));\ +} else {\ +if ((((((index)) & (1))) == (1))) {\ +SET_H_XD ((((index)) & ((~ (1)))), (x));\ +} else {\ +SET_H_DR ((index), (x));\ +}\ +}\ +;} while (0) /* Branch target registers */ DI h_tr[8]; #define GET_H_TR(a1) CPU (h_tr)[a1] @@ -106,20 +128,20 @@ cgen_rtx_error (current_cpu, "cannot set ism directly");\ do { \ CPU (h_gr[(index)]) = EXTSIDI ((x));\ ;} while (0) -#define GET_H_FRBIT() ANDSI (SRLSI (CPU (h_sr), 14), 1) +#define GET_H_FRBIT() ANDSI (SRLSI (CPU (h_fpscr), 21), 1) #define SET_H_FRBIT(x) \ do { \ -CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (14))))), SLLSI ((x), 14));\ +CPU (h_fpscr) = ORSI (ANDSI (CPU (h_fpscr), (~ (((1) << (21))))), SLLSI ((x), 21));\ ;} while (0) -#define GET_H_SZBIT() ANDSI (SRLSI (CPU (h_sr), 13), 1) +#define GET_H_SZBIT() ANDSI (SRLSI (CPU (h_fpscr), 20), 1) #define SET_H_SZBIT(x) \ do { \ -CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (13))))), SLLSI ((x), 13));\ +CPU (h_fpscr) = ORSI (ANDSI (CPU (h_fpscr), (~ (((1) << (20))))), SLLSI ((x), 20));\ ;} while (0) -#define GET_H_PRBIT() ANDSI (SRLSI (CPU (h_sr), 12), 1) +#define GET_H_PRBIT() ANDSI (SRLSI (CPU (h_fpscr), 19), 1) #define SET_H_PRBIT(x) \ do { \ -CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (12))))), SLLSI ((x), 12));\ +CPU (h_fpscr) = ORSI (ANDSI (CPU (h_fpscr), (~ (((1) << (19))))), SLLSI ((x), 19));\ ;} while (0) #define GET_H_SBIT() ANDSI (SRLSI (CPU (h_sr), 1), 1) #define SET_H_SBIT(x) \ @@ -136,15 +158,20 @@ CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (9))))), SLLSI ((x), 9));\ do { \ CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (8))))), SLLSI ((x), 8));\ ;} while (0) -#define GET_H_FV(index) CPU (h_fr[MULQI (ANDQI (index, 15), 4)]) +#define GET_H_FP(index) CPU (h_fr[index]) +#define SET_H_FP(index, x) \ +do { \ +CPU (h_fr[(index)]) = (x);\ +;} while (0) +#define GET_H_FV(index) CPU (h_fr[index]) #define SET_H_FV(index, x) \ do { \ -CPU (h_fr[MULQI (ANDQI ((index), 15), 4)]) = (x);\ +CPU (h_fr[(index)]) = (x);\ ;} while (0) -#define GET_H_FMTX(index) CPU (h_fr[MULQI (ANDQI (index, 3), 16)]) +#define GET_H_FMTX(index) CPU (h_fr[index]) #define SET_H_FMTX(index, x) \ do { \ -CPU (h_fr[MULQI (ANDQI ((index), 3), 16)]) = (x);\ +CPU (h_fr[(index)]) = (x);\ ;} while (0) #define GET_H_DR(index) SUBWORDDIDF (ORDI (SLLDI (ZEXTSIDI (SUBWORDSFSI (CPU (h_fr[index]))), 32), ZEXTSIDI (SUBWORDSFSI (CPU (h_fr[((index) + (1))]))))) #define SET_H_DR(index, x) \ @@ -184,21 +211,16 @@ SET_H_DR (((((16) * (NOTBI (GET_H_FRBIT ())))) + ((index))), (x));\ do { \ CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + ((index)))]) = (x);\ ;} while (0) -#define GET_H_FPCCR() ORSI (ORSI (ORSI (CPU (h_fpscr), SLLSI (GET_H_PRBIT (), 19)), SLLSI (GET_H_SZBIT (), 20)), SLLSI (GET_H_FRBIT (), 21)) -#define SET_H_FPCCR(x) \ -do { \ -{\ -CPU (h_fpscr) = (x);\ -SET_H_PRBIT (ANDSI (SRLSI ((x), 19), 1));\ -SET_H_SZBIT (ANDSI (SRLSI ((x), 20), 1));\ -SET_H_FRBIT (ANDSI (SRLSI ((x), 21), 1));\ -}\ -;} while (0) #define GET_H_GBR() SUBWORDDISI (CPU (h_gr[((UINT) 16)]), 1) #define SET_H_GBR(x) \ do { \ CPU (h_gr[((UINT) 16)]) = EXTSIDI ((x));\ ;} while (0) +#define GET_H_VBR() SUBWORDDISI (CPU (h_gr[((UINT) 20)]), 1) +#define SET_H_VBR(x) \ +do { \ +CPU (h_gr[((UINT) 20)]) = EXTSIDI ((x));\ +;} while (0) #define GET_H_PR() SUBWORDDISI (CPU (h_gr[((UINT) 18)]), 1) #define SET_H_PR(x) \ do { \ @@ -247,14 +269,18 @@ BI sh64_h_qbit_get (SIM_CPU *); void sh64_h_qbit_set (SIM_CPU *, BI); SF sh64_h_fr_get (SIM_CPU *, UINT); void sh64_h_fr_set (SIM_CPU *, UINT, SF); -DF sh64_h_fp_get (SIM_CPU *, UINT); -void sh64_h_fp_set (SIM_CPU *, UINT, DF); +SF sh64_h_fp_get (SIM_CPU *, UINT); +void sh64_h_fp_set (SIM_CPU *, UINT, SF); SF sh64_h_fv_get (SIM_CPU *, UINT); void sh64_h_fv_set (SIM_CPU *, UINT, SF); SF sh64_h_fmtx_get (SIM_CPU *, UINT); void sh64_h_fmtx_set (SIM_CPU *, UINT, SF); DF sh64_h_dr_get (SIM_CPU *, UINT); void sh64_h_dr_set (SIM_CPU *, UINT, DF); +DF sh64_h_fsd_get (SIM_CPU *, UINT); +void sh64_h_fsd_set (SIM_CPU *, UINT, DF); +DF sh64_h_fmov_get (SIM_CPU *, UINT); +void sh64_h_fmov_set (SIM_CPU *, UINT, DF); DI sh64_h_tr_get (SIM_CPU *, UINT); void sh64_h_tr_set (SIM_CPU *, UINT, DI); BI sh64_h_endian_get (SIM_CPU *); @@ -271,10 +297,10 @@ DF sh64_h_xd_get (SIM_CPU *, UINT); void sh64_h_xd_set (SIM_CPU *, UINT, DF); SF sh64_h_fvc_get (SIM_CPU *, UINT); void sh64_h_fvc_set (SIM_CPU *, UINT, SF); -SI sh64_h_fpccr_get (SIM_CPU *); -void sh64_h_fpccr_set (SIM_CPU *, SI); SI sh64_h_gbr_get (SIM_CPU *); void sh64_h_gbr_set (SIM_CPU *, SI); +SI sh64_h_vbr_get (SIM_CPU *); +void sh64_h_vbr_set (SIM_CPU *, SI); SI sh64_h_pr_get (SIM_CPU *); void sh64_h_pr_set (SIM_CPU *, SI); SI sh64_h_macl_get (SIM_CPU *); @@ -290,8 +316,16 @@ extern CPUREG_STORE_FN sh64_store_register; typedef struct { int empty; +} MODEL_SH4_DATA; + +typedef struct { + int empty; } MODEL_SH5_DATA; +typedef struct { + int empty; +} MODEL_SH5_MEDIA_DATA; + /* Collection of various things for the trace handler to use. */ typedef struct trace_record { |