From 45fa0ac0a812eb36f4ff95eeaf3eccb5886272a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 22 May 2017 13:15:14 +0200 Subject: [PATCH] [liba] Clean Change-Id: Ic59df28d78ed02fb55fcf62e9d79434590194a93 --- liba/src/aeabi-rt/llsr.c | 8 +++++--- liba/src/aeabi-rt/memclr.c | 2 +- liba/src/aeabi-rt/memcpy.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) 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);