diff --git a/lib/armeabi.c b/lib/armeabi.c index 0d1217ba..b12d164f 100644 --- a/lib/armeabi.c +++ b/lib/armeabi.c @@ -399,7 +399,7 @@ REGS_RETURN(ulldiv_t, ulldiv_t) REGS_RETURN(idiv_t, idiv_t) REGS_RETURN(uidiv_t, uidiv_t) -AEABI_UXDIVMOD(uldivmod, unsigned long long, ulldiv_t, ULONG) +AEABI_UXDIVMOD(uldivmod, unsigned long long, ulldiv_t, ULLONG) __AEABI_XDIVMOD(ldivmod, long long, uldivmod, lldiv_t, ulldiv_t, LLONG) diff --git a/tccgen.c b/tccgen.c index 598ba88d..2376848b 100644 --- a/tccgen.c +++ b/tccgen.c @@ -861,11 +861,6 @@ ST_FUNC int gv(int rc) #endif if (r >= VT_CONST || /* XXX: test to VT_CONST incorrect ? */ (vtop->r & VT_LVAL)) { - /* We do not want to modifier the long long - pointer here, so the safest (and less - efficient) is to save all the other registers - in the stack. XXX: totally inefficient. */ - save_regs(1); /* load from memory */ vtop->type.t = load_type; load(r, vtop); diff --git a/tests/tcctest.c b/tests/tcctest.c index 6ec23a17..9a4d0efb 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2010,6 +2010,11 @@ void longlong_test(void) printf("%d %d %d %d\n", a > b, a < b, a >= b, a <= b); printf(LONG_LONG_FORMAT "\n", 0x123456789LLU); + + /* long long pointer deref in argument passing test */ + a = 0x123; + long long *p = &a; + llshift(*p, 5); } void manyarg_test(void)