[hatari-devel] Cmake warnings

Thomas Huth huth at users.berlios.de
Mon Jan 18 23:31:23 CET 2010


On Tue, 19 Jan 2010 00:24:51 +0200
Eero Tamminen <eerot at users.berlios.de> wrote:

[...]
> static Uint32 cur_inst;
> ...
> static Uint32 read_memory(int space, Uint16 address)
> {
> ...
>         /* Internal ROM ? */
>         if (address < 0x200) {
>                 if (dsp_core->registers[DSP_REG_OMR] &
> (1<<DSP_OMR_DE)) {
[...]
> 
> 0xffc0 = 1111111111000000 i.e. last six bits are empty.
> "value" is a positive integer with at max six bits.  This means
> that addr value will be 0xffc0 - 0xffff.
> 
> Which clearly doesn't fit into the 512 addresses rom array has.
> 
> I.e. to me it seems a real bug.

You missed the "if (address < 0x200)" in above code. address can't be
bigger than 512 here. So I think this is a mistake of GCC, not of the
DSP code.

 Thomas



More information about the hatari-devel mailing list