Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: [patch] wormlet.c

Re: [patch] wormlet.c

From: Paul Suade <paul.suade_at_laposte.net>
Date: Thu, 29 Aug 2002 12:18:19 +0200

- 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>
To: <rockbox_at_cool.haxx.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
good,
> 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
argh
> right before your nose when you pick up food... :-(
>
> /Linus
Received on 2002-08-29

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy