beautypg.com

FUJITSU MB91F109 FR30 User Manual

Page 422

background image

398

APPENDIX D Notes on Using Little Endian Areas

Do not allocate double and long double type variables to little endian areas.

[Example of incorrect processing] Transfer of double type data

double big = 1.0; /* Big endian area */

extern int little; /* Little endian area */

little = big; /* Transfer of double type data */

The execution result of the above transfer is rendered incorrect by the transfer of double type
data as follows:

Allocating a Stack to a Little Endian Area

If some part or the whole area of a stack is allocated to a little endian area, the result of the
subsequent operation may be rendered invalid.

3f

f0

00

00

00

00

00

00

(Big endian area)

(Little endian area)

(Correct result)

3f

f0

00

00

00

00

00

00

00

00

00

00

00

00

3f

f0