X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Ftests%2Flibmullong.c;h=2445c4f39e7245dc652edc156562f9b09af8f7a0;hb=90bdb43b342189fcb94a398855d43f3f47f96738;hp=d824c71293dab6f88b3d93f85e3674d408f81e87;hpb=ac4fcf27570b37664aeee9f6dc86a40b812faca7;p=fw%2Fsdcc diff --git a/support/regression/tests/libmullong.c b/support/regression/tests/libmullong.c index d824c712..2445c4f3 100644 --- a/support/regression/tests/libmullong.c +++ b/support/regression/tests/libmullong.c @@ -7,19 +7,19 @@ #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" +# 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 @@ -35,24 +35,24 @@ 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; - } + } } #else -long -mullong_wrapper (long a, long b) +TYPE_TARGET_LONG +mullong_wrapper (TYPE_TARGET_LONG a, TYPE_TARGET_LONG b) { return a * b; }