Rockbox mail archive
Subject: Re: [patch] wormlet.c
From: Paul Suade (paul.suade_at_laposte.net)
- using 'short' for memory access should be good, since a simple "mov.w"
will sign-extend to a 32-bit register.
- using 'unsigned short' will add one instruction for zero-extension.
It is possible that a function returning a short value in r0 may always add
a sign-extension - not sure.
But using 'short' instead of 'int' is really worth while using large array,
as Linus stated.
----- Original Message -----
From: "Nielsen Linus (ext)" <Linus.Nielsen_at_elema.siemens.se>
Sent: Thursday, August 29, 2002 11:19 AM
Subject: RE: [patch] wormlet.c
> > - reduced many int to short -> hopefully saves a few bytes
> I'm not sure about that. Shorts tend to generate more code, since the
> natural SH1 word size is 32 bits. If you have large tables it might be
> but otherwise we'd like you to use ints.
> By the way, I find the game fun, but kind of "unfair" when it places an
> right before your nose when you pick up food... :-(
Page was last modified "Jan 10 2012" The Rockbox Crew