summaryrefslogtreecommitdiffstats
path: root/sys/libkern
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-12-14 16:28:53 +0000
committerandrew <andrew@FreeBSD.org>2014-12-14 16:28:53 +0000
commit90fc0dee7a26d23d867362739d7b6e6e0dbe0373 (patch)
tree9b4054152142c6af30b2bb73b6c1b80cf305d9f7 /sys/libkern
parent041226eb036d08804fe0e5cb72da0876281e63f3 (diff)
downloadFreeBSD-src-90fc0dee7a26d23d867362739d7b6e6e0dbe0373.zip
FreeBSD-src-90fc0dee7a26d23d867362739d7b6e6e0dbe0373.tar.gz
Clean up our ARM assembly:
MFC 275256: Switch to the ARM unified assembly language as the clang integrated as only supports it. Binutils supports it when the ".syntax unified" directive is set. Sponsored by: ABT Systems Ltd MFC 275264: Update _ENTRY to use _EENTRY to reduce the common code. MFC 275321: Remove extra labels, ENTRY_NP already provides them. Sponsored by: ABT Systems Ltd MFC 275322: Correctly a few incorrect uses of ENTRY/EENTRY and END/EEND Sponsored by: ABT Systems Ltd MFC 275416: Fix the name of the coprocessor to include the "p" prefix, the clang integrated assembler expects this. Sponsored by: ABT Systems Ltd MFC 275418: Switch to unified syntax so these can be built with clang 3.5. Sponsored by: ABT Systems Ltd MFC 275519: Add missing END macros to some of the xscale functions. Sponsored by: ABT Systems Ltd MFC 275520: Use the unified syntax in a few more assembly files Sponsored by: ABT Systems Ltd MFC 275521: Set the alignment to 4-bytes after a string as clang 3.5 can switch to thumb mode if this is incorrect. Sponsored by: ABT Systems Ltd MFC 275522: Place the literal pool after a RET otherwise clang 3.5 tries to put it too far away from a ldr psuedo instruction. With this clang will place the literal value here where it's close enough to be loaded. Sponsored by: ABT Systems Ltd MFC 275523: Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is unsupported as it needs a newer cpu. Sponsored by: ABT Systems Ltd MFC 275524: Switch to a .cpu directive. These will work when clang 3.5 is imported where the .arch directive is a nop. Sponsored by: ABT Systems Ltd
Diffstat (limited to 'sys/libkern')
-rw-r--r--sys/libkern/arm/ffs.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/libkern/arm/ffs.S b/sys/libkern/arm/ffs.S
index a43f2b6..1ddec95 100644
--- a/sys/libkern/arm/ffs.S
+++ b/sys/libkern/arm/ffs.S
@@ -31,6 +31,7 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
+ .syntax unified
/*
* ffs - find first set bit, this algorithm isolates the first set
@@ -62,7 +63,7 @@ ENTRY(ffs)
rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */
/* now lookup in table indexed on top 6 bits of r0 */
- ldrneb r0, [ r2, r0, lsr #26 ]
+ ldrbne r0, [ r2, r0, lsr #26 ]
RET
.text;
OpenPOWER on IntegriCloud