public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: "Christoph Müllner" <christoph.muellner@vrull.eu>,
	"Tsukasa OI" <research_trasio@irq.a4lg.com>
Cc: binutils@sourceware.org,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Andrew Waterman <andrew@sifive.com>
Subject: Re: [REVIEW ONLY 1/1] UNRATIFIED RISC-V: Add 'Zfa' extension
Date: Sun, 26 Mar 2023 09:43:27 -0600	[thread overview]
Message-ID: <4e49a63b-4a0b-6e58-1c94-40d515244f9e@gmail.com> (raw)
In-Reply-To: <CAEg0e7jGix2OQGzbb=aZFt4WbwxHNji93178HZRf727L7BrmeA@mail.gmail.com>



On 3/22/23 09:47, Christoph Müllner wrote:

> 
> Hi Tsukasa,
> 
> There seems to be a misunderstanding of the spec.
> The second operand of the fli should be the constant itself ("Value"
> column of the specification) in C-like syntax.
> E.g.:
>    fli.h ft1, -1.0 # encoding rs1=0
>    fli.h ft1, min # encoding rs1=1
>    fli.h ft1, 0.0000152587890625 # encoding rs1=2
>    ...
>    fli.h ft1, 16 # encoding rs1=25
>    ...
>    fli.h ft1, nan # encoding rs1=31
> 
> So we have 3 strings ("min", "inf", "nan") and 29 constants.
Ouch.  So we've got to parse & match the actual constant.  I worked on a 
processor with similar capabilities, but we defined the assembly syntax 
to use the table index for the constant rather than the constant itself.

I'd strongly suggest supporting the %a/%A hex notation for the 
constants.  It's unambiguous and less error prone.  I think Kito made a 
similar suggestion downthread.

When I read through the basics of Zfa I was a bit disappointed.  99% of 
the time the fli is going to feed one or more FP arithmetic 
instructions.  It'd be more efficient to be able to access those FP 
constants in the FP arithmetic instruction itself.  I guess that ship 
has sailed.

Jeff

  parent reply	other threads:[~2023-03-26 15:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18 10:12 [REVIEW ONLY 0/1] RISC-V (unratified): " Tsukasa OI
2022-09-18 10:12 ` [REVIEW ONLY 1/1] UNRATIFIED RISC-V: " Tsukasa OI
2023-03-22 15:47   ` Christoph Müllner
2023-03-22 16:01     ` Philipp Tomsich
2023-03-22 16:07     ` Tsukasa OI
2023-03-22 16:21       ` Christoph Müllner
2023-03-22 17:00         ` Tsukasa OI
2023-03-23 13:17           ` Kito Cheng
2023-03-26 15:43     ` Jeff Law [this message]
2023-03-27  0:13       ` Philipp Tomsich

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=4e49a63b-4a0b-6e58-1c94-40d515244f9e@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=christoph.muellner@vrull.eu \
    --cc=philipp.tomsich@vrull.eu \
    --cc=research_trasio@irq.a4lg.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).