public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: "linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	llvm@lists.linux.dev, Nick Desaulniers <ndesaulniers@google.com>,
	Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH 5/8] MIPS: mipsregs: Parse fp and sp register by name in parse_r
Date: Fri, 21 Apr 2023 14:21:25 +0200	[thread overview]
Message-ID: <20230421122125.GA10237@alpha.franken.de> (raw)
In-Reply-To: <F861FB0C-C6B3-4B16-8ECD-FD01E62DD429@flygoat.com>

On Fri, Apr 21, 2023 at 12:38:07PM +0100, Jiaxun Yang wrote:
> 
> 
> > 2023年4月21日 11:48,Thomas Bogendoerfer <tsbogend@alpha.franken.de> 写道:
> > 
> > On Sun, Apr 09, 2023 at 11:43:06AM +0100, Jiaxun Yang wrote:
> >> parse_r helper is used to parse register number from oprand,
> >> it only handles oprand which use number to refer register before.
> >> 
> >> However compiler may use $gp and $sp to reference register 29 and
> >> 30. Handle this situation by adding relevant match name.
> > 
> > are you sure the compiler is doing that ? Which compiler is this ?
> > To me this feels more like missing #defines from asm/regdef.h for
> > some inline assembly stuff...
> 
> Yes, clang is doing that, see[1].
> 
> There is no inline assembly mentioning $fp for cfcmsa but clang is still generating $fp for
> cfcmsa.
> 
> I was able to reproduce this by dumping assembly generated by clang, but I’m
> unable to reproduce it for now, it seems like clang will only allocate $fp in rare cases.

so is this clang miss-behaviour ? If yes fix should be done there.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2023-04-21 12:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-09 10:43 [PATCH 0/7] MIPS: LLVM build fixes Jiaxun Yang
2023-04-09 10:43 ` [PATCH 1/8] MIPS: Replace assembly isa level directives with macros Jiaxun Yang
2023-04-20 16:43   ` Nick Desaulniers
2023-04-20 19:29     ` Jiaxun Yang
2023-04-21  7:41       ` Thomas Bogendoerfer
2023-04-21  8:18         ` Jiaxun Yang
2023-04-21 13:01       ` Maciej W. Rozycki
2023-04-09 10:43 ` [PATCH 2/8] MIPS: Set ISA level for MSA control reg helpers Jiaxun Yang
2023-04-09 10:43 ` [PATCH 3/8] MIPS: loongson2ef: Add missing break in cs5536_isa Jiaxun Yang
2023-04-12 13:31   ` Thomas Bogendoerfer
2023-04-09 10:43 ` [PATCH 4/8] MIPS: asmmacro: Restore fp macro after undef Jiaxun Yang
2023-04-09 10:43 ` [PATCH 5/8] MIPS: mipsregs: Parse fp and sp register by name in parse_r Jiaxun Yang
2023-04-21 10:48   ` Thomas Bogendoerfer
2023-04-21 11:38     ` Jiaxun Yang
2023-04-21 12:21       ` Thomas Bogendoerfer [this message]
2023-04-21 12:42         ` Jiaxun Yang
2023-04-09 10:43 ` [PATCH 6/8] MIPS: c-r4k: Use cache_op function for rm7k_erratum31 Jiaxun Yang
2023-04-09 10:43 ` [PATCH 7/8] MIPS: octeon_switch: Remove duplicated labels Jiaxun Yang
2023-04-12 13:31   ` Thomas Bogendoerfer
2023-04-09 10:43 ` [PATCH 8/8] MIPS: Implement microMIPS MT ASE helpers Jiaxun Yang
2023-04-21  8:31 ` [PATCH 0/7] MIPS: LLVM build fixes Jiaxun Yang

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=20230421122125.GA10237@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.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