public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/66819] New: gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2 -mregparm=3
@ 2015-07-09  2:56 hjl.tools at gmail dot com
  2015-07-10 20:30 ` [Bug target/66819] " hjl at gcc dot gnu.org
  2015-07-11 18:28 ` hjl.tools at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-09  2:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66819
           Summary: gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2
                    -mregparm=3
           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
  Target Milestone: ---

I got

[hjl@gnu-6 gcc]$ ./xgcc -S -B./ -m32 -fPIC -O2
/export/gnu/src/tools-iamcu/tools/gcc/testsuite/gcc.target/i386/pr65753.c
-mregparm=3
[hjl@gnu-6 gcc]$ cat pr65753.s 
        .file   "pr65753.c"
        .section        .text.unlikely,"ax",@progbits
.LCOLDB0:
        .text
.LHOTB0:
        .p2align 4,,15
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        subl    $12, %esp
        .cfi_def_cfa_offset 16
        call    *%eax
        addl    $12, %esp
        .cfi_def_cfa_offset 4
        ret
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .section        .text.unlikely
.LCOLDE0:
        .text
.LHOTE0:
        .ident  "GCC: (GNU) 6.0.0 20150708 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-6 gcc]$


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

* [Bug target/66819] gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2 -mregparm=3
  2015-07-09  2:56 [Bug target/66819] New: gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2 -mregparm=3 hjl.tools at gmail dot com
@ 2015-07-10 20:30 ` hjl at gcc dot gnu.org
  2015-07-11 18:28 ` hjl.tools at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: hjl at gcc dot gnu.org @ 2015-07-10 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Fri Jul 10 20:30:10 2015
New Revision: 225688

URL: https://gcc.gnu.org/viewcvs?rev=225688&root=gcc&view=rev
Log:
Allow indirect sibcall with register arguments

Indirect sibcall with register arguments is OK when there is register
available for argument passing.

gcc/

        PR target/66819
        * config/i386/i386.c (ix86_function_ok_for_sibcall): Allow
        indirect sibcall with register arguments if register available
        for argument passing.
        (init_cumulative_args): Set cfun->machine->arg_reg_available
        to (cum->nregs > 0) or to true if function has a variable
        argument list.
        (function_arg_advance_32): Set cfun->machine->arg_reg_available
        to false if cum->nregs <= 0.
        * config/i386/i386.h (machine_function): Add arg_reg_available.

gcc/testsuite/

        PR target/66819
        * gcc.target/i386/pr66819-1.c: New test.
        * gcc.target/i386/pr66819-2.c: Likewise.
        * gcc.target/i386/pr66819-3.c: Likewise.
        * gcc.target/i386/pr66819-4.c: Likewise.
        * gcc.target/i386/pr66819-5.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr66819-1.c
    trunk/gcc/testsuite/gcc.target/i386/pr66819-2.c
    trunk/gcc/testsuite/gcc.target/i386/pr66819-3.c
    trunk/gcc/testsuite/gcc.target/i386/pr66819-4.c
    trunk/gcc/testsuite/gcc.target/i386/pr66819-5.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.h
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/66819] gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2 -mregparm=3
  2015-07-09  2:56 [Bug target/66819] New: gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2 -mregparm=3 hjl.tools at gmail dot com
  2015-07-10 20:30 ` [Bug target/66819] " hjl at gcc dot gnu.org
@ 2015-07-11 18:28 ` hjl.tools at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2015-07-11 18:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |6.0

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


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

end of thread, other threads:[~2015-07-11 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09  2:56 [Bug target/66819] New: gcc.target/i386/pr65753.c fails with -fPIC -m32 -O2 -mregparm=3 hjl.tools at gmail dot com
2015-07-10 20:30 ` [Bug target/66819] " hjl at gcc dot gnu.org
2015-07-11 18:28 ` 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).