diff options
author | Jiangshuai Li <jiangshuai_li@c-sky.com> | 2022-06-28 11:05:30 +0800 |
---|---|---|
committer | Jiangshuai Li <jiangshuai_li@c-sky.com> | 2022-06-28 11:05:30 +0800 |
commit | e3940312c14b1857a92e4e282419402e36ac4cc6 (patch) | |
tree | 3e8bf8203309ba4735cb4232b515d50a662d64a3 /gdb/csky-tdep.h | |
parent | 7c24bdc583511d7c98a37d77f5536a005075ff05 (diff) | |
download | gdb-e3940312c14b1857a92e4e282419402e36ac4cc6.zip gdb-e3940312c14b1857a92e4e282419402e36ac4cc6.tar.gz gdb-e3940312c14b1857a92e4e282419402e36ac4cc6.tar.bz2 |
gdb:csky add pseudo regs for float and vector regs
In the existing CSKY architecture, there are at most 32 floating
and 16 vector registers. Float registers's count can be configured
as 16 or 32. In the future, the vector registers's count may be
extended to 32.
The bit width of floating-point register is 64bits, and the bit
width of vector register is 128bit.
Special points: in fr0~fr15 and vr0~vr15, each FRx is the lower
64 bits of the corresponding VRx.
Here, we will split each floating-point and vector register to
32bits wide, add the corresponding pseudo registers, and finally
use them for the dwarf registers.
There are 128 pseudo registers in total, s0~s127, including:
1. s0 and s1 correspond to fr0, s4 and s5 correspond to fr1, and so on.
Every two separated pseudo registers correspond to a float register.
2. s0, s1, s2 and s3 correspond to vr0; s4, s5, s6 and s7 correspond to vr1,
and so on. Every four pseudo registers corresponds to a vector register.
Therefore, in s64~s127, there are general registers that are not actually
used. This part is to prepare for the expansion of vector registers to 32
Therefore, in s64~s127, half of the registers are actually unused. This
part is to prepare for the expansion of the vector register to 32.
Diffstat (limited to 'gdb/csky-tdep.h')
-rw-r--r-- | gdb/csky-tdep.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/csky-tdep.h b/gdb/csky-tdep.h index adfe9fa..4ff8a6b 100644 --- a/gdb/csky-tdep.h +++ b/gdb/csky-tdep.h @@ -37,6 +37,10 @@ struct csky_gdbarch_tdep : gdbarch_tdep unsigned int fpu_abi; unsigned int fpu_hardfp; unsigned int vdsp_version; + + /* Save fv_pseudo_registers_count. */ + unsigned int has_vr0; + unsigned int fv_pseudo_registers_count; }; /* Instruction sizes. */ @@ -101,6 +105,9 @@ enum csky_regnum #define CSKY_TDESC_REGS_LR_NUMBERED (1 << 2) #define CSKY_TDESC_REGS_ESSENTIAL_VALUE (7) +/* For fr0~fr15, fr16~fr31, vr0~vr15 check. */ +#define CSKY_FULL16_ONEHOT_VALUE 0xffff + /* Number of processor registers w/o ICE registers. */ #define CSKY_NUM_REGS (CSKY_MAX_REGS - CSKY_CRBANK_NUM_REGS) |