From: "Christoph Müllner" <christoph.muellner@vrull.eu>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: Jin Ma <jinma@linux.alibaba.com>,
gcc-patches@gcc.gnu.org, kito.cheng@gmail.com,
jinma.contrib@gmail.com,
Philipp Tomsich <philipp.tomsich@vrull.eu>
Subject: Re: [PATCH v2] RISC-V: T-HEAD: Add support for the XTheadInt ISA extension
Date: Wed, 10 Jan 2024 18:56:33 +0100 [thread overview]
Message-ID: <CAEg0e7hkihD40asj5ci=Ccnu_-X7DRbo7Rf2sMrWTrttBb0viA@mail.gmail.com> (raw)
In-Reply-To: <0b3ac135-7ccf-4aa7-86ac-970e6b3213fe@gmail.com>
On Tue, Jan 9, 2024 at 6:59 PM Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
>
> On 11/17/23 00:33, Jin Ma wrote:
> > The XTheadInt ISA extension provides acceleration interruption
> > instructions as defined in T-Head-specific:
> > * th.ipush
> > * th.ipop
> >
> > Ref:
> > https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.3.0/xthead-2023-11-10-2.3.0.pdf
> >
> > gcc/ChangeLog:
> >
> > * config/riscv/riscv-protos.h (th_int_get_mask): New prototype.
> > (th_int_get_save_adjustment): Likewise.
> > (th_int_adjust_cfi_prologue): Likewise.
> > * config/riscv/riscv.cc (TH_INT_INTERRUPT): New macro.
> > (riscv_expand_prologue): Add the processing of XTheadInt.
> > (riscv_expand_epilogue): Likewise.
> > * config/riscv/riscv.md: New unspec.
> > * config/riscv/thead.cc (BITSET_P): New macro.
> > * config/riscv/thead.md (th_int_push): New pattern.
> > (th_int_pop): New pattern.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * gcc.target/riscv/xtheadint-push-pop.c: New test.
> Thanks for the ping earlier today. I've looked at this patch repeatedly
> over the last few weeks, but never enough to give it a full review.
>
>
> > diff --git a/gcc/config/riscv/thead.md b/gcc/config/riscv/thead.md
> > index 2babfafb23c..4d6e16c0edc 100644
> > --- a/gcc/config/riscv/thead.md
> > +++ b/gcc/config/riscv/thead.md
>
> > +(define_insn "th_int_pop"
> > + [(unspec_volatile [(const_int 0)] UNSPECV_XTHEADINT_POP)
> > + (clobber (reg:SI RETURN_ADDR_REGNUM))
> > + (clobber (reg:SI T0_REGNUM))
> > + (clobber (reg:SI T1_REGNUM))
> > + (clobber (reg:SI T2_REGNUM))
> > + (clobber (reg:SI A0_REGNUM))
> > + (clobber (reg:SI A1_REGNUM))
> > + (clobber (reg:SI A2_REGNUM))
> > + (clobber (reg:SI A3_REGNUM))
> > + (clobber (reg:SI A4_REGNUM))
> > + (clobber (reg:SI A5_REGNUM))
> > + (clobber (reg:SI A6_REGNUM))
> > + (clobber (reg:SI A7_REGNUM))
> > + (clobber (reg:SI T3_REGNUM))
> > + (clobber (reg:SI T4_REGNUM))
> > + (clobber (reg:SI T5_REGNUM))
> > + (clobber (reg:SI T6_REGNUM))
> > + (return)]
> > + "TARGET_XTHEADINT && !TARGET_64BIT"
> > + "th.ipop"
> > + [(set_attr "type" "ret")
> > + (set_attr "mode" "SI")])
> I probably would have gone with a load type since its the loads that are
> most likely to interact existing code in the pipeline. But I doubt it
> really matters in practice.
>
>
> OK for the trunk. Thanks for your patience.
I've retested this locally (no regressions), completed the ChangeLog
in the commit message and committed.
Thanks,
Christoph
prev parent reply other threads:[~2024-01-10 17:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 21:46 [PATCH 0/7] Add XThead* support Christoph Muellner
2022-11-13 21:46 ` [PATCH 1/7] riscv: Add basic XThead* vendor extension support Christoph Muellner
2022-11-13 21:46 ` [PATCH 2/7] riscv: riscv-cores.def: Add T-Head XuanTie C906 Christoph Muellner
2022-11-18 4:50 ` cooper.qu
2022-11-18 4:58 ` Palmer Dabbelt
2022-11-13 21:46 ` [PATCH 3/7] riscv: thead: Add support for XTheadBa and XTheadBs ISA extensions Christoph Muellner
2022-11-13 21:46 ` [PATCH 4/7] riscv: thead: Add support for XTheadCondMov " Christoph Muellner
2022-11-13 21:46 ` [PATCH 5/7] riscv: thead: Add support for XTheadBb ISA extension Christoph Muellner
2022-11-18 4:21 ` cooper.qu
2022-11-13 21:46 ` [PATCH 6/7] riscv: thead: Add support for XTheadMac " Christoph Muellner
2022-11-13 21:46 ` [PATCH 7/7] riscv: Add basic extension support for XTheadFmv and XTheadInt Christoph Muellner
2022-11-18 4:43 ` cooper.qu
2023-11-02 7:26 ` [RE] [7/7] " Jin Ma
2023-11-02 7:42 ` Christoph Müllner
2023-11-07 3:04 ` [PATCH] riscv: thead: Add support for the XTheadInt ISA extension Jin Ma
2023-11-10 15:05 ` Christoph Müllner
2023-11-17 7:33 ` [PATCH v2] RISC-V: T-HEAD: " Jin Ma
2024-01-09 9:35 ` Jin Ma
2024-01-09 17:59 ` [PATCH " Jeff Law
2024-01-10 17:56 ` Christoph Müllner [this message]
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='CAEg0e7hkihD40asj5ci=Ccnu_-X7DRbo7Rf2sMrWTrttBb0viA@mail.gmail.com' \
--to=christoph.muellner@vrull.eu \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=jinma.contrib@gmail.com \
--cc=jinma@linux.alibaba.com \
--cc=kito.cheng@gmail.com \
--cc=philipp.tomsich@vrull.eu \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).