Unify our assembler macros.
Our <machine/asm.h> files were modified from upstream, to the extent
that no architecture was actually using the upstream ENTRY or END macros,
assuming that architecture even had such a macro upstream. This patch moves
everyone to the same macros, with just a few tweaks remaining in the
<machine/asm.h> files, which no one should now use directly.
I've removed most of the unused cruft from the <machine/asm.h> files, though
there's still rather a lot in the mips/mips64 ones.
Bug: 12229603
Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d
diff --git a/libc/arch-mips/bionic/memcmp16.S b/libc/arch-mips/bionic/memcmp16.S
index a2b2544..f9d14a9 100644
--- a/libc/arch-mips/bionic/memcmp16.S
+++ b/libc/arch-mips/bionic/memcmp16.S
@@ -25,31 +25,26 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/*
- * u4 __memcmp16(const u2* s0, const u2* s1, size_t count);
- */
- .type __memcmp16, @function
- .global __memcmp16
- .align 4
- .ent __memcmp16
-__memcmp16:
- li $t0,0
- li $t1,0
- beqz $a2,done /* 0 length string */
- beq $a0,$a1,done /* strings are identical */
+#include <private/bionic_asm.h>
+
+// u4 __memcmp16(const u2*, const u2*, size_t);
+ENTRY(__memcmp16)
+ li t0,0
+ li t1,0
+ beqz a2,done /* 0 length string */
+ beq a0,a1,done /* strings are identical */
/* Unoptimised... */
-1: lhu $t0,0($a0)
- lhu $t1,0($a1)
- addu $a1,2
- bne $t0,$t1,done
- addu $a0,2
- subu $a2,1
- bnez $a2,1b
+1: lhu t0,0(a0)
+ lhu t1,0(a1)
+ addu a1,2
+ bne t0,t1,done
+ addu a0,2
+ subu a2,1
+ bnez a2,1b
done:
- subu $v0,$t0,$t1
- j $ra
- .end __memcmp16
+ subu v0,t0,t1
+ j ra
+END(__memcmp16)