public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: John Bright <jbright@winfordeng.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: target/10733: Modulus bug Date: Sat, 10 May 2003 21:26:00 -0000 [thread overview] Message-ID: <20030510212601.26167.qmail@sources.redhat.com> (raw) The following reply was made to PR target/10733; it has been noted by GNATS. From: John Bright <jbright@winfordeng.com> To: Dara Hazeghi <dhazeghi@yahoo.com>, gcc-gnats@gcc.gnu.org Cc: Subject: Re: target/10733: Modulus bug Date: Sat, 10 May 2003 17:16:49 -0400 Ok, a complete example where the value is obtained by writing to one of the AVR's ports: --------- test.c ------------- #include <io.h> #include <io8535.h> int main(void) { unsigned char t1; t1=2; t1=(t1+40)%30; outp(0xff, DDRB); outp(t1, PORTB); return(0); } ------------------------------ compile: avr-gcc -g -Os -Wall -Wstrict-prototypes -mmcu=at90s8535 test.c I'm assuming you want the assembly generated with avr-gcc -S and just the section beginning with main: main: .stabn 68,0,5,.LM1-main .LM1: /* prologue: frame size=0 */ ldi r28,lo8(__stack - 0) ldi r29,hi8(__stack - 0) out __SP_H__,r29 out __SP_L__,r28 /* prologue end (size=4) */ .LBB2: .stabn 68,0,8,.LM2-main .LM2: ldi r24,lo8(42) ldi r25,hi8(42) ldi r22,lo8(30) ldi r23,hi8(30) rcall __divmodhi4 mov r25,r24 .stabn 68,0,10,.LM3-main .LM3: ldi r24,lo8(-1) /* #APP */ out 23,r24 .stabn 68,0,11,.LM4-main .LM4: out 27,r25 .stabn 68,0,13,.LM5-main .LM5: /* #NOAPP */ .LBE2: .stabn 68,0,14,.LM6-main .LM6: ldi r24,lo8(0) ldi r25,hi8(0) /* epilogue: frame size=0 */ I'm afraid I don't know what the correct assembly should be. Does it appear that __divmodhi4 is not behaving correctly? Thanks, John Bright Dara Hazeghi wrote: > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- > trail&database=gcc&pr=10733 > > Hello, > > would it be possible for you to give include a copy of the bad assembly > generated (as well as what it should be)? Also your sample is not > complete (ie won't compile at all). Could you include a complete > sample? Thanks, > > Dara
next reply other threads:[~2003-05-10 21:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-05-10 21:26 John Bright [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-05-12 11:11 giovannibajo 2003-05-12 0:16 Dara Hazeghi 2003-05-10 23:06 John Bright 2003-05-10 21:56 Dara Hazeghi 2003-05-10 18:46 Dara Hazeghi 2003-05-10 15:36 jbright
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=20030510212601.26167.qmail@sources.redhat.com \ --to=jbright@winfordeng.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).