#define type_{type}
#if defined(PORT_HOST)
-# include "../../../../../sdccconf.h"
+# include "sdccconf.h"
+# define mullong(a,b) mullong_wrapper(a,b)
# if defined(type_c) && !defined(WORDS_BIGENDIAN)
# define _SDCC_NO_ASM_LIB_FUNCS 1
# define near
# define long int
-# include "../../../../../device/lib/_mullong.c"
-# define mullong(a,b) mullong_wrapper(a,b)
-# else
-# define mullong(a,b) mullong_wrapper(a,b)
+# include "device/lib/_mullong.c"
# endif
#else
# if defined(type_c)
# define _SDCC_NO_ASM_LIB_FUNCS 1
# endif
-# include "../../../../../device/lib/_mullong.c"
+# include "device/lib/_mullong.c"
# define mullong _mullong
#endif
*/
#if defined(PORT_HOST)
+#define TYPE_TARGET_CHAR TYPE_BYTE
+#define TYPE_TARGET_INT TYPE_WORD
+#define TYPE_TARGET_LONG TYPE_DWORD
+#define TYPE_TARGET_UCHAR TYPE_UBYTE
+#define TYPE_TARGET_UINT TYPE_UWORD
+#define TYPE_TARGET_ULONG TYPE_UDWORD
+
#if defined(type_c) && !defined(WORDS_BIGENDIAN)
struct
{
short i;
char c2;
} pack_test;
-
-long
-mullong_wrapper (long a, long b)
+
+TYPE_TARGET_LONG
+mullong_wrapper (TYPE_TARGET_LONG a, TYPE_TARGET_LONG b)
{
if (sizeof(pack_test) == 4)
/* length of struct ok: use SDCC library */
return _mullong (a, b);
else
- {
+ {
/* buggy gcc: use generic multiplication */
return a * b;
- }
+ }
}
-#endif
-#if defined(WORDS_BIGENDIAN)
+#else
-long
-mullong_wrapper (long a, long b)
+TYPE_TARGET_LONG
+mullong_wrapper (TYPE_TARGET_LONG a, TYPE_TARGET_LONG b)
{
return a * b;
}