Path: chuka.playstation.co.uk!news From: sosman@terratron.com (Steven Osman) Newsgroups: scee.yaroze.freetalk.english Subject: Re: Daft Question [long] Date: Fri, 31 Aug 2001 03:56:38 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 44 Message-ID: <3b910a19.35654388@www.netyaroze-europe.com> References: <9m1d9c$b2i7@www.netyaroze-europe.com> <01c12ceb$fba64880$9709e4d5@pal-s-omnibook> <9m9c88$ioj5@www.netyaroze-europe.com> <01c12edc$cc2bf440$991fe4d5@pal-s-omnibook> <9me1g1$1sb13@www.netyaroze-europe.com> <9meajl$1sb17@www.netyaroze-europe.com> <9med8s$1sb18@www.netyaroze-europe.com> <9mekaq$1sb20@www.netyaroze-europe.com> <3b915bb2.83462112@www.netyaroze-europe.com> <9mm6uc$h6i10@www.netyaroze-europe.com> <9mmc13$ijv4@www.netyaroze-europe.com> NNTP-Posting-Host: dsl092-099-074.nyc2.dsl.speakeasy.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.452 I thought you were wrong ;) -- actually, I thought it was pretty neat when you said the compile will convert it... Unfortunately, Codewarrior doesn't do it: given: int a,b,c; a=5000; b=a/1024; c=a>>10; Here are the two "divisions": Using divide: lw t2,4(sp) nop bgez t2,*+16 sra t9,t2,10 addiu t1,t2,1023 sra t9,t1,10 sw t9,8(sp) Using shift: lw t0,4(sp) nop sra t2,t0,10 sw t2,12(sp) On Thu, 30 Aug 2001 22:43:42 +0100, "Jon Prestidge (Jon@surfed.to)" wrote: >> and divide by 1024 instead (the compiler >> will convert it to >>10 >> for you... unless it's a very crap compiler). > >um, am I right? I'm having second thoughts whether the compile would do that for you now... best put ">>10" instead of "/1024" to make sure incase I'm wrong. > >yours, >"flakey Jon".