mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[liba] Implement llsl
Change-Id: I651deb9ae7b48cabaeb7e21d13ed395f133fd0c3
This commit is contained in:
@@ -76,6 +76,7 @@ tests += $(addprefix liba/test/, \
|
||||
# In practice we're always using liba on such a target.
|
||||
objs += $(addprefix liba/src/aeabi-rt/, \
|
||||
atexit.o \
|
||||
llsl.o \
|
||||
llsr.o \
|
||||
memclr.o \
|
||||
memcpy.o \
|
||||
|
||||
9
liba/src/aeabi-rt/llsl.c
Normal file
9
liba/src/aeabi-rt/llsl.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/* See the "Run-time ABI for the ARM Architecture", Section 4.2 */
|
||||
|
||||
typedef int uint32_t;
|
||||
|
||||
long long __aeabi_llsl(long long value, int shift) {
|
||||
uint32_t low = (uint32_t)value << shift;
|
||||
uint32_t high = ((uint32_t)(value >> 32) << shift) | ((uint32_t)value >> (32 - shift));
|
||||
return ((long long)high << 32) | low;
|
||||
}
|
||||
Reference in New Issue
Block a user