X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao_int64.c;h=dffb855648a212189654bc5707aae0b1f01f599c;hb=188f9efadd480de872f86a8eb741e8738db84c6b;hp=ca75751b21d6625219e033ba01392d3e9c56aa52;hpb=d59d6787bfe26c3b18491ece602ad6cc5cf26c42;p=fw%2Faltos diff --git a/src/kernel/ao_int64.c b/src/kernel/ao_int64.c index ca75751b..dffb8556 100644 --- a/src/kernel/ao_int64.c +++ b/src/kernel/ao_int64.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,7 +18,7 @@ #include -void ao_plus64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, __pdata ao_int64_t *b) __FATTR { +void ao_plus64(ao_int64_t *r, ao_int64_t *a, ao_int64_t *b) __FATTR { __LOCAL uint32_t t; r->high = a->high + b->high; @@ -27,7 +28,7 @@ void ao_plus64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, __pdata ao_int64_t r->low = t; } -void ao_minus64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, __pdata ao_int64_t *b) __FATTR { +void ao_minus64(ao_int64_t *r, ao_int64_t *a, ao_int64_t *b) __FATTR { __LOCAL uint32_t t; r->high = a->high - b->high; @@ -37,7 +38,7 @@ void ao_minus64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, __pdata ao_int64_t r->low = t; } -void ao_rshift64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, uint8_t d) __FATTR { +void ao_rshift64(ao_int64_t *r, ao_int64_t *a, uint8_t d) __FATTR { if (d < 32) { r->low = a->low >> d; if (d) @@ -50,7 +51,7 @@ void ao_rshift64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, uint8_t d) __FATT } } -void ao_lshift64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, uint8_t d) __FATTR { +void ao_lshift64(ao_int64_t *r, ao_int64_t *a, uint8_t d) __FATTR { if (d < 32) { r->high = a->high << d; if (d) @@ -63,7 +64,7 @@ void ao_lshift64(__pdata ao_int64_t *r, __pdata ao_int64_t *a, uint8_t d) __FATT } } -static void ao_umul64_32_32(__ARG ao_int64_t *r, uint32_t a, uint32_t b) __reentrant { +static void ao_umul64_32_32(__ARG ao_int64_t *r, uint32_t a, uint32_t b) { __LOCAL uint32_t s; __LOCAL ao_int64_t t; r->low = (uint32_t) (uint16_t) a * (uint16_t) b; @@ -82,7 +83,7 @@ static void ao_umul64_32_32(__ARG ao_int64_t *r, uint32_t a, uint32_t b) __reent ao_plus64(r, r, &t); } -void ao_neg64(__pdata ao_int64_t *r, __pdata ao_int64_t *a) __FATTR { +void ao_neg64(ao_int64_t *r, ao_int64_t *a) __FATTR { r->high = ~a->high; if (!(r->low = ~a->low + 1)) r->high++; @@ -104,7 +105,7 @@ void ao_mul64_32_32(__ARG ao_int64_t *r, int32_t a, int32_t b) __FATTR { ao_neg64(r, r); } -static void ao_umul64(__ARG ao_int64_t *r, __ARG ao_int64_t *a, __ARG ao_int64_t *b) __reentrant { +static void ao_umul64(__ARG ao_int64_t *r, __ARG ao_int64_t *a, __ARG ao_int64_t *b) { __LOCAL ao_int64_t r2, r3; ao_umul64_32_32(&r2, a->high, b->low); @@ -134,7 +135,7 @@ void ao_mul64(__ARG ao_int64_t *r, __ARG ao_int64_t *a, __ARG ao_int64_t *b) __F ao_neg64(r, r); } -static void ao_umul64_64_16(__ARG ao_int64_t *r, __ARG ao_int64_t *a, uint16_t b) __reentrant { +static void ao_umul64_64_16(__ARG ao_int64_t *r, __ARG ao_int64_t *a, uint16_t b) { __LOCAL uint32_t h; h = a->high * b;