public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16563] New: The compiler doesnt the necessary push/restore of  r18/r19
@ 2004-07-15 10:30 baphomed at lycos dot de
  2004-07-15 11:57 ` [Bug target/16563] " bangerth at dealii dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: baphomed at lycos dot de @ 2004-07-15 10:30 UTC (permalink / raw)
  To: gcc-bugs

void  testfunc32(unsigned long);
void  testfunc16(int);
void testfunc8(char);

void testfunc(unsigned int a,char b,char c,unsigned long d)
{
        testfunc16(a);
        testfunc8(10);
        testfunc8(b);
        testfunc16(11);
        testfunc8(c);
        testfunc8(6);
        testfunc32(d);
}


void test()
{
testfunc(0xabcd,10,11,0xabacadae);
}


Compile the code with :

avr-gcc -c -Os file.c

Now we may look at the produced assembler directives.
This is the call to testfunc32():

mov     r25, r19
mov     r24, r18
mov     r23, r17
mov     r22, r16
rcall   testfunc32

All the other functions called before are free to change the content of 
r18/r19 wich contain the MSW of argument d.
The possibly modified value of d ist passed to testfunc32().

The gcc is configured with:
 --prefix=/usr/local/ --target=avr --enable-languages=c,c++ --disable-nls

-- 
           Summary: The compiler doesnt the necessary push/restore of
                    r18/r19
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: baphomed at lycos dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux
GCC target triplet: avr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16563


^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <bug-16563-8949@http.gcc.gnu.org/bugzilla/>]
[parent not found: <bug-16563-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2014-02-16 13:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-15 10:30 [Bug c/16563] New: The compiler doesnt the necessary push/restore of r18/r19 baphomed at lycos dot de
2004-07-15 11:57 ` [Bug target/16563] " bangerth at dealii dot org
2004-07-15 20:23 ` ericw at evcohs dot com
2004-07-15 20:41 ` j dot gnu at uriah dot heep dot sax dot de
2004-08-31 18:35 ` denisc at overta dot ru
2004-09-08 13:57 ` em at la dot mine dot nu
2004-10-06 16:48 ` berndtrog at yahoo dot com
     [not found] <bug-16563-8949@http.gcc.gnu.org/bugzilla/>
2007-02-14 16:48 ` eweddington at cso dot atmel dot com
2008-06-04 13:07 ` eric dot weddington at atmel dot com
     [not found] <bug-16563-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:16 ` jackie.rosen at hushmail 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).