public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Jim Wilson <jimw@sifive.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] RISC-V: Include more registers in SIBCALL_REGS.
Date: Thu, 17 Oct 2019 14:15:00 -0000	[thread overview]
Message-ID: <20191017140920.GZ4962@embecosm.com> (raw)
In-Reply-To: <20191016210445.20232-1-jimw@sifive.com>

* Jim Wilson <jimw@sifive.com> [2019-10-16 14:04:45 -0700]:

> This finishes the part 1 of 2 patch submitted by Andrew Burgess on Aug 19.
> This adds the argument registers but not t0 (aka x5) to SIBCALL_REGS.  It
> also adds the missing riscv_regno_to_class change.
> 
> Tested with cross riscv32-elf and riscv64-linux toolchain build and check.
> There were no regressions.  I see about a 0.01% code size reduction for the
> C and libstdc++ libraries.
> 
> Committed.

Thanks for doing this Jim.

I'm still working on part 2, I'm hoping to have a revised patch posted
by Monday next week.

Thanks again,
Andrew



> 
> Jim
> 
> 	gcc/
> 	* config/riscv/riscv.h (REG_CLASS_CONTENTS): Add argument passing
> 	regs to SIBCALL_REGS.
> 	* config/riscv/riscv.c (riscv_regno_to_class): Change argument
> 	passing regs to SIBCALL_REGS.
> ---
>  gcc/config/riscv/riscv.c | 6 +++---
>  gcc/config/riscv/riscv.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
> index b8a8778b92c..77a3ad94aa8 100644
> --- a/gcc/config/riscv/riscv.c
> +++ b/gcc/config/riscv/riscv.c
> @@ -256,9 +256,9 @@ enum riscv_microarchitecture_type riscv_microarchitecture;
>  const enum reg_class riscv_regno_to_class[FIRST_PSEUDO_REGISTER] = {
>    GR_REGS,	GR_REGS,	GR_REGS,	GR_REGS,
>    GR_REGS,	GR_REGS,	SIBCALL_REGS,	SIBCALL_REGS,
> -  JALR_REGS,	JALR_REGS,	JALR_REGS,	JALR_REGS,
> -  JALR_REGS,	JALR_REGS,	JALR_REGS,	JALR_REGS,
> -  JALR_REGS,	JALR_REGS, 	JALR_REGS,	JALR_REGS,
> +  JALR_REGS,	JALR_REGS,	SIBCALL_REGS,	SIBCALL_REGS,
> +  SIBCALL_REGS,	SIBCALL_REGS,	SIBCALL_REGS,	SIBCALL_REGS,
> +  SIBCALL_REGS,	SIBCALL_REGS,	JALR_REGS,	JALR_REGS,
>    JALR_REGS,	JALR_REGS,	JALR_REGS,	JALR_REGS,
>    JALR_REGS,	JALR_REGS,	JALR_REGS,	JALR_REGS,
>    SIBCALL_REGS,	SIBCALL_REGS,	SIBCALL_REGS,	SIBCALL_REGS,
> diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
> index 5fc9be8edbf..246494663f6 100644
> --- a/gcc/config/riscv/riscv.h
> +++ b/gcc/config/riscv/riscv.h
> @@ -400,7 +400,7 @@ enum reg_class
>  #define REG_CLASS_CONTENTS						\
>  {									\
>    { 0x00000000, 0x00000000, 0x00000000 },	/* NO_REGS */		\
> -  { 0xf00000c0, 0x00000000, 0x00000000 },	/* SIBCALL_REGS */	\
> +  { 0xf003fcc0, 0x00000000, 0x00000000 },	/* SIBCALL_REGS */	\
>    { 0xffffffc0, 0x00000000, 0x00000000 },	/* JALR_REGS */		\
>    { 0xffffffff, 0x00000000, 0x00000000 },	/* GR_REGS */		\
>    { 0x00000000, 0xffffffff, 0x00000000 },	/* FP_REGS */		\
> -- 
> 2.17.1
> 

  reply	other threads:[~2019-10-17 14:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 19:31 [PATCH 0/2] RISCV: Reduce code size when compiling with -msave-restore Andrew Burgess
2019-08-19 19:47 ` [PATCH 2/2] gcc/riscv: Add a mechanism to remove some calls to _riscv_save_0 Andrew Burgess
2019-08-23  7:46   ` Jim Wilson
2019-08-26  2:17     ` Jim Wilson
2019-08-31  2:55       ` Jim Wilson
2019-08-31 13:12         ` Andreas Schwab
2019-08-31 13:57         ` Andreas Schwab
2019-09-06 23:41           ` Jim Wilson
2019-08-24 17:18   ` Jim Wilson
2019-10-21 12:53   ` Andrew Burgess
2019-10-23  0:59     ` Jim Wilson
2019-10-28 17:18       ` Andrew Burgess
2019-08-19 19:50 ` [PATCH 1/2] gcc/riscv: Include more registers in SIBCALL_REGS Andrew Burgess
2019-08-19 19:54   ` Andrew Waterman
2019-08-23  7:13   ` Jim Wilson
2019-08-24 10:55     ` Jim Wilson
2019-10-16 21:14   ` [PATCH] RISC-V: " Jim Wilson
2019-10-17 14:15     ` Andrew Burgess [this message]
2019-10-17 22:05       ` Jim Wilson
2019-10-17 22:22         ` Andrew Burgess

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=20191017140920.GZ4962@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jimw@sifive.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: 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).