diff --git a/liba/src/aeabi-rt/llsr.c b/liba/src/aeabi-rt/llsr.c index b381d4457..81c76075a 100644 --- a/liba/src/aeabi-rt/llsr.c +++ b/liba/src/aeabi-rt/llsr.c @@ -1,7 +1,9 @@ -/* See the "Run-time ABI for the ARM Architecture", Section 4.4.5 */ +/* See the "Run-time ABI for the ARM Architecture", Section 4.2 */ + +typedef int uint32_t; long long __aeabi_llsr(long long value, int shift) { - int low = ((int)value >> shift) | ((int)(value >> 32) << (32 - shift)); - int high = (int)value >> shift; + uint32_t low = ((uint32_t)value >> shift) | ((uint32_t)(value >> 32) << (32 - shift)); + uint32_t high = (uint32_t)value >> shift; return ((long long)high << 32) | low; } diff --git a/liba/src/aeabi-rt/memclr.c b/liba/src/aeabi-rt/memclr.c index 3e1a7ae4e..6faa352be 100644 --- a/liba/src/aeabi-rt/memclr.c +++ b/liba/src/aeabi-rt/memclr.c @@ -1,7 +1,7 @@ #include #include -/* See the "Run-time ABI for the ARM Architecture", Section 4.3.3 */ +/* See the "Run-time ABI for the ARM Architecture", Section 4.3.4 */ void __aeabi_memclr(void * dest, size_t n) { memset(dest, 0, n); diff --git a/liba/src/aeabi-rt/memcpy.c b/liba/src/aeabi-rt/memcpy.c index 6fc483f6c..3c8277754 100644 --- a/liba/src/aeabi-rt/memcpy.c +++ b/liba/src/aeabi-rt/memcpy.c @@ -1,7 +1,7 @@ #include #include -/* See the "Run-time ABI for the ARM Architecture", Section 4.3.3 */ +/* See the "Run-time ABI for the ARM Architecture", Section 4.3.4 */ void __aeabi_memcpy(void * dest, const void * src, size_t n) { memcpy(dest, src, n);