Make mips/mips64 syscall stubs more like the other architectures.
Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
diff --git a/libc/private/bionic_asm.h b/libc/private/bionic_asm.h
index 803ff29..be22b75 100644
--- a/libc/private/bionic_asm.h
+++ b/libc/private/bionic_asm.h
@@ -29,14 +29,19 @@
#ifndef _PRIVATE_BIONIC_ASM_H_
#define _PRIVATE_BIONIC_ASM_H_
-#if !defined(__mips__)
-/* <machine/asm.h> causes trouble on mips by including regdefs.h. */
#include <machine/asm.h>
-#endif
#include <asm/unistd.h> /* For system call numbers. */
#define MAX_ERRNO 4095 /* For recognizing system call error returns. */
+#if __mips__
+/* mips/mips64 don't have ENTRY like the others. */
+#define ENTRY(f) .text; .globl f; .align 4; .type f, @function; .ent f; f: .cfi_startproc
+/* mips/mips64 do have END, but we want a better one, more like the others. */
+#undef END
+#define END(f) .cfi_endproc; .size f, .-f; .end f
+#endif
+
/* TODO: add ENTRY_PRIVATE. */
/* TODO: add ASM_ALIAS macro. */