From 851e68a2402fa414544e66650e09dfdaac813e51 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 19 Feb 2014 16:53:20 -0800 Subject: Unify our assembler macros. Our 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 files, which no one should now use directly. I've removed most of the unused cruft from the files, though there's still rather a lot in the mips/mips64 ones. Bug: 12229603 Change-Id: I2fff287dc571ac1087abe9070362fb9420d85d6d --- libc/private/bionic_asm.h | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'libc/private/bionic_asm.h') diff --git a/libc/private/bionic_asm.h b/libc/private/bionic_asm.h index be22b75..7c2686f 100644 --- a/libc/private/bionic_asm.h +++ b/libc/private/bionic_asm.h @@ -29,20 +29,32 @@ #ifndef _PRIVATE_BIONIC_ASM_H_ #define _PRIVATE_BIONIC_ASM_H_ -#include - #include /* 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 +#define __bionic_asm_custom_entry(f) +#define __bionic_asm_custom_end(f) +#define __bionic_asm_function_type @function + +#include + +#define ENTRY(f) \ + .text; \ + .globl f; \ + _ALIGN_TEXT; \ + .type f, __bionic_asm_function_type; \ + f: \ + __bionic_asm_custom_entry(f); \ + .cfi_startproc \ + +#define END(f) \ + .cfi_endproc; \ + .size f, .-f; \ + __bionic_asm_custom_end(f) \ -/* TODO: add ENTRY_PRIVATE. */ -/* TODO: add ASM_ALIAS macro. */ +/* Like ENTRY, but with hidden visibility. */ +#define ENTRY_PRIVATE(f) \ + ENTRY(f); \ + .hidden f \ #endif /* _PRIVATE_BIONIC_ASM_H_ */ -- cgit v1.1