public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: libc-alpha@sourceware.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH, alpha]: Add earlyclobber to sqrtt/sqrtf insns.
Date: Fri, 14 Apr 2017 13:02:00 -0000	[thread overview]
Message-ID: <CAFULd4b3daAPoddnBC1=bPf3zPGMqq6NCZ-nc4SmnSEqJ95PSg@mail.gmail.com> (raw)
In-Reply-To: <877f2nm9nk.fsf@mid.deneb.enyo.de>

On Fri, Apr 14, 2017 at 2:54 PM, Florian Weimer <fw@deneb.enyo.de> wrote:

>>>> Add earlyclobber to sqrtt/sqrtf insns.
>>>>
>>>> When using software completions, we have to prevent assembler to match
>>>> input and output operands of sqrtt/sqrtf insn. Add earlyclobber to
>>>> output operand to avoid unwanted operand matching.
>>>
>>> Is this so that the trap handler can recover the original input?
>>>
>>> In this case, please add this to the commit message for those of us
>>> who are not familiar with the Alpha architecture.
>>
>> I don't know the low-level details, perhaps Richard can explain these
>> requirements.
>>
>> The sqrtt simply returns zero for subnormal operand with software
>> completions when input and output reg are matched.
>
> Did you see that in an emulator, or on actual hardware?

I have seen this on actual hardware, AlphaServer ES40, EV68AL Tsunami.

Without the patch, there are many instances of problematic insns,
simple grep sqrt[ts] of libm dump shows

~ $ grep sqrt[ts] aaa

    6e94:       6b bd eb 53     sqrtt/sud       $f11,$f11
    6ef0:       70 bd f0 53     sqrtt/sud       $f16,$f16
    cb8c:       60 bd e0 53     sqrtt/sud       $f0,$f0
    cc14:       60 bd e0 53     sqrtt/sud       $f0,$f0
    d28c:       70 bd e2 53     sqrtt/sud       $f2,$f16
    d350:       70 bd e2 53     sqrtt/sud       $f2,$f16
    d588:       62 bd e2 53     sqrtt/sud       $f2,$f2
    d60c:       62 bd e2 53     sqrtt/sud       $f2,$f2
    dad0:       70 bd e2 53     sqrtt/sud       $f2,$f16
    db64:       70 bd e2 53     sqrtt/sud       $f2,$f16
    ddbc:       62 bd e2 53     sqrtt/sud       $f2,$f2
    de24:       62 bd e2 53     sqrtt/sud       $f2,$f2
    e028:       62 bd e2 53     sqrtt/sud       $f2,$f2
    e628:       71 bd f1 53     sqrtt/sud       $f17,$f17
   12290:       6a bd ea 53     sqrtt/sud       $f10,$f10
   133ec:       6b bd eb 53     sqrtt/sud       $f11,$f11
   13460:       6b bd eb 53     sqrtt/sud       $f11,$f11
   1dff4:       60 bd e0 53     sqrtt/sud       $f0,$f0
   23de4:       62 bd e2 53     sqrtt/sud       $f2,$f2
   23f00:       62 bd e2 53     sqrtt/sud       $f2,$f2
   24000:       70 bd f0 53     sqrtt/sud       $f16,$f16
   24040:       64 bd ea 53     sqrtt/sud       $f10,$f4
   24084:       64 bd ea 53     sqrtt/sud       $f10,$f4
   24124:       6a bd ea 53     sqrtt/sud       $f10,$f10
   2414c:       70 bd e0 53     sqrtt/sud       $f0,$f16
   24168:       61 bd e1 53     sqrtt/sud       $f1,$f1
   25cac:       63 bd ea 53     sqrtt/sud       $f10,$f3
   25d94:       71 bd e5 53     sqrtt/sud       $f5,$f17
   25eb4:       65 bd e5 53     sqrtt/sud       $f5,$f5
   25f24:       63 bd e3 53     sqrtt/sud       $f3,$f3
   25f84:       6b bd eb 53     sqrtt/sud       $f11,$f11
   25f98:       6a bd ea 53     sqrtt/sud       $f10,$f10
   25fa8:       6b bd eb 53     sqrtt/sud       $f11,$f11
   2607c:       6c bd ec 53     sqrtt/sud       $f12,$f12
   26094:       6a bd ea 53     sqrtt/sud       $f10,$f10
   2613c:       6b bd eb 53     sqrtt/sud       $f11,$f11
   26150:       63 bd eb 53     sqrtt/sud       $f11,$f3
   2995c:       6b b9 ea 53     sqrts/sud       $f10,$f11
   29ad0:       6b b9 ea 53     sqrts/sud       $f10,$f11
   29c00:       70 b9 f0 53     sqrts/sud       $f16,$f16
   29c60:       6b b9 eb 53     sqrts/sud       $f11,$f11
   29d50:       6d b9 ea 53     sqrts/sud       $f10,$f13
   29e18:       6b b9 ea 53     sqrts/sud       $f10,$f11
   2aa00:       6a bd ea 53     sqrtt/sud       $f10,$f10
   2aebc:       62 b9 e2 53     sqrts/sud       $f2,$f2
   2af6c:       62 b9 e2 53     sqrts/sud       $f2,$f2
   2b1a8:       62 b9 e2 53     sqrts/sud       $f2,$f2
   2b230:       62 b9 e2 53     sqrts/sud       $f2,$f2
   2b630:       70 b9 e2 53     sqrts/sud       $f2,$f16
   2b6c8:       70 b9 e2 53     sqrts/sud       $f2,$f16
   2b940:       62 b9 e2 53     sqrts/sud       $f2,$f2
   2b9b8:       62 b9 e2 53     sqrts/sud       $f2,$f2
   2d29c:       60 b9 f0 53     sqrts/sud       $f16,$f0
   2e528:       6a b9 ea 53     sqrts/sud       $f10,$f10
   2fb68:       6b b9 eb 53     sqrts/sud       $f11,$f11
   2fbfc:       6b b9 eb 53     sqrts/sud       $f11,$f11
   33948:       60 b9 e0 53     sqrts/sud       $f0,$f0
   37c30:       63 b9 e3 53     sqrts/sud       $f3,$f3
   37d64:       63 b9 e3 53     sqrts/sud       $f3,$f3
   37e64:       70 b9 f0 53     sqrts/sud       $f16,$f16
   37eac:       62 b9 ea 53     sqrts/sud       $f10,$f2
   37ed8:       62 b9 ea 53     sqrts/sud       $f10,$f2
   37f88:       6a b9 ea 53     sqrts/sud       $f10,$f10
   37fa8:       70 b9 e0 53     sqrts/sud       $f0,$f16
   37fb8:       61 b9 e1 53     sqrts/sud       $f1,$f1
   3909c:       65 b9 ea 53     sqrts/sud       $f10,$f5
   39184:       65 b9 e7 53     sqrts/sud       $f7,$f5
   39294:       67 b9 e7 53     sqrts/sud       $f7,$f7
   39310:       65 b9 e5 53     sqrts/sud       $f5,$f5
   39370:       6b b9 eb 53     sqrts/sud       $f11,$f11
   39384:       65 b9 e5 53     sqrts/sud       $f5,$f5
   39390:       6a b9 ea 53     sqrts/sud       $f10,$f10
   39458:       6c b9 ec 53     sqrts/sud       $f12,$f12
   39470:       6a b9 ea 53     sqrts/sud       $f10,$f10
   39514:       6a b9 ea 53     sqrts/sud       $f10,$f10
   39528:       65 b9 ea 53     sqrts/sud       $f10,$f5
   7429c:       6a bd f0 53     sqrtt/sud       $f16,$f10
   742f8:       6a bd f0 53     sqrtt/sud       $f16,$f10

Uros.

  reply	other threads:[~2017-04-14 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14 12:30 Uros Bizjak
2017-04-14 12:38 ` Florian Weimer
2017-04-14 12:47   ` Uros Bizjak
2017-04-14 12:54     ` Florian Weimer
2017-04-14 13:02       ` Uros Bizjak [this message]
2017-04-14 13:55 ` Richard Henderson
2017-04-14 18:01   ` Uros Bizjak
2017-04-26 13:44 ` Richard Henderson

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='CAFULd4b3daAPoddnBC1=bPf3zPGMqq6NCZ-nc4SmnSEqJ95PSg@mail.gmail.com' \
    --to=ubizjak@gmail.com \
    --cc=fw@deneb.enyo.de \
    --cc=libc-alpha@sourceware.org \
    --cc=rth@twiddle.net \
    /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).