qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: "Chen Gang" <xili_gchen_5257@hotmail.com>,
	"Chris Metcalf" <cmetcalf@ezchip.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Consult] tilegx: About floating point instructions
Date: Mon, 3 Aug 2015 09:40:21 -0700	[thread overview]
Message-ID: <55BF9975.7020002@twiddle.net> (raw)
In-Reply-To: <BLU437-SMTP912C2CDD0DC31586DBF95EB9890@phx.gbl>

On 08/01/2015 02:47 AM, Chen Gang wrote:
> I am just adding floating point instructions (e.g. fsingle_add1), but
> for me, I can not find any details about them (the ISA documents only
> give a summary description, but not details), e.g.

The tilegx splits the four/six cycle arithmetic into multiple black-box
instructions.  You need only really implement one of the four, with the
rest of them being implemented as nops or moves.

Looking at what gcc produces gives the hints:

	fdouble_unpack_min	min, srca, srcb
	fdouble_unpack_max	max, srca, srcb
	fdouble_add_flags	flg, srca, srcb
	fdouble_addsub		max, min, flg
	fdouble_pack1		dst, max, flg
	fdouble_pack2		dst, max, zero

The unpack, addsub, and pack2 insns can be ignored, the add_flags insn can
perform the whole operation, the pack1 insn performs a move from "flg" to "dst".

Similarly for the single-precision:

	fsingle_add1		tmp, srca, srcb
	fsingle_addsub2		tmp, srca, srcb
	fsingle_pack1		flg, tmp
	fsingle_pack2		dst, tmp, flg

The add1 insn performs the whole operation, the addsub2 and pack1 insns are
ignored, and the pack2 insn is a move from tmp to dst.


r~

  reply	other threads:[~2015-08-03 16:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-01  9:47 [Qemu-devel] [Consult] tilegx: About floating point instructions Chen Gang
2015-08-03 16:40 ` Richard Henderson [this message]
2015-08-03 20:47   ` Chen Gang
2015-08-04 13:56     ` Chen Gang
2015-08-04 15:04       ` Richard Henderson
2015-08-05 14:16         ` Chen Gang
2015-08-08 17:23           ` Chen Gang
2015-08-09  1:10             ` Chen Gang
2015-08-09  1:14               ` Chen Gang
2015-08-11 13:18                 ` Chen Gang
2015-08-13 14:59                   ` Chen Gang
2015-08-15  9:56                     ` Chen Gang
2015-08-15 15:47                       ` Richard Henderson
2015-08-15 18:16                         ` Chen Gang
2015-08-16  1:41                           ` Chen Gang
2015-08-16  3:59                             ` Chen Gang
2015-08-17 17:31                           ` Richard Henderson
2015-08-17 21:09                             ` Chen Gang
2015-08-17 21:43                               ` Richard Henderson
2015-08-18 14:27                                 ` Chen Gang
2015-08-18 14:32                                   ` Peter Maydell
2015-08-18 21:29                                     ` Chen Gang
2015-08-18 22:15                                       ` Peter Maydell
2015-08-18 22:24                                         ` Chen Gang
2015-10-25 15:38                             ` Chen Gang
2015-10-26 14:14                               ` Chen Gang
     [not found]                                 ` <5630EF69.90906@hotmail.com>
2015-10-28 15:53                                   ` Chen Gang

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=55BF9975.7020002@twiddle.net \
    --to=rth@twiddle.net \
    --cc=afaerber@suse.de \
    --cc=cmetcalf@ezchip.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=walt@tilera.com \
    --cc=xili_gchen_5257@hotmail.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 NNTP newsgroup(s).