public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/66824] New: -miamcu doesn't load FP constant into register directly
@ 2015-07-09 12:29 hjl.tools at gmail dot com
  2015-07-09 12:37 ` [Bug target/66824] " hjl.tools at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-09 12:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

            Bug ID: 66824
           Summary: -miamcu doesn't load FP constant into register
                    directly
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: izamyatin at gmail dot com, julia.koval at intel dot com,
                    zinovy.nis at gmail dot com
  Target Milestone: ---

[hjl@gnu-6 gcc]$ cat x.i
void bar (float);

void
foo (void)
{
  bar (3.0);
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -S -m32 -miamcu -O2 x.i
[hjl@gnu-6 gcc]$ cat x.s
        .file   "x.i"
        .section        .text.unlikely,"ax",@progbits
.LCOLDB1:
        .text
.LHOTB1:
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        movl    .LC0, %eax
        jmp     bar
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .section        .text.unlikely
.LCOLDE1:
        .text
.LHOTE1:
        .section        .rodata.cst4,"aM",@progbits,4
        .align 4
.LC0:
        .long   1077936128
        .ident  "GCC: (GNU) 6.0.0 20150709 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-6 gcc]$ 

We should generate "mov $1077936128 %eax".


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/66824] -miamcu doesn't load FP constant into register directly
  2015-07-09 12:29 [Bug target/66824] New: -miamcu doesn't load FP constant into register directly hjl.tools at gmail dot com
@ 2015-07-09 12:37 ` hjl.tools at gmail dot com
  2015-07-09 19:14 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-09 12:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-09
   Target Milestone|---                         |6.0
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Normally, we can't load FP constants into FP registers directly on x86.
Since IA MCU uses GPR for FP, it isn't a problem.  We need to add some
SF and DF constant load patterns to i386.md for !TARGET_80387.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/66824] -miamcu doesn't load FP constant into register directly
  2015-07-09 12:29 [Bug target/66824] New: -miamcu doesn't load FP constant into register directly hjl.tools at gmail dot com
  2015-07-09 12:37 ` [Bug target/66824] " hjl.tools at gmail dot com
@ 2015-07-09 19:14 ` hjl.tools at gmail dot com
  2015-07-17  7:03 ` uros at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-09 19:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at

https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00809.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/66824] -miamcu doesn't load FP constant into register directly
  2015-07-09 12:29 [Bug target/66824] New: -miamcu doesn't load FP constant into register directly hjl.tools at gmail dot com
  2015-07-09 12:37 ` [Bug target/66824] " hjl.tools at gmail dot com
  2015-07-09 19:14 ` hjl.tools at gmail dot com
@ 2015-07-17  7:03 ` uros at gcc dot gnu.org
  2015-07-17 11:52 ` hjl at gcc dot gnu.org
  2015-07-17 14:49 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: uros at gcc dot gnu.org @ 2015-07-17  7:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

--- Comment #3 from uros at gcc dot gnu.org ---
Author: uros
Date: Fri Jul 17 07:02:29 2015
New Revision: 225919

URL: https://gcc.gnu.org/viewcvs?rev=225919&root=gcc&view=rev
Log:
        PR target/66824
        * config/i386/i386.h (TARGET_HARD_SF_REGS): New define.
        (TARGET_HARD_DF_REGS): Ditto.
        (TARGET_HARD_XF_REGS): Ditto.
        * config/i386/i386.md (*movxf_internal): Add alternatives 9 and 10.
        Enable alternatives 9 and 10 only for !TARGET_HARD_XF_REG target.
        (*movdf_internal): Add alternatives 22, 23, 24 and 25. Enable
        alternatives 22, 23, 24 and 25 only for !TARGET_HARD_DF_REG target.
        (*movsf_internal): Add alternatives 16 and 17. Enable
        alternatives 16 and 17 only for !TARGET_HARD_SF_REG target.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.h
    trunk/gcc/config/i386/i386.md


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/66824] -miamcu doesn't load FP constant into register directly
  2015-07-09 12:29 [Bug target/66824] New: -miamcu doesn't load FP constant into register directly hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2015-07-17  7:03 ` uros at gcc dot gnu.org
@ 2015-07-17 11:52 ` hjl at gcc dot gnu.org
  2015-07-17 14:49 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl at gcc dot gnu.org @ 2015-07-17 11:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Fri Jul 17 11:52:09 2015
New Revision: 225929

URL: https://gcc.gnu.org/viewcvs?rev=225929&root=gcc&view=rev
Log:
Add a testcase for PR target/66824

        PR target/66824
        * gcc.target/i386/pr66824.c:

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr66824.c
Modified:
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/66824] -miamcu doesn't load FP constant into register directly
  2015-07-09 12:29 [Bug target/66824] New: -miamcu doesn't load FP constant into register directly hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2015-07-17 11:52 ` hjl at gcc dot gnu.org
@ 2015-07-17 14:49 ` hjl.tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-17 14:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66824

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-17 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 12:29 [Bug target/66824] New: -miamcu doesn't load FP constant into register directly hjl.tools at gmail dot com
2015-07-09 12:37 ` [Bug target/66824] " hjl.tools at gmail dot com
2015-07-09 19:14 ` hjl.tools at gmail dot com
2015-07-17  7:03 ` uros at gcc dot gnu.org
2015-07-17 11:52 ` hjl at gcc dot gnu.org
2015-07-17 14:49 ` hjl.tools at gmail dot com

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).