Bug 173716

Summary: Stack manipulation for empty function with -maltivec
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: triage
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-07 00:18:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Woodhouse 2005-11-19 11:32:42 UTC
peach /home/dwmw2 $ cat asd.c
void test_cmpi (void)
{
    __asm__ __volatile__ ("cmpi         2, 14, 15");
}
peach /home/dwmw2 $ gcc -O2 -S -o /dev/stdout asd.c | grep -A6 test_cmpi:
test_cmpi:
#APP
        cmpi         2, 14, 15
#NO_APP
        blr
        .size   test_cmpi,.-test_cmpi
        .ident  "GCC: (GNU) 4.0.1 20050727 (Red Hat 4.0.1-5)"
peach /home/dwmw2 $ gcc -O2 -S -o /dev/stdout asd.c -maltivec | grep -A6 test_cmpi:
test_cmpi:
        stwu %r1,-16(%r1)
#APP
        cmpi         2, 14, 15
#NO_APP
        addi %r1,%r1,16
        blr


Not incorrect per se, but somewhat suboptimal. This broke Valgrind's
none/tests/ppc32/jm-insns.c, which uses functions like this and assumes that
they'll just be one instruction followed by 'blr'.

Happens on FC4 and rawhide.

Comment 1 Jakub Jelinek 2005-11-21 11:24:25 UTC
If valgrind makes such assumptions, even for tests, then it is terribly broken.
I will look at why the stack adjustement is added, but with very low priority.

Comment 2 David Woodhouse 2005-11-21 11:31:38 UTC
Agreed. It was a test inherited from qemu, and Julian's already fixed it in
Valgrind's version after the problem was pointed out.

Comment 3 Bug Zapper 2008-04-03 16:38:26 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 4 Bug Zapper 2008-05-07 00:18:05 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp