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-x86_64/bionic/__bionic_clone.S b/libc/arch-x86_64/bionic/__bionic_clone.S
index 7692013..cf98d76 100644
--- a/libc/arch-x86_64/bionic/__bionic_clone.S
+++ b/libc/arch-x86_64/bionic/__bionic_clone.S
@@ -26,8 +26,7 @@
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
ENTRY(__bionic_clone)
diff --git a/libc/arch-x86_64/bionic/__get_sp.S b/libc/arch-x86_64/bionic/__get_sp.S
index 0c693b3..9cc18a9 100644
--- a/libc/arch-x86_64/bionic/__get_sp.S
+++ b/libc/arch-x86_64/bionic/__get_sp.S
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov %rsp, %rax
diff --git a/libc/arch-x86_64/bionic/__rt_sigreturn.S b/libc/arch-x86_64/bionic/__rt_sigreturn.S
index e03bb88..eddceb1 100644
--- a/libc/arch-x86_64/bionic/__rt_sigreturn.S
+++ b/libc/arch-x86_64/bionic/__rt_sigreturn.S
@@ -26,11 +26,9 @@
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
-ENTRY(__rt_sigreturn)
- .hidden _C_LABEL(__rt_sigreturn) // TODO: add an ENTRY_PRIVATE macro for x86_64.
+ENTRY_PRIVATE(__rt_sigreturn)
movl $__NR_rt_sigreturn, %eax
syscall
END(__rt_sigreturn)
diff --git a/libc/arch-x86_64/bionic/_setjmp.S b/libc/arch-x86_64/bionic/_setjmp.S
index e9b8dbb..c617030 100644
--- a/libc/arch-x86_64/bionic/_setjmp.S
+++ b/libc/arch-x86_64/bionic/_setjmp.S
@@ -36,8 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
diff --git a/libc/arch-x86_64/bionic/setjmp.S b/libc/arch-x86_64/bionic/setjmp.S
index 3f4a432..c81b573 100644
--- a/libc/arch-x86_64/bionic/setjmp.S
+++ b/libc/arch-x86_64/bionic/setjmp.S
@@ -36,8 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
diff --git a/libc/arch-x86_64/bionic/sigsetjmp.S b/libc/arch-x86_64/bionic/sigsetjmp.S
index 174222f..718743f 100644
--- a/libc/arch-x86_64/bionic/sigsetjmp.S
+++ b/libc/arch-x86_64/bionic/sigsetjmp.S
@@ -37,7 +37,7 @@
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*