From: Alistair Francis <alistair23@gmail.com> To: LIU Zhiwei <zhiwei_liu@c-sky.com> Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>, Richard Henderson <richard.henderson@linaro.org>, "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>, wxy194768@alibaba-inc.com, Chih-Min Chao <chihmin.chao@sifive.com>, wenmeng_zhang@c-sky.com, Palmer Dabbelt <palmer@dabbelt.com> Subject: Re: [PATCH v5 1/4] target/riscv: add vector extension field in CPURISCVState Date: Wed, 26 Feb 2020 10:03:58 -0800 [thread overview] Message-ID: <CAKmqyKMGp_MdJuRZHDNHxAD2wR6xet8DQ6Umt-NO7uT-cr_P6w@mail.gmail.com> (raw) In-Reply-To: <20200221094531.61894-2-zhiwei_liu@c-sky.com> On Fri, Feb 21, 2020 at 1:45 AM LIU Zhiwei <zhiwei_liu@c-sky.com> wrote: > > The 32 vector registers will be viewed as a continuous memory block. > It avoids the convension between element index and (regno, offset). > Thus elements can be directly accessed by offset from the first vector > base address. > > Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > target/riscv/cpu.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h > index de0a8d893a..2e8d01c155 100644 > --- a/target/riscv/cpu.h > +++ b/target/riscv/cpu.h > @@ -64,6 +64,7 @@ > #define RVA RV('A') > #define RVF RV('F') > #define RVD RV('D') > +#define RVV RV('V') > #define RVC RV('C') > #define RVS RV('S') > #define RVU RV('U') > @@ -93,9 +94,20 @@ typedef struct CPURISCVState CPURISCVState; > > #include "pmp.h" > > +#define RV_VLEN_MAX 512 > + > struct CPURISCVState { > target_ulong gpr[32]; > uint64_t fpr[32]; /* assume both F and D extensions */ > + > + /* vector coprocessor state. */ > + uint64_t vreg[32 * RV_VLEN_MAX / 64] QEMU_ALIGNED(16); > + target_ulong vxrm; > + target_ulong vxsat; > + target_ulong vl; > + target_ulong vstart; > + target_ulong vtype; > + > target_ulong pc; > target_ulong load_res; > target_ulong load_val; > -- > 2.23.0 >
WARNING: multiple messages have this Message-ID (diff)
From: Alistair Francis <alistair23@gmail.com> To: LIU Zhiwei <zhiwei_liu@c-sky.com> Cc: Richard Henderson <richard.henderson@linaro.org>, Chih-Min Chao <chihmin.chao@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, wenmeng_zhang@c-sky.com, wxy194768@alibaba-inc.com, "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>, "open list:RISC-V" <qemu-riscv@nongnu.org> Subject: Re: [PATCH v5 1/4] target/riscv: add vector extension field in CPURISCVState Date: Wed, 26 Feb 2020 10:03:58 -0800 [thread overview] Message-ID: <CAKmqyKMGp_MdJuRZHDNHxAD2wR6xet8DQ6Umt-NO7uT-cr_P6w@mail.gmail.com> (raw) In-Reply-To: <20200221094531.61894-2-zhiwei_liu@c-sky.com> On Fri, Feb 21, 2020 at 1:45 AM LIU Zhiwei <zhiwei_liu@c-sky.com> wrote: > > The 32 vector registers will be viewed as a continuous memory block. > It avoids the convension between element index and (regno, offset). > Thus elements can be directly accessed by offset from the first vector > base address. > > Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > target/riscv/cpu.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h > index de0a8d893a..2e8d01c155 100644 > --- a/target/riscv/cpu.h > +++ b/target/riscv/cpu.h > @@ -64,6 +64,7 @@ > #define RVA RV('A') > #define RVF RV('F') > #define RVD RV('D') > +#define RVV RV('V') > #define RVC RV('C') > #define RVS RV('S') > #define RVU RV('U') > @@ -93,9 +94,20 @@ typedef struct CPURISCVState CPURISCVState; > > #include "pmp.h" > > +#define RV_VLEN_MAX 512 > + > struct CPURISCVState { > target_ulong gpr[32]; > uint64_t fpr[32]; /* assume both F and D extensions */ > + > + /* vector coprocessor state. */ > + uint64_t vreg[32 * RV_VLEN_MAX / 64] QEMU_ALIGNED(16); > + target_ulong vxrm; > + target_ulong vxsat; > + target_ulong vl; > + target_ulong vstart; > + target_ulong vtype; > + > target_ulong pc; > target_ulong load_res; > target_ulong load_val; > -- > 2.23.0 >
next prev parent reply other threads:[~2020-02-26 18:12 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-21 9:45 [PATCH v5 0/4] target-riscv: support vector extension part 1 LIU Zhiwei 2020-02-21 9:45 ` LIU Zhiwei 2020-02-21 9:45 ` [PATCH v5 1/4] target/riscv: add vector extension field in CPURISCVState LIU Zhiwei 2020-02-21 9:45 ` LIU Zhiwei 2020-02-26 18:03 ` Alistair Francis [this message] 2020-02-26 18:03 ` Alistair Francis 2020-02-27 20:32 ` Richard Henderson 2020-02-27 20:32 ` Richard Henderson 2020-02-21 9:45 ` [PATCH v5 2/4] target/riscv: implementation-defined constant parameters LIU Zhiwei 2020-02-21 9:45 ` LIU Zhiwei 2020-02-26 18:05 ` Alistair Francis 2020-02-26 18:05 ` Alistair Francis 2020-02-27 20:33 ` Richard Henderson 2020-02-27 20:33 ` Richard Henderson 2020-02-21 9:45 ` [PATCH v5 3/4] target/riscv: support vector extension csr LIU Zhiwei 2020-02-21 9:45 ` LIU Zhiwei 2020-02-26 18:42 ` Alistair Francis 2020-02-26 18:42 ` Alistair Francis 2020-02-27 0:41 ` LIU Zhiwei 2020-02-27 0:41 ` LIU Zhiwei 2020-02-26 20:16 ` Jim Wilson 2020-02-21 9:45 ` [PATCH v5 4/4] target/riscv: add vector configure instruction LIU Zhiwei 2020-02-21 9:45 ` LIU Zhiwei 2020-02-26 19:20 ` Alistair Francis 2020-02-26 19:20 ` Alistair Francis 2020-02-27 1:41 ` LIU Zhiwei 2020-02-27 1:41 ` LIU Zhiwei 2020-02-27 21:48 ` Alistair Francis 2020-02-27 21:48 ` Alistair Francis 2020-02-26 20:20 ` Jim Wilson 2020-02-26 20:09 ` [PATCH v5 0/4] target-riscv: support vector extension part 1 Jim Wilson 2020-02-26 22:28 ` Alistair Francis 2020-02-26 22:28 ` Alistair Francis 2020-02-26 23:39 ` Jim Wilson 2020-02-26 23:39 ` Jim Wilson 2020-02-26 23:46 ` Alistair Francis 2020-02-26 23:46 ` Alistair Francis
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAKmqyKMGp_MdJuRZHDNHxAD2wR6xet8DQ6Umt-NO7uT-cr_P6w@mail.gmail.com \ --to=alistair23@gmail.com \ --cc=chihmin.chao@sifive.com \ --cc=palmer@dabbelt.com \ --cc=qemu-devel@nongnu.org \ --cc=qemu-riscv@nongnu.org \ --cc=richard.henderson@linaro.org \ --cc=wenmeng_zhang@c-sky.com \ --cc=wxy194768@alibaba-inc.com \ --cc=zhiwei_liu@c-sky.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.