mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2024-09-20 06:51:49 +00:00
4a0977b0f6
Make 2 different folders for armv7 and aarch64 assembly neatlibc functions. Add the neatlibc submodule, make it work against the Makefile system. Pray. Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
22 lines
296 B
ArmAsm
22 lines
296 B
ArmAsm
|
|
.global htonl
|
|
.global ntohl
|
|
ntohl:
|
|
htonl:
|
|
eor r1, r0, r0, ror #16
|
|
bic r1, r1, #0x00ff0000
|
|
mov r0, r0, ror #8
|
|
eor r0, r0, r1, lsr #8
|
|
mov pc, lr
|
|
|
|
.global htons
|
|
.global ntohs
|
|
ntohs:
|
|
htons:
|
|
mov r1, r0, lsr #8
|
|
and r0, r0, #255
|
|
and r1, r1, #255
|
|
mov r0, r0, lsl #8
|
|
orr r0, r0, r1
|
|
mov pc, lr
|