public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: Richard Henderson <rth@twiddle.net>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
	Openrisc <openrisc@lists.librecores.org>,
	GCC patches <gcc-patches@gcc.gnu.org>, Jeff Law <law@redhat.com>
Subject: Re: [OpenRISC] [PATCH v2 4/5] or1k: Initial support for FPU
Date: Wed, 03 Jul 2019 22:21:00 -0000	[thread overview]
Message-ID: <20190703221956.GE2601@lianli.shorne-pla.net> (raw)
In-Reply-To: <64def15b-f701-4a5e-2724-6fb1e859be9a@twiddle.net>

On Wed, Jul 03, 2019 at 09:09:51PM +0200, Richard Henderson wrote:
> On 7/3/19 5:43 PM, Segher Boessenkool wrote:
> >> @@ -212,6 +214,7 @@ enum reg_class
> >>  #define REG_CLASS_CONTENTS      \
> >>  { { 0x00000000, 0x00000000 },	\
> >>    { SIBCALL_REGS_MASK,   0 },	\
> >> +  { 0x7ffffefe, 0x00000000 },	\
> > 
> > Above you said r0, r30, r31 are excluded, but this is r0, r8, r30, or
> > in GCC register numbers, 0, 8, and 31?  You probably should mention r8
> > somewhere (it's because it is the last arg, this avoid problems, I guess?),
> > and the 30/31 thing is confused some way.  Maybe it is all just that one
> > documentation line :-)
> 
> ... and if r8 is excluded because of arguments, I suspect that this is the
> wrong fix, as there's nothing inherently wrong with r7:r8 or r8:r9 as a pair,
> at least that I can see.
> 
> Perhaps function_arg and/or function_arg_advance is the right place for a fix?
> The calling convention says that 64-bit arguments are not split across
> registers+stack, so you already shouldn't have seen (r8, [sp+0]) as a pair.

I will double check, the mask may be wrong.  It should not matter about the
function args.

I didn't see any issue that caused me to add r8.  So I may have just masked thw
rong bit thinking it's r31.  Is there something worng with what I did?

The mask is 0x7ffffefe, and names should corresbond to this name list?

#define REGISTER_NAMES {
  "r0",   "r1",   "r2",   "r3",   "r4",   "r5",   "r6",   "r7",  # 7e, excl r0
  "r8",   "r9",   "r10",  "r11",  "r12",  "r13",  "r14",  "r15", # ff, excl none
  "r17",  "r19",  "r21",  "r23",  "r25",  "r27",  "r29",  "r31", # fe, excl r31
  "r16",  "r18",  "r20",  "r22",  "r24",  "r26",  "r28",  "r30", # fe, excl r30
  "?ap",  "?fp",  "?sr_f" }

Do I have it backwards?  With an endian issue?

-Stafford

  reply	other threads:[~2019-07-03 22:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  3:34 [PATCH v2 0/5] OpenRISC updates for 10 (fpu, fixes) Stafford Horne
2019-07-03  3:34 ` [PATCH v2 5/5] or1k: only force reg for immediates Stafford Horne
2019-07-03  3:34 ` [PATCH v2 2/5] or1k: Fix issues with msoft-div Stafford Horne
2019-07-03  3:34 ` [PATCH v2 3/5] or1k: Add mrori option, fix option docs Stafford Horne
2019-07-03 14:53   ` Segher Boessenkool
2019-07-03 21:59     ` Stafford Horne
2019-07-03 22:27       ` Segher Boessenkool
2019-07-03 22:56         ` Stafford Horne
2019-07-03  3:34 ` [PATCH v2 1/5] or1k: Fix code quality for volatile memory loads Stafford Horne
2019-07-03  3:34 ` [PATCH v2 4/5] or1k: Initial support for FPU Stafford Horne
2019-07-03 15:51   ` Segher Boessenkool
2019-07-03 19:43     ` [OpenRISC] " Richard Henderson
2019-07-03 22:21       ` Stafford Horne [this message]
2019-07-03 22:35         ` Segher Boessenkool
2019-07-03 22:10     ` Stafford Horne

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=20190703221956.GE2601@lianli.shorne-pla.net \
    --to=shorne@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=openrisc@lists.librecores.org \
    --cc=rep.dot.nop@gmail.com \
    --cc=rth@twiddle.net \
    --cc=segher@kernel.crashing.org \
    /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).