sim: mn10300: use common size types
No point in open coding this logic here when we have common size types already that give the right answer.
This commit is contained in:
parent
5d19c36612
commit
b0e4c8a581
2 changed files with 12 additions and 29 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2015-06-11 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
|
* mn10300_sim.h (uint8, int8, uint16, int16, uint32, int32): Typedef
|
||||||
|
in terms of unsigned8, signed8, unsigned16, signed16, unsigned32,
|
||||||
|
and signed32 respectively.
|
||||||
|
|
||||||
2015-06-11 Mike Frysinger <vapier@gentoo.org>
|
2015-06-11 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
|
||||||
* interp.c (INLINE): Delete define.
|
* interp.c (INLINE): Delete define.
|
||||||
|
|
|
@ -16,35 +16,12 @@ extern SIM_DESC simulator;
|
||||||
|
|
||||||
extern int mn10300_debug;
|
extern int mn10300_debug;
|
||||||
|
|
||||||
#if UCHAR_MAX == 255
|
typedef unsigned8 uint8;
|
||||||
typedef unsigned char uint8;
|
typedef signed8 int8;
|
||||||
typedef signed char int8;
|
typedef unsigned16 uint16;
|
||||||
#else
|
typedef signed16 int16;
|
||||||
#error "Char is not an 8-bit type"
|
typedef unsigned32 uint32;
|
||||||
#endif
|
typedef signed32 int32;
|
||||||
|
|
||||||
#if SHRT_MAX == 32767
|
|
||||||
typedef unsigned short uint16;
|
|
||||||
typedef signed short int16;
|
|
||||||
#else
|
|
||||||
#error "Short is not a 16-bit type"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if INT_MAX == 2147483647
|
|
||||||
|
|
||||||
typedef unsigned int uint32;
|
|
||||||
typedef signed int int32;
|
|
||||||
|
|
||||||
#else
|
|
||||||
# if LONG_MAX == 2147483647
|
|
||||||
|
|
||||||
typedef unsigned long uint32;
|
|
||||||
typedef signed long int32;
|
|
||||||
|
|
||||||
# else
|
|
||||||
# error "Neither int nor long is a 32-bit type"
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue