Jeremy Bennett jeremy.bennett at embecosm.com
Thu Jul 3 10:03:12 BST 2014

One of the very early design criteria for BEEBS was that it should not
make assumptions about machine word size.

The C standard only guarantees the following

  sizeof (short int) >= 16 bits
  sizeof (int)       >= 16 bits
  sizeof (int)       >= sizeof (short int)
  sizeof (long int)  >= 32 bits
  sizeof (long int)  >= sizeof (int)

In particular many small embedded systems have sizeof (int) is 16.

We need to make sure that all BEEBS tests are compliant for such
systems. In particular fdct.c assumes int is 32 bit - they are used for
intermediate results.

There are two approaches
1. Use stdint.h and explicit int sizes
2. Use long int where we want 32 bits

Personally I favour the latter, since it gives the machine greater

In the meantime, I'll patch fdct.c


Tel:     +44 (1590) 610184
Cell:    +44 (7970) 676050
SkypeId: jeremybennett
Email:   jeremy.bennett at embecosm.com
Web:     www.embecosm.com
Twitter: @embecosm

More information about the mageec mailing list