diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-04-18 22:41:46 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2015-04-22 20:00:24 +0200 |
commit | e71fc570caec4f2d4bbe729dfe9eb41bfe5a732a (patch) | |
tree | 3e9036c730288367ef489989e05b4452ca1116c8 /libc/string/arm/_memcpy.S | |
parent | 298f58e073b2782bd264edea969769b7b5e7cf41 (diff) |
arm: Add BX and BXC macros
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/string/arm/_memcpy.S')
-rw-r--r-- | libc/string/arm/_memcpy.S | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/libc/string/arm/_memcpy.S b/libc/string/arm/_memcpy.S index c59f5b808..2999e8ee6 100644 --- a/libc/string/arm/_memcpy.S +++ b/libc/string/arm/_memcpy.S @@ -111,11 +111,7 @@ _memcpy: bcc .Lmemcpy_backwards IT(t, eq) /* Quick abort for src=dst */ -#if defined(__USE_BX__) - bxeq lr -#else - moveq pc, lr -#endif + BXC(eq, lr) stmdb sp!, {r0, lr} /* memcpy() returns dest addr */ subs r2, r2, #4 blt .Lmemcpy_fl4 /* less than 4 bytes */ @@ -455,11 +451,7 @@ _memcpy: /* less than 4 bytes to go */ adds r2, r2, #4 IT(t, eq) -#if defined(__USE_BX__) - bxeq lr -#else - moveq pc, lr /* done */ -#endif + BXC(eq, lr) /* done */ /* copy the crud byte at a time */ cmp r2, #2 ldrb r3, [r1, #-1]! @@ -477,11 +469,7 @@ _memcpy: ldrgtb r3, [r1, #-1]! strgtb r3, [r0, #-1]! #endif -#if defined(__USE_BX__) - bx lr -#else - mov pc, lr -#endif + BX(lr) /* erg - unaligned destination */ .Lmemcpy_bdestul: cmp r12, #2 |