public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "commie1 at gmx dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/18668] New: use prescott's fisttp Date: Thu, 25 Nov 2004 01:03:00 -0000 [thread overview] Message-ID: <20041125010332.18668.commie1@gmx.net> (raw) When compiling code that converts a float to an int using -march=prescott gcc will often use cvtts[sd]2si, but sometimes it will use the old method of: fnstcw -2(%ebp) # store the control word movzwl -2(%ebp), %eax orw $3072, %ax # change it to truncate movw %ax, -4(%ebp) fldcw -4(%ebp) # load that new value fistpll -16(%ebp) # perform the conversion fldcw -2(%ebp) # and load the previous value which prescott (and beyond, presumably) can reduce to: fisttpll -16(%ebp) The code in this case was: unsigned int oof(double d) { unsigned int i; i = d; return i; } I've found hardly any mention of this instruction in the mailinglists, the code or bugzilla (PR12308). Perhaps the cvtts[sd]2si should be used with unsigned as well, perhaps there are other reasons not to have fisttp, I'd like to know. -- Summary: use prescott's fisttp Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: commie1 at gmx dot net CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18668
next reply other threads:[~2004-11-25 1:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-11-25 1:03 commie1 at gmx dot net [this message] 2004-11-29 14:27 ` [Bug target/18668] " pinskia at gcc dot gnu dot org 2005-01-23 19:03 ` steven at gcc dot gnu dot org 2005-03-10 11:02 ` uros at kss-loka dot si 2005-03-10 22:12 ` kcook at gcc dot gnu dot org 2005-03-10 23:54 ` commie1 at gmx dot net 2005-03-11 9:31 ` uros at kss-loka dot si 2005-03-15 14:45 ` cvs-commit at gcc dot gnu dot org 2005-03-15 14:54 ` uros at kss-loka dot si
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=20041125010332.18668.commie1@gmx.net \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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).