From: "Marcin Kościelnicki" <koriakin-mP9o5jsk0RY@public.gmane.org>
To: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH envytools] envydis: gk110: Add support for dadd with an immediate src
Date: Thu, 5 Nov 2015 14:51:30 +0100 [thread overview]
Message-ID: <563B5EE2.8080609@0x04.net> (raw)
In-Reply-To: <1446730963-9919-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 05/11/15 14:42, Hans de Goede wrote:
> This commit adds support for dadd with an immediate src in gk110 code.
> The machine-code in question is generated by e.g. nouveau_compiler with
> the new "Make use of double immediates" patch series when building the
> piglit glsl-algebraic-double-add.shader_test.
>
> This commit changes the output from:
>
> 00000010: 001c0001 c38001ff $r0 $r0 $r0 $r0 0x3fe00 0x3fe00
> 0x3fe0000000000000 0x3fe00000 0x0 0x3 ???
> [unknown: 00000000 c0800000] [unknown instruction]
>
> Into:
>
> 00000010: 001c0001 c38001ff add rn f64 $r0d $r0d 0x3fe0000000000000
>
> The machine-code in question disassembles to the same using
> nvdisasm and works properly on an actual gpu.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> envydis/gk110.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/envydis/gk110.c b/envydis/gk110.c
> index 9af18e1..4790533 100644
> --- a/envydis/gk110.c
> +++ b/envydis/gk110.c
> @@ -1274,6 +1274,7 @@ static struct insn tabcctlmod[] = {
> * 000000007f800000 2nd src
> * 0000003fff800000 2nd src (immediate)
> * 0000007fff800000 address
> + * 000003ffff800000 float/double immediate
> * 007fffffff800000 long immediate
> * 0003fc0000000000 3rd src
> * 007c000000000000 misc flags
> @@ -1410,6 +1411,7 @@ static struct insn tabi[] = {
> { 0x02c0000000000001ull, 0x37c0000000000003ull, N("add"), T(ftz2f), T(sat35), T(frm2a), N("f32"), DST, T(neg33), T(abs31), SRC1, T(neg3b), T(fi2) },
> { 0x0300000000000001ull, 0x37c0000000000003ull, T(minmax), T(ftz2f), N("f32"), DST, T(neg33), T(abs31), SRC1, T(neg3b), T(fi2) },
> { 0x0340000000000001ull, 0x37c0000000000003ull, N("mul"), T(ftz2f), T(sat35), T(frm2a), T(neg3b), N("f32"), DST, SRC1, T(fi2) },
> + { 0x0380000000000001ull, 0x37c0000000000003ull, N("add"), T(frm2a), N("f64"), DSTD, T(neg33), T(abs31), SRC1D, T(neg3b), T(di2) },
> { 0x0400000000000001ull, 0x37c0000000000003ull, N("mul"), T(frm2a), T(neg3b), N("f64"), DSTD, SRC1D, T(di2) },
> { 0x0500000000000001ull, 0x37c0000000000003ull, N("selp"), DST, SRC1, T(i3bi2), T(pnot2d), PSRC3 },
> { 0x07c0000000000001ull, 0x37c0000000000003ull, N("rshf"), N("b32"), DST, SESTART, T(us64_28), SRC1, SRC3, SEEND, T(shfclamp), T(sui2b) }, // d = (s1 >> s2) | (s3 << (32 - s2))
>
Thanks, applied.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
prev parent reply other threads:[~2015-11-05 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 13:42 [PATCH envytools] envydis: gk110: Add support for dadd with an immediate src Hans de Goede
[not found] ` <1446730963-9919-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-11-05 13:51 ` Marcin Kościelnicki [this message]
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=563B5EE2.8080609@0x04.net \
--to=koriakin-mp9o5jsk0ry@public.gmane.org \
--cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.