author | Calin Juravle <calin@google.com> | |
Fri, 21 Feb 2014 17:09:13 +0000 (17:09 +0000) | ||
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | |
Fri, 21 Feb 2014 17:09:13 +0000 (17:09 +0000) |
604 files changed:
diff --git a/HACKING.txt b/HACKING.txt
--- /dev/null
+++ b/HACKING.txt
@@ -0,0 +1,163 @@
+Working on bionic
+=================
+
+What are the big pieces of bionic?
+----------------------------------
+
+libc/ --- libc.so, libc.a
+ The C library. Stuff like fopen(3) and kill(2).
+libm/ --- libm.so, libm.a
+ The math library. Traditionally Unix systems kept stuff like sin(3) and
+ cos(3) in a separate library to save space in the days before shared
+ libraries.
+libdl/ --- libdl.so
+ The dynamic linker interface library. This is actually just a bunch of
+ stubs that the dynamic linker replaces with pointers to its own
+ implementation at runtime. This is where stuff like dlopen(3) lives.
+libstdc++/ --- libstdc++.so
+ The C++ ABI support functions. The C++ compiler doesn't know how to
+ implement thread-safe static initialization and the like, so it just calls
+ functions that are supplied by the system. Stuff like __cxa_guard_acquire
+ and __cxa_pure_virtual live here.
+
+linker/ --- /system/bin/linker and /system/bin/linker64
+ The dynamic linker. When you run a dynamically-linked executable, its ELF
+ file has a DT_INTERP entry that says "use the following program to start me".
+ On Android, that's either linker or linker64 (depending on whether it's a
+ 32-bit or 64-bit executable). It's responsible for loading the ELF executable
+ into memory and resolving references to symbols (so that when your code tries
+ to jump to fopen(3), say, it lands in the right place).
+
+tests/ --- unit tests
+ The tests/ directory contains unit tests. Roughly arranged as one file per
+ publicly-exported header file.
+benchmarks/ --- benchmarks
+ The benchmarks/ directory contains benchmarks.
+
+
+What's in libc/?
+----------------
+
+libc/
+ arch-arm/
+ arch-arm64/
+ arch-common/
+ arch-mips/
+ arch-mips64/
+ arch-x86/
+ arch-x86_64/
+ # Each architecture has its own subdirectory for stuff that isn't shared
+ # because it's architecture-specific. There will be a .mk file in here that
+ # drags in all the architecture-specific files.
+ bionic/
+ # Every architecture needs a handful of machine-specific assembler files.
+ # They live here.
+ include/
+ machine/
+ # The majority of header files are actually in libc/include/, but many
+ # of them pull in a <machine/something.h> for things like limits,
+ # endianness, and how floating point numbers are represented. Those
+ # headers live here.
+ string/
+ # Most architectures have a handful of optional assembler files
+ # implementing optimized versions of various routines. The <string.h>
+ # functions are particular favorites.
+ syscalls/
+ # The syscalls directories contain script-generated assembler files.
+ # See 'Adding system calls' later.
+
+ include/
+ # The public header files on everyone's include path. These are a mixture of
+ # files written by us and files taken from BSD.
+
+ kernel/
+ # The kernel uapi header files. These are scrubbed copies of the originals
+ # in external/kernel-headers/. These files must not be edited directly. The
+ # generate_uapi_headers.sh script should be used to go from a kernel tree to
+ # external/kernel-headers/ --- this takes care of the architecture-specific
+ # details. The update_all.py script should be used to regenerate bionic's
+ # scrubbed headers from external/kernel-headers/.
+
+ private/
+ # These are private header files meant for use within bionic itself.
+
+ netbsd/
+ stdio/
+ stdlib/
+ string/
+ unistd/
+ wchar/
+ # These are legacy files of unknown provenance. In the past, bionic was a
+ # mess of random versions of random files from all three of FreeBSD, NetBSD,
+ # and OpenBSD! We've been working to clean that up, but these directories
+ # are basically where all the stuff we haven't got to yet lives.
+ # The 'netbsd' directory misleadingly contains the DNS resolver (which will
+ # probably be forked sometime soon, and that directory simply renamed).
+ # The other directories contain stuff that still needs to be sorted.
+
+ upstream-dlmalloc/
+ upstream-freebsd/
+ upstream-netbsd/
+ upstream-openbsd/
+ # These directories contain unmolested upstream source. Any time we can
+ # just use a BSD implementation of something unmodified, we should.
+ # See files like netbsd-compat.h for various ways in which we manage to
+ # build BSD source in bionic.
+
+ bionic/
+ # This is the biggest mess. The C++ files are files we own, typically
+ # because the Linux kernel interface is sufficiently different that we
+ # can't use any of the BSD implementations. The C files are usually
+ # legacy mess that needs to be sorted out, either by replacing it with
+ # current upstream source in one of the upstream directories or by
+ # switching the file to C++ and cleaning it up.
+
+ tools/
+ # Various tools used to maintain bionic.
+
+ tzcode/
+ # A modified superset of the IANA tzcode. Most of the modifications relate
+ # to Android's use of a single file (with corresponding index) to contain
+ # time zone data.
+ zoneinfo/
+ # Android-format time zone data.
+ # See 'Updating tzdata' later.
+
+
+Adding system calls
+-------------------
+
+Adding a system call usually involves:
+
+ 1. Add entries to SYSCALLS.TXT.
+ See SYSCALLS.TXT itself for documentation on the format.
+ 2. Run the gensyscalls.py script.
+ 3. Add constants (and perhaps types) to the appropriate header file.
+ Note that you should check to see whether the constants are already in
+ kernel uapi header files, in which case you just need to make sure that
+ that appropriate POSIX header file in libc/include/ includes the
+ relevant file or files.
+ 4. Add function declarations to the appropriate header file.
+ 5. Add at least basic tests. Even a test that deliberately supplies
+ an invalid argument helps check that we're generating the right symbol
+ and have the right declaration in the header file. (And strace(1) can
+ confirm that the correct system call is being made.)
+
+
+Updating kernel header files
+----------------------------
+
+As mentioned above, this is currently a two-step process:
+
+ 1. Use generate_uapi_headers.sh to go from a Linux source tree to appropriate
+ contents for external/kernel-headers/.
+ 2. Run update_all.py to scrub those headers and import them into bionic.
+
+
+Updating tzdata
+---------------
+
+This is fully automated:
+
+ 1. Run update-tzdata.py.
+
diff --git a/libc/Android.mk b/libc/Android.mk
index ad5fb1ca6e3bd3c1140832df22b364f157eec643..9cde07310afcea12272c6c9583d28371e89cf4a9 100644 (file)
--- a/libc/Android.mk
+++ b/libc/Android.mk
wchar/wcswidth.c \
wchar/wcsxfrm.c \
-
-libc_dns_src_files += \
- netbsd/gethnamaddr.c \
- netbsd/inet/nsap_addr.c \
- netbsd/nameser/ns_name.c \
- netbsd/nameser/ns_netint.c \
- netbsd/nameser/ns_parse.c \
- netbsd/nameser/ns_print.c \
- netbsd/nameser/ns_samedomain.c \
- netbsd/nameser/ns_ttl.c \
- netbsd/net/base64.c \
- netbsd/net/getaddrinfo.c \
- netbsd/net/getnameinfo.c \
- netbsd/net/getservbyname.c \
- netbsd/net/getservbyport.c \
- netbsd/net/getservent.c \
- netbsd/net/nsdispatch.c \
- netbsd/resolv/__dn_comp.c \
- netbsd/resolv/herror.c \
- netbsd/resolv/res_cache.c \
- netbsd/resolv/__res_close.c \
- netbsd/resolv/res_comp.c \
- netbsd/resolv/res_data.c \
- netbsd/resolv/res_debug.c \
- netbsd/resolv/res_init.c \
- netbsd/resolv/res_mkquery.c \
- netbsd/resolv/res_query.c \
- netbsd/resolv/__res_send.c \
- netbsd/resolv/res_send.c \
- netbsd/resolv/res_state.c \
-
-
# Fortify implementations of libc functions.
libc_common_src_files += \
bionic/__FD_chk.cpp \
bionic/wait.cpp \
bionic/wchar.cpp \
-
libc_upstream_freebsd_src_files := \
upstream-freebsd/lib/libc/gen/sleep.c \
upstream-freebsd/lib/libc/gen/usleep.c \
libc_upstream_netbsd_src_files := \
upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
upstream-netbsd/common/lib/libc/inet/inet_addr.c \
- upstream-netbsd/libc/gen/ftw.c \
- upstream-netbsd/libc/gen/nftw.c \
- upstream-netbsd/libc/gen/nice.c \
- upstream-netbsd/libc/gen/popen.c \
- upstream-netbsd/libc/gen/psignal.c \
- upstream-netbsd/libc/gen/setjmperr.c \
- upstream-netbsd/libc/gen/utime.c \
- upstream-netbsd/libc/inet/inet_ntoa.c \
- upstream-netbsd/libc/inet/inet_ntop.c \
- upstream-netbsd/libc/inet/inet_pton.c \
- upstream-netbsd/libc/isc/ev_streams.c \
- upstream-netbsd/libc/isc/ev_timers.c \
- upstream-netbsd/libc/regex/regcomp.c \
- upstream-netbsd/libc/regex/regerror.c \
- upstream-netbsd/libc/regex/regexec.c \
- upstream-netbsd/libc/regex/regfree.c \
- upstream-netbsd/libc/stdio/getdelim.c \
- upstream-netbsd/libc/stdio/getline.c \
- upstream-netbsd/libc/stdlib/bsearch.c \
- upstream-netbsd/libc/stdlib/div.c \
- upstream-netbsd/libc/stdlib/drand48.c \
- upstream-netbsd/libc/stdlib/erand48.c \
- upstream-netbsd/libc/stdlib/exit.c \
- upstream-netbsd/libc/stdlib/jrand48.c \
- upstream-netbsd/libc/stdlib/ldiv.c \
- upstream-netbsd/libc/stdlib/lldiv.c \
- upstream-netbsd/libc/stdlib/lrand48.c \
- upstream-netbsd/libc/stdlib/mrand48.c \
- upstream-netbsd/libc/stdlib/nrand48.c \
- upstream-netbsd/libc/stdlib/_rand48.c \
- upstream-netbsd/libc/stdlib/seed48.c \
- upstream-netbsd/libc/stdlib/srand48.c \
- upstream-netbsd/libc/stdlib/tdelete.c \
- upstream-netbsd/libc/stdlib/tfind.c \
- upstream-netbsd/libc/stdlib/tsearch.c \
- upstream-netbsd/libc/string/memccpy.c \
- upstream-netbsd/libc/string/strcasestr.c \
- upstream-netbsd/libc/string/strcoll.c \
- upstream-netbsd/libc/string/strxfrm.c \
- upstream-netbsd/libc/thread-stub/__isthreaded.c \
- upstream-netbsd/libc/unistd/killpg.c \
+ upstream-netbsd/lib/libc/gen/ftw.c \
+ upstream-netbsd/lib/libc/gen/nftw.c \
+ upstream-netbsd/lib/libc/gen/nice.c \
+ upstream-netbsd/lib/libc/gen/popen.c \
+ upstream-netbsd/lib/libc/gen/psignal.c \
+ upstream-netbsd/lib/libc/gen/setjmperr.c \
+ upstream-netbsd/lib/libc/gen/utime.c \
+ upstream-netbsd/lib/libc/inet/inet_ntoa.c \
+ upstream-netbsd/lib/libc/inet/inet_ntop.c \
+ upstream-netbsd/lib/libc/inet/inet_pton.c \
+ upstream-netbsd/lib/libc/isc/ev_streams.c \
+ upstream-netbsd/lib/libc/isc/ev_timers.c \
+ upstream-netbsd/lib/libc/regex/regcomp.c \
+ upstream-netbsd/lib/libc/regex/regerror.c \
+ upstream-netbsd/lib/libc/regex/regexec.c \
+ upstream-netbsd/lib/libc/regex/regfree.c \
+ upstream-netbsd/lib/libc/stdio/getdelim.c \
+ upstream-netbsd/lib/libc/stdio/getline.c \
+ upstream-netbsd/lib/libc/stdlib/bsearch.c \
+ upstream-netbsd/lib/libc/stdlib/div.c \
+ upstream-netbsd/lib/libc/stdlib/drand48.c \
+ upstream-netbsd/lib/libc/stdlib/erand48.c \
+ upstream-netbsd/lib/libc/stdlib/exit.c \
+ upstream-netbsd/lib/libc/stdlib/jrand48.c \
+ upstream-netbsd/lib/libc/stdlib/ldiv.c \
+ upstream-netbsd/lib/libc/stdlib/lldiv.c \
+ upstream-netbsd/lib/libc/stdlib/lrand48.c \
+ upstream-netbsd/lib/libc/stdlib/mrand48.c \
+ upstream-netbsd/lib/libc/stdlib/nrand48.c \
+ upstream-netbsd/lib/libc/stdlib/_rand48.c \
+ upstream-netbsd/lib/libc/stdlib/seed48.c \
+ upstream-netbsd/lib/libc/stdlib/srand48.c \
+ upstream-netbsd/lib/libc/stdlib/tdelete.c \
+ upstream-netbsd/lib/libc/stdlib/tfind.c \
+ upstream-netbsd/lib/libc/stdlib/tsearch.c \
+ upstream-netbsd/lib/libc/string/memccpy.c \
+ upstream-netbsd/lib/libc/string/strcasestr.c \
+ upstream-netbsd/lib/libc/string/strcoll.c \
+ upstream-netbsd/lib/libc/string/strxfrm.c \
+ upstream-netbsd/lib/libc/thread-stub/__isthreaded.c \
+ upstream-netbsd/lib/libc/unistd/killpg.c \
libc_arch_static_src_files := \
bionic/dl_iterate_phdr_static.cpp \
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := \
- tzcode/asctime.c \
- tzcode/difftime.c \
- tzcode/localtime.c \
- tzcode/strftime.c \
- tzcode/strptime.c \
-
+LOCAL_SRC_FILES := $(call all-c-files-under,tzcode)
LOCAL_CFLAGS := \
$(libc_common_cflags) \
-DSTD_INSPIRED=1 \
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(libc_dns_src_files)
+LOCAL_SRC_FILES := $(call all-c-files-under,netbsd)
LOCAL_CFLAGS := \
$(libc_common_cflags) \
-DINET6 \
-I$(LOCAL_PATH)/private \
- -I$(LOCAL_PATH)/upstream-netbsd/libc/include # for NetBSD private headers
-
+ -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include # for NetBSD private headers
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
LOCAL_C_INCLUDES := $(libc_common_c_includes)
$(libc_common_cflags) \
-DPOSIX_MISTAKE \
-I$(LOCAL_PATH)/upstream-netbsd \
- -I$(LOCAL_PATH)/upstream-netbsd/libc/include \
+ -I$(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
-include upstream-netbsd/netbsd-compat.h
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
diff --git a/libc/arch-arm/arm.mk b/libc/arch-arm/arm.mk
index ccdf5a1d07618446489124e36186f052ff6ca8fe..55f99783ab28efa65cda5c55acb84357c12ad353 100644 (file)
--- a/libc/arch-arm/arm.mk
+++ b/libc/arch-arm/arm.mk
# bionic/__strcpy_chk.cpp \
# bionic/__strcat_chk.cpp \
-# cflags
-libc_common_cflags_arm := \
- -DSOFTFLOAT \
- -fstrict-aliasing
+libc_common_cflags_arm := -DSOFTFLOAT
##########################################
### CPU specific source files
arch-arm/bionic/sigsetjmp.S \
arch-arm/bionic/syscall.S \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_arm := \
- arch-arm/bionic/exidx_static.c \
-
-libc_arch_dynamic_src_files_arm := \
- arch-arm/bionic/exidx_dynamic.c \
+libc_arch_static_src_files_arm := arch-arm/bionic/exidx_static.c
+libc_arch_dynamic_src_files_arm := arch-arm/bionic/exidx_dynamic.c
## CPU variant specific source files
ifeq ($(strip $(TARGET_$(my_2nd_arch_prefix)CPU_VARIANT)),)
cpu_variant_mk :=
-##########################################
-# crt-related
+
libc_crt_target_cflags_arm := \
-I$(LOCAL_PATH)/arch-arm/include \
-mthumb-interwork
index 2a7e7b7716e6a7aa207f4b5a9b5bfefc74b24f92..aabec6d8cc819dd4b07b5063f82b17f7cbf705ae 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov r0, sp
index 6b8aa503a635c2e03e1c06e72330c610ca198bcb..64a0a31c93dc8fa49ca778e4faeb6365508d9636 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
#include <machine/cpu-features.h>
/* validation failed, die die die. */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(_longjmp)
index 1aaf21ad88b17b075817a449e5e626aca6c88fa9..6b181efb753f2ce0592453fad36efce0c0268799 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* Coding the abort function in assembly so that registers are guaranteed to
.cfi_def_cfa_offset 8
.cfi_rel_offset r3, 0
.cfi_rel_offset r14, 4
- bl PIC_SYM(_C_LABEL(__libc_android_abort), PLT)
+ bl PIC_SYM(__libc_android_abort, PLT)
END(abort)
index f694060e6963103a5f12205ec255d6f5c32f2e8a..c45e6e2cabd87ee9617d6950bdbe78343e5e3839 100644 (file)
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* This file contains dummy references to libgcc.a functions to force the
- * dynamic linker to copy their definition into the final libc.so binary.
- *
- * They are required to ensure backwards binary compatibility with
- * libc.so provided by the platform and binaries built with the NDK or
- * different versions/configurations of toolchains.
- *
- * Now, for a more elaborate description of the issue:
- *
- * libgcc.a is a compiler-specific library containing various helper
- * functions used to implement certain operations that are not necessarily
- * supported by the target CPU. For example, integer division doesn't have a
- * corresponding CPU instruction on ARMv5, and is instead implemented in the
- * compiler-generated machine code as a call to an __idiv helper function.
- *
- * Normally, one has to place libgcc.a in the link command used to generate
- * target binaries (shared libraries and executables) after all objects and
- * static libraries, but before dependent shared libraries, i.e. something
- * like:
- * gcc <options> -o libfoo.so foo.a libgcc.a -lc -lm
- *
- * This ensures that any helper function needed by the code in foo.a is copied
- * into the final libfoo.so. However, doing so will link a bunch of other __cxa
- * functions from libgcc.a into each .so and executable, causing 4k+ increase
- * in every binary. Therefore the Android platform build system has been
- * using this instead:
- *
- * gcc <options> -o libfoo.so foo.a -lc -lm libgcc.a
- *
- * The problem with this is that if one helper function needed by foo.a has
- * already been copied into libc.so or libm.so, then nothing will be copied
- * into libfoo.so. Instead, a symbol import definition will be added to it
- * so libfoo.so can directly call the one in libc.so at runtime.
- *
- * When refreshing toolchains for new versions or using different architecture
- * flags, the set of helper functions copied to libc.so may change, which
- * resulted in some native shared libraries generated with the NDK or prebuilts
- * from vendors to fail to load properly.
- *
- * The NDK has been fixed after 1.6_r1 to use the correct link command, so
- * any native shared library generated with it should now be safe from that
- * problem. On the other hand, existing shared libraries distributed with
- * applications that were generated with a previous version of the NDK
- * still need all 1.5/1.6 helper functions in libc.so and libm.so
- *
- * After 3.2, the toolchain was updated again, adding __aeabi_f2uiz to the
- * list of requirements. Technically, this is due to mis-linked NDK libraries
- * but it is easier to add a single function here than asking several app
- * developers to fix their build.
- *
- * The __aeabi_idiv function is added to the list since cortex-a15 supports
- * HW idiv instructions so the system libc.so doesn't pull in the reference to
- * __aeabi_idiv but legacy libraries built against cortex-a9 targets still need
- * it.
- *
- * Final note: some of the functions below should really be in libm.so to
- * completely reflect the state of 1.5/1.6 system images. However,
- * since libm.so depends on libc.so, it's easier to put all of
- * these in libc.so instead, since the dynamic linker will always
- * search in libc.so before libm.so for dependencies.
- */
+/* Generated by genlibgcc_compat.py */
#define COMPAT_FUNCTIONS_LIST \
- XX(__adddf3) \
- XX(__addsf3) \
- XX(__aeabi_cdcmpeq) \
- XX(__aeabi_cdcmple) \
- XX(__aeabi_cdrcmple) \
- XX(__aeabi_d2f) \
- XX(__aeabi_d2iz) \
- XX(__aeabi_dadd) \
- XX(__aeabi_dcmpeq) \
- XX(__aeabi_dcmpge) \
- XX(__aeabi_dcmpgt) \
- XX(__aeabi_dcmple) \
- XX(__aeabi_dcmplt) \
- XX(__aeabi_dcmpun) \
- XX(__aeabi_ddiv) \
- XX(__aeabi_dmul) \
- XX(__aeabi_drsub) \
- XX(__aeabi_dsub) \
- XX(__aeabi_f2d) \
- XX(__aeabi_f2iz) \
- XX(__aeabi_f2uiz) \
- XX(__aeabi_fadd) \
- XX(__aeabi_fcmpun) \
- XX(__aeabi_fdiv) \
- XX(__aeabi_fmul) \
- XX(__aeabi_frsub) \
- XX(__aeabi_fsub) \
- XX(__aeabi_i2d) \
- XX(__aeabi_i2f) \
- XX(__aeabi_idiv) \
- XX(__aeabi_idivmod) \
- XX(__aeabi_l2d) \
- XX(__aeabi_l2f) \
- XX(__aeabi_lasr) \
- XX(__aeabi_ldivmod) \
- XX(__aeabi_llsl) \
- XX(__aeabi_llsr) \
- XX(__aeabi_lmul) \
- XX(__aeabi_ui2d) \
- XX(__aeabi_ui2f) \
- XX(__aeabi_uidiv) \
- XX(__aeabi_uidivmod) \
- XX(__aeabi_ul2d) \
- XX(__aeabi_ul2f) \
- XX(__aeabi_uldivmod) \
- XX(__cmpdf2) \
- XX(__divdf3) \
- XX(__divsf3) \
- XX(__eqdf2) \
- XX(__extendsfdf2) \
- XX(__fixdfsi) \
- XX(__fixsfsi) \
- XX(__floatdidf) \
- XX(__floatdisf) \
- XX(__floatsidf) \
- XX(__floatsisf) \
- XX(__floatundidf) \
- XX(__floatundisf) \
- XX(__floatunsidf) \
- XX(__floatunsisf) \
- XX(__gedf2) \
- XX(__gtdf2) \
- XX(__ledf2) \
- XX(__ltdf2) \
- XX(__muldf3) \
- XX(__muldi3) \
- XX(__mulsf3) \
- XX(__nedf2) \
- XX(__popcountsi2) \
- XX(__popcount_tab) \
- XX(__subdf3) \
- XX(__subsf3) \
- XX(__truncdfsf2) \
- XX(__unorddf2) \
- XX(__unordsf2) \
+ XX(__adddf3) \
+ XX(__addsf3) \
+ XX(__aeabi_cdcmpeq) \
+ XX(__aeabi_cdcmple) \
+ XX(__aeabi_cdrcmple) \
+ XX(__aeabi_d2f) \
+ XX(__aeabi_d2iz) \
+ XX(__aeabi_dadd) \
+ XX(__aeabi_dcmpeq) \
+ XX(__aeabi_dcmpge) \
+ XX(__aeabi_dcmpgt) \
+ XX(__aeabi_dcmple) \
+ XX(__aeabi_dcmplt) \
+ XX(__aeabi_dcmpun) \
+ XX(__aeabi_ddiv) \
+ XX(__aeabi_dmul) \
+ XX(__aeabi_drsub) \
+ XX(__aeabi_dsub) \
+ XX(__aeabi_f2d) \
+ XX(__aeabi_f2iz) \
+ XX(__aeabi_f2uiz) \
+ XX(__aeabi_fadd) \
+ XX(__aeabi_fcmpun) \
+ XX(__aeabi_fdiv) \
+ XX(__aeabi_fmul) \
+ XX(__aeabi_frsub) \
+ XX(__aeabi_fsub) \
+ XX(__aeabi_i2d) \
+ XX(__aeabi_i2f) \
+ XX(__aeabi_idiv) \
+ XX(__aeabi_idivmod) \
+ XX(__aeabi_l2d) \
+ XX(__aeabi_l2f) \
+ XX(__aeabi_lasr) \
+ XX(__aeabi_ldivmod) \
+ XX(__aeabi_llsl) \
+ XX(__aeabi_llsr) \
+ XX(__aeabi_lmul) \
+ XX(__aeabi_ui2d) \
+ XX(__aeabi_ui2f) \
+ XX(__aeabi_uidiv) \
+ XX(__aeabi_uidivmod) \
+ XX(__aeabi_ul2d) \
+ XX(__aeabi_ul2f) \
+ XX(__aeabi_uldivmod) \
+ XX(__aeabi_unwind_cpp_pr0) \
+ XX(__aeabi_unwind_cpp_pr1) \
+ XX(__cmpdf2) \
+ XX(__divdf3) \
+ XX(__divsf3) \
+ XX(__eqdf2) \
+ XX(__extendsfdf2) \
+ XX(__fixdfsi) \
+ XX(__fixsfsi) \
+ XX(__floatdidf) \
+ XX(__floatdisf) \
+ XX(__floatsidf) \
+ XX(__floatsisf) \
+ XX(__floatundidf) \
+ XX(__floatundisf) \
+ XX(__floatunsidf) \
+ XX(__floatunsisf) \
+ XX(__gedf2) \
+ XX(__gtdf2) \
+ XX(__ledf2) \
+ XX(__ltdf2) \
+ XX(__muldf3) \
+ XX(__muldi3) \
+ XX(__mulsf3) \
+ XX(__nedf2) \
+ XX(__popcount_tab) \
+ XX(__popcountsi2) \
+ XX(__subdf3) \
+ XX(__subsf3) \
+ XX(__truncdfsf2) \
+ XX(__unorddf2) \
+ XX(__unordsf2) \
+
#define XX(f) extern void f(void);
COMPAT_FUNCTIONS_LIST
#undef XX
-void __bionic_libgcc_compat_hooks(void)
-{
+void __bionic_libgcc_compat_hooks(void) {
#define XX(f) f();
COMPAT_FUNCTIONS_LIST
#undef XX
index 0dc3af0cabbafe4448957e1fcfa10d39686dac29..70a2a58ce3a4dbb45b56de2e4e90e56e91df7506 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef HAVE_32_BYTE_CACHE_LINE
index afbb1b047b4568c7bd782e8a85d6c5533f17e9dc..3f2f2f12dfe8dc0d40a4e24f321d38807f55c509 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
/*
* Optimized memcmp16() for ARM9.
index f25b3e3565a0073d1082a4e5132aba17f1a330df..2c9b10c1efcabb359f6eab06a12eb44216464964 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#if defined(__ARM_NEON__) && !defined(ARCH_ARM_USE_NON_NEON_MEMCPY)
index 2ba1ff51d705584a7e9eeaa51f78fd6015443c37..259701d677bda07b2efb6928e9d6cd3dc5b803a4 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
/* This implementation requires ARM state. */
index 65b93fdec68ccfd5fd85c674caf7aad7c910aa4c..ed59d07f13af94d149e9dd7e9422d44e6d5b697c 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
#include <machine/cpu-features.h>
.cfi_rel_offset r14, 4
mov r0, #0x00000000
- bl PIC_SYM(_C_LABEL(sigblock), PLT)
+ bl PIC_SYM(sigblock, PLT)
mov r1, r0
ldmfd sp!, {r0, r14}
.cfi_adjust_cfa_offset 4
mov r0, r2
- bl PIC_SYM(_C_LABEL(sigsetmask), PLT)
+ bl PIC_SYM(sigsetmask, PLT)
add sp, sp, #4 /* unalign the stack */
.cfi_adjust_cfa_offset -4
- ldmfd sp!, {r0, r1, r14}
+ ldmfd sp!, {r0, r1, r14}
.cfi_def_cfa_offset 0
#ifdef __ARM_HAVE_VFP
/* validation failed, die die die. */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(longjmp)
index 12311e586cc1e1f8c4d51ea012a5e558b087bf9a..7016f500c3f7ec41ef9c599568fc41b07cccf1bb 100644 (file)
#define _ALIGN_TEXT .align 0
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
ENTRY(sigsetjmp)
teq r1, #0
- beq PIC_SYM(_C_LABEL(_setjmp), PLT)
- b PIC_SYM(_C_LABEL(setjmp), PLT)
+ beq PIC_SYM(_setjmp, PLT)
+ b PIC_SYM(setjmp, PLT)
END(sigsetjmp)
.L_setjmp_magic:
ldr r2, .L_setjmp_magic
ldr r3, [r0]
teq r2, r3
- beq PIC_SYM(_C_LABEL(_longjmp), PLT)
- b PIC_SYM(_C_LABEL(longjmp), PLT)
+ beq PIC_SYM(_longjmp, PLT)
+ b PIC_SYM(longjmp, PLT)
END(siglongjmp)
index 42d41d1432cbe5601e27fea3f53c4d330df3ded4..6dba942d04fe8795f08727b083bb9fd29feb9569 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.text
diff --git a/libc/arch-arm/cortex-a15/bionic/__strcat_chk.S b/libc/arch-arm/cortex-a15/bionic/__strcat_chk.S
index dc86150d590df4d301a613638a27efcf1892ab2e..36da2d9d84392322c6e77519fcd9e89a6b1e643d 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
diff --git a/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S b/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S
index 95aaf4f56b065f5f84b6a5b30b0db3ede5d65e4d..c3e3e14fad6fe4e43aac302ca61b7055516a3375 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
index badc93bf11235ca0815e66d910709ed96d862feb..da4f3dd7914fad5421759d3eb468b0feb573439b 100644 (file)
// Prototype: void *memcpy (void *dst, const void *src, size_t count).
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.text
.syntax unified
index 4e6d322d606cc608d4df7ee8222789f5d1e4a642..12c68d6a99174529de7733389089c59b76df426c 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* Optimized memset() for ARM.
index 72d4e9eb045440b740695d46d2e92a2460854d30..b95be940e04305aee67a917e27a5d49ce9212631 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 0cccf06c9b8d2edced063aba4631035b57e53098..12da1158dc0a7c32449fbbc8a1b6eb637b466efd 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef __ARMEB__
#define S2LOMEM lsl
index 577354034b1f4c279d3d8fc031efdd4258271170..cb878c44fa3bfa88d87511d3fdd67a639e922ef1 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 08f6d193bbac9dc3e8298d5ba342bcd06464d11a..9a0ce62a9da1f80fc0ae176f473a2397b48e03fb 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
diff --git a/libc/arch-arm/cortex-a9/bionic/__strcat_chk.S b/libc/arch-arm/cortex-a9/bionic/__strcat_chk.S
index 7009168227fd112296ee691a855d4afedcc74201..651aefc7d4214111951b0d5eef797622ccf12f02 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
.fpu neon
diff --git a/libc/arch-arm/cortex-a9/bionic/__strcpy_chk.S b/libc/arch-arm/cortex-a9/bionic/__strcpy_chk.S
index 908eec4c0f6ee2ee52706a32a65e675525d25736..2447780249ea8d8c3ba660f230d61422fa559a77 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
.fpu neon
index 72c1a668ccc7f8d283757baf74d76daf4b662d87..8dcd937fc0d0e9cc142448e326125af4bdfd36ad 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index 7f77dad42f3d059445059e49d0f6c7f700ac7882..a5057eb04c4443e969f5614839803b7d066bc740 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index 0f5baef4c0d11b0cec7e82eadb4885e5e91c4620..f5a855e399dd9b7a519e78e7bade1c6594b2a318 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index eacdb89049cd9424d1dfb14ab8a0274f5e0b7cad..2411c654c03c8d2cbfc8c2af8b155f9d3fc927a3 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef __ARMEB__
#define S2LOMEM lsl
index 9aa4f883ded960e3aa8b4c412202c3498312adef..9e9610bf34b54eb0a2d3b55553365aa1ecf4b7cb 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 259eda0c4dcc1527fa0fa353554cbd2459ac1ece..b92b043525cf04a5aaf5a02866773457d9d72719 100644 (file)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.syntax unified
index 699b88d7c8dc6f535c8a1d4d52759c193abe9c5f..cd4a13d128a0ec5691ed11b77d399d75aff209d1 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* Optimized memcpy() for ARM.
index baeb519662cbb158bf7e1267eaa7469c99d702ca..be35de9ff760ad00553de4324bbd43fd060e117a 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* Optimized memset() for ARM.
index 42d41d1432cbe5601e27fea3f53c4d330df3ded4..6dba942d04fe8795f08727b083bb9fd29feb9569 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
.text
index cc997f448cf8306268fde8459797b6be1ddafd5a..802a62da897d6f58c9be79d5c05959cb68685a5d 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(strcpy)
pld [r1, #0]
index f16baf882f94a92920a63e96985759abcb336b61..7954f05f1b1b4a9069a346e347e107a5fd001a2d 100644 (file)
#ifndef _ARM32_ASM_H_
#define _ARM32_ASM_H_
-#ifdef __ELF__
-# define _C_LABEL(x) x
-#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
-#endif
-#define _ASM_LABEL(x) x
-
-#ifdef __STDC__
-# define __CONCAT(x,y) x ## y
-# define __STRING(x) #x
-#else
-# define __CONCAT(x,y) x/**/y
-# define __STRING(x) "x"
-#endif
-
#ifndef _ALIGN_TEXT
# define _ALIGN_TEXT .align 0
#endif
-/*
- * gas/arm uses @ as a single comment character and thus cannot be used here
- * Instead it recognised the # instead of an @ symbols in .type directives
- * We define a couple of macros so that assembly code will not be dependant
- * on one or the other.
- */
-#define _ASM_TYPE_FUNCTION #function
-#define _ASM_TYPE_OBJECT #object
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: .fnstart; .cfi_startproc;
-
-#define _ASM_SIZE(x) .size x, .-x;
-
-#define _END(x) \
- .fnend; .cfi_endproc; \
- _ASM_SIZE(x)
-
-#ifdef GPROF
-# ifdef __ELF__
-# define _PROF_PROLOGUE \
- mov ip, lr; bl __mcount
-# else
-# define _PROF_PROLOGUE \
- mov ip,lr; bl mcount
-# endif
-#else
-# define _PROF_PROLOGUE
-#endif
-
-#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
-#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
-#define END(y) _END(_C_LABEL(y))
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
-#define ASEND(y) _END(_ASM_LABEL(y))
-
-#ifdef __ELF__
-#define ENTRY_PRIVATE(y) ENTRY(y); .hidden _C_LABEL(y)
-#else
-#define ENTRY_PRIVATE(y) ENTRY(y)
-#endif
+#undef __bionic_asm_custom_entry
+#undef __bionic_asm_custom_end
+#define __bionic_asm_custom_entry(f) .fnstart
+#define __bionic_asm_custom_end(f) .fnend
-#define ASMSTR .asciz
+#undef __bionic_asm_function_type
+#define __bionic_asm_function_type #function
#if defined(__ELF__) && defined(PIC)
-#ifdef __STDC__
-#define PIC_SYM(x,y) x ## ( ## y ## )
+#define PIC_SYM(x,y) x ## ( ## y ## )
#else
-#define PIC_SYM(x,y) x/**/(/**/y/**/)
+#define PIC_SYM(x,y) x
#endif
-#else
-#define PIC_SYM(x,y) x
-#endif
-
-#ifdef __ELF__
-#define RCSID(x) .section ".ident"; .asciz x
-#else
-#define RCSID(x) .text; .asciz x
-#endif
-
-#ifdef __ELF__
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-#endif
-
-#ifdef __STDC__
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg ## ,30,0,0,0 ; \
- .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
-#elif defined(__ELF__)
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(sym),1,0,0,0
-#else
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(_/**/sym),1,0,0,0
-#endif /* __STDC__ */
#endif /* !_ARM_ASM_H_ */
index a5d06f3f826763d5e5561d6f35b5e333a7480db0..34becdbbf2f2b33d06dcacf3589eaa644c645bd6 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
index 95aaf4f56b065f5f84b6a5b30b0db3ede5d65e4d..c3e3e14fad6fe4e43aac302ca61b7055516a3375 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
.syntax unified
index 54405fa9dfb18d8ff3a30b4958334cf9d875018c..0b7b27659b32e930b4cb1c0931f0bb1ec8def734 100644 (file)
/* Assumes neon instructions and a cache line size of 32 bytes. */
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index 1563327c448551bbd3591231f64f0d264fae1bc4..5d1943b729a951fe08ff3dceb41ba0bc61d8ccdc 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
-#include "private/libc_events.h"
+#include <private/bionic_asm.h>
+#include <private/libc_events.h>
/*
* This code assumes it is running on a processor that supports all arm v7
index f735fb5e70b608577fec5276cde4bca0a1a255d0..eacb82a6eacbd5417633f55ad41027617d754bb7 100644 (file)
*/
#include <machine/cpu-features.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#ifdef __ARMEB__
#define S2LOMEM lsl
index 4b47c6d170996a213ad5be97b83ac205f45f3082..a6459491707252734a51b0d1f696022ec34de600 100644 (file)
--- a/libc/arch-arm64/arm64.mk
+++ b/libc/arch-arm64/arm64.mk
arch-arm64/bionic/syscall.S \
arch-arm64/bionic/vfork.S \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_arm64 :=
-libc_arch_dynamic_src_files_arm64 :=
-
-##########################################
-# crt-related
libc_crt_target_cflags_arm64 := \
-I$(LOCAL_PATH)/arch-arm64/include
index 3cd4ceb165a3e2e5dae705d5973f66310649609b..d495b6affd5f4db58aced53c1eed9f12b9d24091 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(__get_sp)
mov x0, sp
index d176ea39ff5dcc8175343b09f37366bc4767feca..8fb6f0c2859869a6199ce2a7e963409e7cbdc846 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY_PRIVATE(__rt_sigreturn)
mov x8, __NR_rt_sigreturn
index ea70a526b059c24a36bbfa1976c829439c93cbb8..dfa861b1960487775733d6311a47796b63c30bcf 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
/* validation failed, die die die */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(_longjmp)
index b1ec0a8aa78047c16a7edc6060823a02dc2dde0d..9a68d8646936388630b9e301acd85a6988ccb22b 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
stp x0, x30, [sp, #-16]!
mov x0, xzr
- bl PIC_SYM(_C_LABEL(sigblock), PLT)
+ bl PIC_SYM(sigblock, PLT)
mov w1, w0
ldp x0, x30, [sp], #16
/* validation failed, die die die */
botch:
- bl PIC_SYM(_C_LABEL(longjmperror), PLT)
- bl PIC_SYM(_C_LABEL(abort), PLT)
+ bl PIC_SYM(longjmperror, PLT)
+ bl PIC_SYM(abort, PLT)
b . - 8 /* Cannot get here */
END(longjmp)
index 3afceabffab30938439f6a0a676b78872e09490c..4fdb3679dd022d76a829b874c49b066f9f103a88 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/setjmp.h>
/*
*/
ENTRY(sigsetjmp)
- cbz w1, PIC_SYM(_C_LABEL(_setjmp), PLT)
- b PIC_SYM(_C_LABEL(setjmp), PLT)
+ cbz w1, PIC_SYM(_setjmp, PLT)
+ b PIC_SYM(setjmp, PLT)
END(sigsetjmp)
.L_setjmp_magic:
ldr w2, .L_setjmp_magic
ldr w3, [x0]
cmp w2, w3
- b.eq PIC_SYM(_C_LABEL(_longjmp), PLT)
- b PIC_SYM(_C_LABEL(longjmp), PLT)
+ b.eq PIC_SYM(_longjmp, PLT)
+ b PIC_SYM(longjmp, PLT)
END(siglongjmp)
index 3f8b908c69e08d006c9e95130e37395811f25573..4bfabaf95ee5c926ccb0b68c95b65fcd91151f45 100644 (file)
#ifndef _AARCH64_ASM_H_
#define _AARCH64_ASM_H_
-/* TODO: Add cfi directives for creating/restoring FP */
-#ifdef __ELF__
-# define _C_LABEL(x) x
-#else
-# ifdef __STDC__
-# define _C_LABEL(x) _ ## x
-# else
-# define _C_LABEL(x) _/**/x
-# endif
-#endif
-#define _ASM_LABEL(x) x
-
-#ifdef __STDC__
-# define __CONCAT(x,y) x ## y
-# define __STRING(x) #x
-#else
-# define __CONCAT(x,y) x/**/y
-# define __STRING(x) "x"
-#endif
-
#ifndef _ALIGN_TEXT
-# define _ALIGN_TEXT .align 0
+# define _ALIGN_TEXT .align 0
#endif
-#define _ASM_TYPE_FUNCTION %function
-#define _ASM_TYPE_OBJECT %object
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: .cfi_startproc
-
-#define _ASM_SIZE(x) .size x, .-x;
-
-#define _END(x) \
- .cfi_endproc; \
- _ASM_SIZE(x)
-
-#define ENTRY(y) _ENTRY(_C_LABEL(y));
-#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
-#define END(y) _END(_C_LABEL(y))
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
-#define ASEND(y) _END(_ASM_LABEL(y))
-
-#ifdef __ELF__
-#define ENTRY_PRIVATE(y) ENTRY(y); .hidden _C_LABEL(y)
-#else
-#define ENTRY_PRIVATE(y) ENTRY(y)
-#endif
-
-#define ASMSTR .asciz
+#undef __bionic_asm_function_type
+#define __bionic_asm_function_type %function
#if defined(__ELF__) && defined(PIC)
-#ifdef __STDC__
-#define PIC_SYM(x,y) x ## ( ## y ## )
-#else
-#define PIC_SYM(x,y) x/**/(/**/y/**/)
-#endif
-#else
-#define PIC_SYM(x,y) x
-#endif
-
-#ifdef __ELF__
-#define RCSID(x) .section ".ident"; .asciz x
+#define PIC_SYM(x,y) x ## ( ## y ## )
#else
-#define RCSID(x) .text; .asciz x
+#define PIC_SYM(x,y) x
#endif
-#ifdef __ELF__
-#define WEAK_ALIAS(alias,sym) \
- .weak alias; \
- alias = sym
-#endif
-
-#ifdef __STDC__
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg ## ,30,0,0,0 ; \
- .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
-#elif defined(__ELF__)
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(sym),1,0,0,0
-#else
-#define WARN_REFERENCES(sym,msg) \
- .stabs msg,30,0,0,0 ; \
- .stabs __STRING(_/**/sym),1,0,0,0
-#endif /* __STDC__ */
-
#endif /* _AARCH64_ASM_H_ */
-
index 98055cc87d2ca670451266bb002940dcac66e503..918edf059f3b9eeed940e078a9ade45129f6757e 100644 (file)
ret
END(__brk)
-.hidden _C_LABEL(__brk)
+.hidden __brk
index d512c7ce8b3fc462487672591a5f4167de32f9af..b487360921b92773cf8f37ff9f7e9cbfe6a499b6 100644 (file)
ret
END(__epoll_pwait)
-.hidden _C_LABEL(__epoll_pwait)
+.hidden __epoll_pwait
index 50cd45a5c91c0491e1978bec73590822609240b9..5e97928c939b588ee2db79129469947a3eb83518 100644 (file)
ret
END(__exit)
-.hidden _C_LABEL(__exit)
+.hidden __exit
index 698e8ff2584dd91163e9b91888a5500b5a16b7b3..a312188c855517178e32b00db368b23760acf5da 100644 (file)
ret
END(__getcpu)
-.hidden _C_LABEL(__getcpu)
+.hidden __getcpu
index f0543f01063324e31e0bb14d9469880a0f89b824..4b27a9ce9a8dce752244eed4e4ec065009284a88 100644 (file)
ret
END(__getcwd)
-.hidden _C_LABEL(__getcwd)
+.hidden __getcwd
index f7fd1b8a5785fd588c42e845f06ba0c6c6b00818..3ccd104d31df2c8eb903b3468bb4c851bb42c37c 100644 (file)
ret
END(__getpriority)
-.hidden _C_LABEL(__getpriority)
+.hidden __getpriority
index 2569fdfab11135d3659a6b5728d18fbccbe11f18..68d89bc333447a7aeb182d0d07b83bd1659582d6 100644 (file)
ret
END(__ioctl)
-.hidden _C_LABEL(__ioctl)
+.hidden __ioctl
index cca66ce299a36103654928effb07de2d53d7ad64..a49eaff124ce3beb50036ca3c9351aada4237632 100644 (file)
ret
END(__openat)
-.hidden _C_LABEL(__openat)
+.hidden __openat
index 68efc09f029544811376443a3fb8f1d09cd097cf..370e7689a94d85a39456d2b9c3e89d042cc8ef30 100644 (file)
ret
END(__ppoll)
-.hidden _C_LABEL(__ppoll)
+.hidden __ppoll
index 295b71a50f7f0b25e24b2e561421aa0b7ba631d4..193e19f6d9a657b2255e2f5579e6f5076fa01a8c 100644 (file)
ret
END(__pselect6)
-.hidden _C_LABEL(__pselect6)
+.hidden __pselect6
index aa4107185789b8ad46e2b6378e78b8fbef41e151..ee63cb0f9def2c89d6a4ffb054041f423fcdeafa 100644 (file)
ret
END(__ptrace)
-.hidden _C_LABEL(__ptrace)
+.hidden __ptrace
index 9680bdc99da16e4f2cbae24abd2b6a50701621f4..10b33ad186b89c557015a0674945c3dcca58bd39 100644 (file)
ret
END(__reboot)
-.hidden _C_LABEL(__reboot)
+.hidden __reboot
index 77f83eae270d7f90d69dc98f3a686a0d703cfaae..cea09414934ddaecb64a1fc9267d082e07f466f4 100644 (file)
ret
END(__rt_sigaction)
-.hidden _C_LABEL(__rt_sigaction)
+.hidden __rt_sigaction
diff --git a/libc/arch-arm64/syscalls/__rt_sigpending.S b/libc/arch-arm64/syscalls/__rt_sigpending.S
index 59a2e1e1ae1e266dc7f0c6c803dedd385ba8e711..97db3b984df9d6b935ffe66f50e1486b1a6c7a27 100644 (file)
ret
END(__rt_sigpending)
-.hidden _C_LABEL(__rt_sigpending)
+.hidden __rt_sigpending
diff --git a/libc/arch-arm64/syscalls/__rt_sigprocmask.S b/libc/arch-arm64/syscalls/__rt_sigprocmask.S
index c5a51ede396b96b288cd708814d0019a4c1c9fcc..97dabe10db6bf70bdf645c52a6414c1dc2cb0617 100644 (file)
ret
END(__rt_sigprocmask)
-.hidden _C_LABEL(__rt_sigprocmask)
+.hidden __rt_sigprocmask
diff --git a/libc/arch-arm64/syscalls/__rt_sigsuspend.S b/libc/arch-arm64/syscalls/__rt_sigsuspend.S
index 7a1c22e7b3c2879cccf25a2398943e56cb70c2d3..d8eaa3e53b50f815f1a0059d4b531fcc68307ddc 100644 (file)
ret
END(__rt_sigsuspend)
-.hidden _C_LABEL(__rt_sigsuspend)
+.hidden __rt_sigsuspend
diff --git a/libc/arch-arm64/syscalls/__rt_sigtimedwait.S b/libc/arch-arm64/syscalls/__rt_sigtimedwait.S
index b3d950c8cf848a9d30e2c04347813bb610fdf112..95f031a88aaec8d49b39b8a37d38d4d7cbdd89af 100644 (file)
ret
END(__rt_sigtimedwait)
-.hidden _C_LABEL(__rt_sigtimedwait)
+.hidden __rt_sigtimedwait
diff --git a/libc/arch-arm64/syscalls/__sched_getaffinity.S b/libc/arch-arm64/syscalls/__sched_getaffinity.S
index 9b785adcb3a28b4510c0f282b63bdbb545dcb323..58715d0fd573c3dce2f8fe0f929289db4e561979 100644 (file)
ret
END(__sched_getaffinity)
-.hidden _C_LABEL(__sched_getaffinity)
+.hidden __sched_getaffinity
diff --git a/libc/arch-arm64/syscalls/__set_tid_address.S b/libc/arch-arm64/syscalls/__set_tid_address.S
index b7541fcc9d78b7bf37999c25c028abad9f0a0564..3cc452cbc3fabd637c9e7622eec1b28acf2d361c 100644 (file)
ret
END(__set_tid_address)
-.hidden _C_LABEL(__set_tid_address)
+.hidden __set_tid_address
index 625a7eb4900dad5ed4c87b567936502b317a8da8..2e1fb1dcc5ee09d220f3eb03609eeb49354d3b15 100644 (file)
ret
END(__syslog)
-.hidden _C_LABEL(__syslog)
+.hidden __syslog
index bfce448fc4ebdc6e26a1b31f8c6f886ef8c8dcdc..b551048bf2790bfc528735ff4ba694d6e23c19ea 100644 (file)
ret
END(__timer_create)
-.hidden _C_LABEL(__timer_create)
+.hidden __timer_create
index 03ed44e2859da4bb38db8b14cddb0a0196e8a0e9..2aff54085dc88d7e4601ca3ec31ac44f3d5cbde3 100644 (file)
ret
END(__timer_delete)
-.hidden _C_LABEL(__timer_delete)
+.hidden __timer_delete
diff --git a/libc/arch-arm64/syscalls/__timer_getoverrun.S b/libc/arch-arm64/syscalls/__timer_getoverrun.S
index a458941398264b71a727f4d8246a5d57e561398a..b11e35620f5ab10747ead57c492b51e9e80a1819 100644 (file)
ret
END(__timer_getoverrun)
-.hidden _C_LABEL(__timer_getoverrun)
+.hidden __timer_getoverrun
diff --git a/libc/arch-arm64/syscalls/__timer_gettime.S b/libc/arch-arm64/syscalls/__timer_gettime.S
index b6ae29e44175fb08d1c3cc129110a0ca5558e5ad..c7c4d09bb7a06b35142c1e48af6ef217ccfb8051 100644 (file)
ret
END(__timer_gettime)
-.hidden _C_LABEL(__timer_gettime)
+.hidden __timer_gettime
diff --git a/libc/arch-arm64/syscalls/__timer_settime.S b/libc/arch-arm64/syscalls/__timer_settime.S
index 3c44b531822e720df5aa30aee072a0e0dcac9759..4f5f5fcf923beaebd83d2833097217c2791cae6c 100644 (file)
ret
END(__timer_settime)
-.hidden _C_LABEL(__timer_settime)
+.hidden __timer_settime
index 42440184c7769584ef220be5ff540c5760a01cb1..66e986a83b5beb17e0b767244e04721b25446b16 100644 (file)
ret
END(__waitid)
-.hidden _C_LABEL(__waitid)
+.hidden __waitid
index 8970b6ec7fa7f57a83c31cd0e0a8da261bffd545..92731347d7736a85153bb1866b855f33c37fccf6 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#include <linux/errno.h>
#include <linux/sched.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);
- .text
- .type __bionic_clone, @function
- .global __bionic_clone
- .align 4
- .ent __bionic_clone
-__bionic_clone:
+ENTRY(__bionic_clone)
.set noreorder
- .cpload $t9
+ .cpload t9
.set reorder
# set up child stack
- subu $a1,16
- lw $t0,20($sp) # fn
- lw $t1,24($sp) # arg
- sw $t0,0($a1) # fn
- sw $t1,4($a1) # arg
+ subu a1,16
+ lw t0,20(sp) # fn
+ lw t1,24(sp) # arg
+ sw t0,0(a1) # fn
+ sw t1,4(a1) # arg
# remainder of arguments are correct for clone system call
- li $v0,__NR_clone
+ li v0,__NR_clone
syscall
- bnez $a3,.L__error_bc
+ bnez a3,.L__error_bc
- beqz $v0,.L__thread_start_bc
+ beqz v0,.L__thread_start_bc
- j $ra
+ j ra
.L__thread_start_bc:
- lw $a0,0($sp) # fn
- lw $a1,4($sp) # arg
+ lw a0,0(sp) # fn
+ lw a1,4(sp) # arg
# void __bionic_clone_entry(int (*func)(void*), void *arg)
- la $t9,__bionic_clone_entry
- j $t9
+ la t9,__bionic_clone_entry
+ j t9
.L__error_bc:
- move $a0,$v0
- la $t9,__set_errno
- j $t9
-
- .end __bionic_clone
+ move a0,v0
+ la t9,__set_errno
+ j t9
+END(__bionic_clone)
index 834c89d82874c19e704d8dbd0df3dc222336b98e..d4b278b240163b5fb0f94e31879d352d9b879d75 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/* void *__get_sp(void) */
+#include <private/bionic_asm.h>
- .type __get_sp, @function
- .global __get_sp
- .align 4
- .ent __get_sp
-__get_sp:
- move $v0, $sp
- j $ra
- .end __get_sp
+// void* __get_sp()
+ENTRY(__get_sp)
+ move v0, sp
+ j ra
+END(__get_sp)
diff --git a/libc/arch-mips/bionic/_exit_with_stack_teardown.S b/libc/arch-mips/bionic/_exit_with_stack_teardown.S
index 8f624c3245b275f49f88a31a6755a2b0c2a5cede..129e3f9a308683304b61ce8531d50c80ff06c31b 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
-
- .text
+#include <private/bionic_asm.h>
// void _exit_with_stack_teardown(void* stackBase, size_t stackSize)
-
- .type _exit_with_stack_teardown, @function
- .global _exit_with_stack_teardown
- .align 4
- .ent _exit_with_stack_teardown
-_exit_with_stack_teardown:
- li $v0, __NR_munmap
+ENTRY(_exit_with_stack_teardown)
+ li v0, __NR_munmap
syscall
// If munmap failed, we ignore the failure and exit anyway.
- li $a0, 0
- li $v0, __NR_exit
+ li a0, 0
+ li v0, __NR_exit
syscall
// The exit syscall does not return.
- .end _exit_with_stack_teardown
+END(_exit_with_stack_teardown)
index e7083ae290d17c0366132254a211499cbb7d22a9..4465cd20ece003e828dda7d0ec12cc6fd239cbd5 100644 (file)
/*
* Copyright (c) 2002 Opsycon AB (www.opsycon.se / www.opsycon.com)
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/signal.h>
swc1 FPR, OFF(BASE) ; \
mfhc1 t0, FPR ; \
sw t0, OFF+4(BASE) ;
-
+
#define FPREG64_L(FPR, OFF, BASE) \
lw t0, OFF+4(BASE) ; \
lw t1, OFF(BASE) ; \
mtc1 t1, FPR ; \
mthc1 t0, FPR ; \
-
+
LEAF(_setjmp, FRAMESZ)
PTR_SUBU sp, FRAMESZ
SETUP_GP64(GPOFF, _setjmp)
RESTORE_GP64
PTR_ADDU sp, FRAMESZ
END(_longjmp)
-
index 67393455a7f7c640fe880d67e7274a330e3ba8c8..6e5d2947f012342d77967f0088c21706feb5b9fb 100644 (file)
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
- .text
-/*
- * void bzero(void *s, size_t n);
- */
- .type bzero, @function
- .global bzero
- .align 4
- .ent bzero
- .set noreorder
-bzero:
- .cpload $t9
- move $a2,$a1
- la $t9,memset
- j $t9
- move $a1,$zero
- .end bzero
+#include <private/bionic_asm.h>
+// void bzero(void*, size_t);
+ENTRY(bzero)
+ .set noreorder
+ .cpload t9
+ move a2,a1
+ la t9,memset
+ j t9
+ move a1,zero
+END(bzero)
index 5247b79e108e9b8447508135627cef3af1ff5e16..7626a7ca1580cad6f19a72a675d46453e4d1ddc7 100644 (file)
#define FUTEX_WAKE 1
// int __futex_wait(volatile void* ftx, int val, const struct timespec* timeout)
- .type __futex_wait, @function
- .global __futex_wait
- .align 4
- .ent __futex_wait
-__futex_wait:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
- move $a3,$a2 /* timespec */
- move $a2,$a1 /* val */
- li $a1,FUTEX_WAIT /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_wait)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+ move a3,a2 /* timespec */
+ move a2,a1 /* val */
+ li a1,FUTEX_WAIT /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_wait
+ addu sp,4*6
+ j ra
+END(__futex_wait)
// int __futex_wake(volatile void* ftx, int count)
- .type __futex_wake, @function
- .globl __futex_wake
- .align 4
- .ent __futex_wake
-__futex_wake:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
- move $a3,$0 /* timespec */
- move $a2,$a1 /* val */
- li $a1,FUTEX_WAKE /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_wake)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+ move a3,$0 /* timespec */
+ move a2,a1 /* val */
+ li a1,FUTEX_WAKE /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_wake
+ addu sp,4*6
+ j ra
+END(__futex_wake)
// int __futex_syscall3(volatile void* ftx, int op, int count)
- .type __futex_syscall3, @function
- .global __futex_syscall3
- .align 4
- .ent __futex_syscall3
-__futex_syscall3:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
- move $a3,$0 /* timespec */
-# move $a2,$a2 /* val */
-# li $a1,$a1 /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_syscall3)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+ move a3,$0 /* timespec */
+# move a2,a2 /* val */
+# li a1,a1 /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_syscall3
+ addu sp,4*6
+ j ra
+END(__futex_syscall3)
// int __futex_syscall4(volatile void* ftx, int op, int val, const struct timespec* timeout)
- .type __futex_syscall4, @function
- .global __futex_syscall4
- .align 4
- .ent __futex_syscall4
-__futex_syscall4:
- subu $sp,4*6
- sw $0,20($sp) /* val3 */
- sw $0,16($sp) /* addr2 */
-# move $a3,$a3 /* timespec */
-# move $a2,$a2 /* val */
-# li $a1,$a1 /* op */
-# move $a0,$a0 /* ftx */
- li $v0,__NR_futex
+ENTRY(__futex_syscall4)
+ subu sp,4*6
+ sw $0,20(sp) /* val3 */
+ sw $0,16(sp) /* addr2 */
+# move a3,a3 /* timespec */
+# move a2,a2 /* val */
+# li a1,a1 /* op */
+# move a0,a0 /* ftx */
+ li v0,__NR_futex
syscall
.set noreorder
- bnez $a3, 1f /* Check for error */
- neg $v0 /* Negate error number if it's valid */
- move $v0,$0 /* Otherwise return 0 */
+ bnez a3, 1f /* Check for error */
+ neg v0 /* Negate error number if it's valid */
+ move v0,$0 /* Otherwise return 0 */
1:
.set reorder
- addu $sp,4*6
- j $ra
- .end __futex_syscall4
+ addu sp,4*6
+ j ra
+END(__futex_syscall4)
index a2b2544398843bc3ec3c3f6a41469418f05f0b44..f9d14a93aab31e6058f7d71031623c98c911f8d3 100644 (file)
* 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)
index 7c21195b6be8e5f8a46853dadf09fe0dfe4d98e8..2af1fbdce39b84a6222c1056448979513af56519 100644 (file)
*
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/signal.h>
swc1 FPR, OFF(BASE) ; \
mfhc1 t0, FPR ; \
sw t0, OFF+4(BASE) ;
-
+
#define FPREG64_L(FPR, OFF, BASE) \
lw t0, OFF+4(BASE) ; \
lw t1, OFF(BASE) ; \
mtc1 t1, FPR ; \
mthc1 t0, FPR ; \
-
+
NON_LEAF(setjmp, FRAMESZ, ra)
.mask 0x80000000, RAOFF
PTR_SUBU sp, FRAMESZ # allocate stack frame
lw a0, A0OFF(sp)
lw a1, A1OFF(sp)
- .set noreorder
+ .set noreorder
REG_L v0, SC_REGS+ZERO*REGSZ(a0)
bne v0, 0xACEDBADE, botch # jump if error
REG_L ra, SC_PC(a0)
REG_L s8, SC_REGS+S8*REGSZ(a0)
REG_L gp, SC_REGS+GP*REGSZ(a0)
REG_L sp, SC_REGS+SP*REGSZ(a0)
-
+
#if !defined(SOFTFLOAT)
- REG_L v0, SC_FPREGS+((FSR-F0)*REGSZ)(a0)
+ REG_L v0, SC_FPREGS+((FSR-F0)*REGSZ)(a0)
ctc1 v0, $31
#if _MIPS_FPSET == 32
FPREG64_L($f20, SC_FPREGS+((F20-F0)*REGSZ_FP), a0)
index b05454c284393f1e0678fe3d2dbd43310efd2ba8..9d2e5ea87e885cbee7d8bee23f28649b55579b1d 100644 (file)
* SUCH DAMAGE.
*/
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
#include <machine/regnum.h>
#include <machine/setjmp.h>
index af5bcc9ab1fdb671d5c4779b12892057c0ee46dd..db477a506bb809b7664486090287e946ed27967d 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
- .text
- .globl syscall
- .align 4
- .ent syscall
+#include <private/bionic_asm.h>
/*
* The caller is only required to allocate 16 bytes of stack for a0-a3.
*/
#define STACKSIZE 2*4
-syscall:
+ENTRY(syscall)
.set noreorder
- .cpload $t9
- move $v0, $a0
- move $a0, $a1
- move $a1, $a2
- move $a2, $a3
- lw $a3, 16($sp)
- lw $t0, 20($sp)
- lw $t1, 24($sp)
- subu $sp, STACKSIZE
- sw $t0, 16($sp)
- sw $t1, 20($sp)
+ .cpload t9
+ move v0, a0
+ move a0, a1
+ move a1, a2
+ move a2, a3
+ lw a3, 16(sp)
+ lw t0, 20(sp)
+ lw t1, 24(sp)
+ subu sp, STACKSIZE
+ sw t0, 16(sp)
+ sw t1, 20(sp)
syscall
- addu $sp, STACKSIZE
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ addu sp, STACKSIZE
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end syscall
+END(syscall)
index 414caaf4efe64fd502c1ad716865fa87bdd86e69..96de69e20d8c73fb884ee34f66553510807695f2 100644 (file)
* SUCH DAMAGE.
*/
-#include <asm/unistd.h>
+#include <private/bionic_asm.h>
#include <linux/sched.h>
// TODO: mips' uapi signal.h is missing #ifndef __ASSEMBLY__.
// #include <asm/signal.h>
#define SIGCHLD 18
- .text
-
- .type vfork, @function
- .global vfork
- .align 4
- .ent vfork
-vfork:
+ENTRY(vfork)
.set noreorder
- .cpload $t9
+ .cpload t9
- li $a0, (CLONE_VM | CLONE_VFORK | SIGCHLD)
- li $a1, 0
- li $a2, 0
- li $a3, 0
- subu $sp, 8
- sw $0, 16($sp)
- li $v0, __NR_clone
+ li a0, (CLONE_VM | CLONE_VFORK | SIGCHLD)
+ li a1, 0
+ li a2, 0
+ li a3, 0
+ subu sp, 8
+ sw $0, 16(sp)
+ li v0, __NR_clone
syscall
- addu $sp, 8
- bnez $a3, 1f
- move $a0, $v0
+ addu sp, 8
+ bnez a3, 1f
+ move a0, v0
- j $ra
+ j ra
nop
1:
- la $t9, __set_errno
- j $t9
+ la t9, __set_errno
+ j t9
nop
- .end vfork
+END(vfork)
index 43dbc09a8f5b06dc378df740b33afab7ccc5a055..5eacde3df6e5967e43cf3494925b9aef4e309207 100644 (file)
#ifndef _MIPS64_ASM_H
#define _MIPS64_ASM_H
-#include <machine/regdef.h>
-
-#ifdef NEED_OLD_RM7KFIX
-#define ITLBNOPFIX nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;
-#else
-#define ITLBNOPFIX nop;nop;nop;nop
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 4
#endif
+#undef __bionic_asm_custom_entry
+#undef __bionic_asm_custom_end
+#define __bionic_asm_custom_entry(f) .ent f
+#define __bionic_asm_custom_end(f) .end f
+
+#include <machine/regdef.h>
+
#define _MIPS_ISA_MIPS1 1 /* R2000/R3000 */
#define _MIPS_ISA_MIPS2 2 /* R4000/R6000 */
#define _MIPS_ISA_MIPS3 3 /* R4000 */
#define _MIPS_ISA_MIPS4 4 /* TFP (R1x000) */
-#ifdef __linux__
#define _MIPS_ISA_MIPS5 5
#define _MIPS_ISA_MIPS32 6
#define _MIPS_ISA_MIPS64 7
-#else
-#define _MIPS_ISA_MIPS32 32 /* MIPS32 */
-#endif
#if !defined(ABICALLS) && !defined(_NO_ABICALLS)
#define ABICALLS .abicalls
ABICALLS
#endif
-#define _C_LABEL(x) x /* XXX Obsolete but keep for a while */
-
#if !defined(__MIPSEL__) && !defined(__MIPSEB__)
#error "__MIPSEL__ or __MIPSEB__ must be defined"
#endif
*/
#if defined(ABICALLS) && !defined(_KERNEL) && !defined(_STANDALONE)
-#ifndef _MIPS_SIM
-#define _MIPS_SIM 1
-#define _ABIO32 1
-#endif
-#ifndef _MIPS_ISA
-#define _MIPS_ISA 2
-#define _MIPS_ISA_MIPS2 2
-#endif
-
#if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABI32)
#define NARGSAVE 4
#define CF_RA_OFFS 20 /* Call ra save offset */
#endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4)
+#if (_MIPS_ISA == _MIPS_ISA_MIPS3 || _MIPS_ISA == _MIPS_ISA_MIPS4 || _MIPS_ISA == _MIPS_ISA_MIPS64)
#define REGSZ 8 /* 64 bit mode register size */
#define LOGREGSZ 3 /* log rsize */
#define REG_S sd
#define PTR_VAL .dword
#endif
-/*
- * Define -pg profile entry code.
- */
-#if defined(XGPROF) || defined(XPROF)
-#define MCOUNT \
- PTR_SUBU sp, sp, 32; \
- SAVE_GP(16); \
- sw ra, 28(sp); \
- sw gp, 24(sp); \
- .set noat; \
- .set noreorder; \
- move AT, ra; \
- jal _mcount; \
- PTR_SUBU sp, sp, 8; \
- lw ra, 28(sp); \
- PTR_ADDU sp, sp, 32; \
- .set reorder; \
- .set at;
-#else
-#define MCOUNT
-#endif
-
/*
* LEAF(x, fsize)
*
.globl x; \
.ent x, 0; \
x: ; \
+ .cfi_startproc; \
.frame sp, fsize, ra; \
SETUP_GP \
- MCOUNT
-
-#define ALEAF(x) \
- .globl x; \
-x:
-
-/*
- * NLEAF(x)
- *
- * Declare a non-profiled leaf routine.
- */
-#define NLEAF(x, fsize) \
- .align 3; \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, ra; \
- SETUP_GP
/*
* NON_LEAF(x)
.globl x; \
.ent x, 0; \
x: ; \
+ .cfi_startproc; \
.frame sp, fsize, retpc; \
SETUP_GP \
- MCOUNT
-
-/*
- * NNON_LEAF(x)
- *
- * Declare a non-profiled non-leaf routine
- * (a routine that makes other C calls).
- */
-#define NNON_LEAF(x, fsize, retpc) \
- .align 3; \
- .globl x; \
- .ent x, 0; \
-x: ; \
- .frame sp, fsize, retpc \
- SETUP_GP
-
-/*
- * END(x)
- *
- * Mark end of a procedure.
- */
-#define END(x) \
- .end x
-
-/*
- * Macros to panic and printf from assembly language.
- */
-#define PANIC(msg) \
- LA a0, 9f; \
- jal panic; \
- nop ; \
- MSG(msg)
-
-#define PRINTF(msg) \
- la a0, 9f; \
- jal printf; \
- nop ; \
- MSG(msg)
-
-#define MSG(msg) \
- .rdata; \
-9: .asciiz msg; \
- .text
-
-#define ASMSTR(str) \
- .asciiz str; \
- .align 3
#endif /* !_MIPS_ASM_H */
index f02ec0d2260e21a7a9cf0d94b0eb9ca368d1a6e2..b31715ccee437cd59a2c449c96d9325c1c995285 100644 (file)
#ifndef _MIPS_SIGNAL_H_
#define _MIPS_SIGNAL_H_
-#include <machine/asm.h>
-
#define SC_REGMASK (0*REGSZ)
#define SC_STATUS (1*REGSZ)
#define SC_PC (2*REGSZ)
diff --git a/libc/arch-mips/mips.mk b/libc/arch-mips/mips.mk
index 4e007e50cc1865377a1f4f801bc07e0ca9b239de..0fa1ed6ebed8532b3311225dec3bd125f5bd5cd9 100644 (file)
--- a/libc/arch-mips/mips.mk
+++ b/libc/arch-mips/mips.mk
bionic/__strcat_chk.cpp \
-# cflags
ifneq ($(ARCH_MIPS_HAS_FPU),true)
libc_common_cflags_mips := \
-DSOFTFLOAT
endif
-libc_common_cflags_mips += \
- -fstrict-aliasing
##########################################
### CPU specific source files
arch-mips/string/memset.S \
arch-mips/string/mips_strlen.c \
-# These are used by the static and dynamic versions of the libc
-# respectively.
-libc_arch_static_src_files_mips :=
-libc_arch_dynamic_src_files_mips :=
-
-
-##########################################
-# crt-related
libc_crt_target_cflags_mips := \
$($(my_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS) \
-I$(LOCAL_PATH)/arch-mips/include
index aabdfcfdce6e95d768636c22572856fcab1f9d8c..dc91096bd52ee7bb027110fdde904400285e8b3b 100644 (file)
* Include files
************************************************************************/
-#include "machine/asm.h"
+#include <private/bionic_asm.h>
-/*
+/*
* This routine could be optimized for MIPS64. The current code only
* uses MIPS32 instructions.
- */
+ */
#if defined(__MIPSEB__)
# define LWHI lwl /* high part is left in big-endian */
# define SWHI swl /* high part is left in big-endian */
index a1c5055c4c111aa073973b66802ef02917897251..3e630caf88f5d50b7cb30e8df20a2b9b5b1e92b3 100644 (file)
* Include files
************************************************************************/
-#include "machine/asm.h"
+#include <private/bionic_asm.h>
-/*
+/*
* This routine could be optimized for MIPS64. The current code only
* uses MIPS32 instructions.
- */
+ */
#if defined(__MIPSEB__)
# define SWHI swl /* high part is left in big-endian */
sw a1,-36(a0)
nop
nop # the extra nop instructions help to balance
- nop # cycles needed for "store" + "fill" + "evict"
+ nop # cycles needed for "store" + "fill" + "evict"
nop # For 64byte store there are needed 8 fill
nop # and 8 evict cycles, i.e. at least 32 instr.
nop
/************************************************************************
* Implementation : Static functions
************************************************************************/
-
index 87e13bd54da68f15a7103422ec0a2b1c10e4a062..9325c26088569772668bd0185e27de75d822a8f3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __brk
- .align 4
- .ent __brk
+#include <private/bionic_asm.h>
-__brk:
+ENTRY(__brk)
.set noreorder
- .cpload $t9
- li $v0, __NR_brk
+ .cpload t9
+ li v0, __NR_brk
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __brk
+END(__brk)
index 0a5fdae1e5f4c16874fb5d478e7fbd11da90a41f..a417cdd6be86d7aa852648fbf0798f596cbab809 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __epoll_pwait
- .align 4
- .ent __epoll_pwait
+#include <private/bionic_asm.h>
-__epoll_pwait:
+ENTRY(__epoll_pwait)
.set noreorder
- .cpload $t9
- li $v0, __NR_epoll_pwait
+ .cpload t9
+ li v0, __NR_epoll_pwait
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __epoll_pwait
+END(__epoll_pwait)
index 529e49c0bd21c1d77761a32164f85f23bb3c0004..1515b41da4be942241e08e93f67870b58a74fdf2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __exit
- .align 4
- .ent __exit
+#include <private/bionic_asm.h>
-__exit:
+ENTRY(__exit)
.set noreorder
- .cpload $t9
- li $v0, __NR_exit
+ .cpload t9
+ li v0, __NR_exit
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __exit
+END(__exit)
index 39ed4cf0d0e15db7d54d5709e5a2070231c2c7d8..b9815a1f0ee2c2688f870bdb4f2c1fff5ed252b0 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __fcntl64
- .align 4
- .ent __fcntl64
+#include <private/bionic_asm.h>
-__fcntl64:
+ENTRY(__fcntl64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fcntl64
+ .cpload t9
+ li v0, __NR_fcntl64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __fcntl64
+END(__fcntl64)
index 3389a8d32f681bd1f4dc708ab70449e685e7290e..8774a530cbca8a99cfed12331b84d0682e6c1323 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __fstatfs64
- .align 4
- .ent __fstatfs64
+#include <private/bionic_asm.h>
-__fstatfs64:
+ENTRY(__fstatfs64)
.set noreorder
- .cpload $t9
- li $v0, __NR_fstatfs64
+ .cpload t9
+ li v0, __NR_fstatfs64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __fstatfs64
+END(__fstatfs64)
index d29bd6250eb3e23dc097bda89538cb89bde685a7..2352e017400b5f4a7c77aa0438b08b90bf22a2c2 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __getcpu
- .align 4
- .ent __getcpu
+#include <private/bionic_asm.h>
-__getcpu:
+ENTRY(__getcpu)
.set noreorder
- .cpload $t9
- li $v0, __NR_getcpu
+ .cpload t9
+ li v0, __NR_getcpu
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __getcpu
+END(__getcpu)
index ce05d92e2c0baa1a021ba15e9d40ce0ea1e50ffa..e844f9a7da2d77b46f12ab718b93f7f4f257d406 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __getcwd
- .align 4
- .ent __getcwd
+#include <private/bionic_asm.h>
-__getcwd:
+ENTRY(__getcwd)
.set noreorder
- .cpload $t9
- li $v0, __NR_getcwd
+ .cpload t9
+ li v0, __NR_getcwd
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __getcwd
+END(__getcwd)
index 767b6d05bc0ef408d166052a40732c4f1d3b6b69..882386b12c763edaae04b7d2a8a911718f81c2e9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __getpriority
- .align 4
- .ent __getpriority
+#include <private/bionic_asm.h>
-__getpriority:
+ENTRY(__getpriority)
.set noreorder
- .cpload $t9
- li $v0, __NR_getpriority
+ .cpload t9
+ li v0, __NR_getpriority
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __getpriority
+END(__getpriority)
index 3d83c6092f3bc097ec9050d30eb709dad1f4859a..ddf532325d5e5909eb98426c3cf1779ef4ebdbbb 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __ioctl
- .align 4
- .ent __ioctl
+#include <private/bionic_asm.h>
-__ioctl:
+ENTRY(__ioctl)
.set noreorder
- .cpload $t9
- li $v0, __NR_ioctl
+ .cpload t9
+ li v0, __NR_ioctl
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __ioctl
+END(__ioctl)
index 9a3753ba8d639aa0b53ba883a6f8b2486c184b66..10819f7a31df473b1f26aaa9841602300665827c 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __llseek
- .align 4
- .ent __llseek
+#include <private/bionic_asm.h>
-__llseek:
+ENTRY(__llseek)
.set noreorder
- .cpload $t9
- li $v0, __NR__llseek
+ .cpload t9
+ li v0, __NR__llseek
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __llseek
+END(__llseek)
index 723e80ef8e8d8b93890a490436ae8c8e91a8e592..53728178fc36ab95ffbbde1f76ad5486075cff68 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __mmap2
- .align 4
- .ent __mmap2
+#include <private/bionic_asm.h>
-__mmap2:
+ENTRY(__mmap2)
.set noreorder
- .cpload $t9
- li $v0, __NR_mmap2
+ .cpload t9
+ li v0, __NR_mmap2
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __mmap2
+END(__mmap2)
index e55e71d6a84593cb7469aef4e397bd54ec6b9634..f833dd878c9f37c2d6048dc73fc3acd7a7b53ee8 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __openat
- .align 4
- .ent __openat
+#include <private/bionic_asm.h>
-__openat:
+ENTRY(__openat)
.set noreorder
- .cpload $t9
- li $v0, __NR_openat
+ .cpload t9
+ li v0, __NR_openat
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __openat
+END(__openat)
index ef6d3438026b897f1f66f8353d28954b43ece594..a5711d9af45615afa359d50530d2b94734900958 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __ppoll
- .align 4
- .ent __ppoll
+#include <private/bionic_asm.h>
-__ppoll:
+ENTRY(__ppoll)
.set noreorder
- .cpload $t9
- li $v0, __NR_ppoll
+ .cpload t9
+ li v0, __NR_ppoll
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __ppoll
+END(__ppoll)
index 26af92a103d637f54fd583f9b24451f6eae6086c..4c0a0a53eca7ea5999a518e9fe7f65cbcf5c7cd3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __pselect6
- .align 4
- .ent __pselect6
+#include <private/bionic_asm.h>
-__pselect6:
+ENTRY(__pselect6)
.set noreorder
- .cpload $t9
- li $v0, __NR_pselect6
+ .cpload t9
+ li v0, __NR_pselect6
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __pselect6
+END(__pselect6)
index f2ea8c79bc5513a9aee46e5350e7fc4296c82497..fcbe5293f78d444a7813e1df2fd89afd0cbb27e6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __ptrace
- .align 4
- .ent __ptrace
+#include <private/bionic_asm.h>
-__ptrace:
+ENTRY(__ptrace)
.set noreorder
- .cpload $t9
- li $v0, __NR_ptrace
+ .cpload t9
+ li v0, __NR_ptrace
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __ptrace
+END(__ptrace)
index 95ba5d8893e0d6c107aa01365ece33a81f800fa3..4aa0e7a76a10e7218e4055d0bad2b447db06dbd9 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __reboot
- .align 4
- .ent __reboot
+#include <private/bionic_asm.h>
-__reboot:
+ENTRY(__reboot)
.set noreorder
- .cpload $t9
- li $v0, __NR_reboot
+ .cpload t9
+ li v0, __NR_reboot
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __reboot
+END(__reboot)
index 73253d612b82ae47ef206770c2bc08a3f85dea4f..6c5bc37f21393ee548ce607623329bef535238c1 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigaction
- .align 4
- .ent __rt_sigaction
+#include <private/bionic_asm.h>
-__rt_sigaction:
+ENTRY(__rt_sigaction)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigaction
+ .cpload t9
+ li v0, __NR_rt_sigaction
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigaction
+END(__rt_sigaction)
index 90357b3f626b767718bb086aecaa847314764ed3..e62f0795440f13918d9b7fba4e0794eec692a2cc 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigpending
- .align 4
- .ent __rt_sigpending
+#include <private/bionic_asm.h>
-__rt_sigpending:
+ENTRY(__rt_sigpending)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigpending
+ .cpload t9
+ li v0, __NR_rt_sigpending
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigpending
+END(__rt_sigpending)
diff --git a/libc/arch-mips/syscalls/__rt_sigprocmask.S b/libc/arch-mips/syscalls/__rt_sigprocmask.S
index 0d34e3775b80ff392cf414ad7f6cd36805881e7d..94ef493fbab3c84a36af14241c2c2f0b41809e3a 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigprocmask
- .align 4
- .ent __rt_sigprocmask
+#include <private/bionic_asm.h>
-__rt_sigprocmask:
+ENTRY(__rt_sigprocmask)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigprocmask
+ .cpload t9
+ li v0, __NR_rt_sigprocmask
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigprocmask
+END(__rt_sigprocmask)
index 3ff47234744783b3849ccc5498dd8a88f98c6876..077746f7a61e6937a5652d26be778e86da2ca96b 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigsuspend
- .align 4
- .ent __rt_sigsuspend
+#include <private/bionic_asm.h>
-__rt_sigsuspend:
+ENTRY(__rt_sigsuspend)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigsuspend
+ .cpload t9
+ li v0, __NR_rt_sigsuspend
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigsuspend
+END(__rt_sigsuspend)
diff --git a/libc/arch-mips/syscalls/__rt_sigtimedwait.S b/libc/arch-mips/syscalls/__rt_sigtimedwait.S
index 19a5ce95a701152c50a66bbe38c184411b14fe3b..404eab72bb73f24b6af7109b3f1eab7d1d243495 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __rt_sigtimedwait
- .align 4
- .ent __rt_sigtimedwait
+#include <private/bionic_asm.h>
-__rt_sigtimedwait:
+ENTRY(__rt_sigtimedwait)
.set noreorder
- .cpload $t9
- li $v0, __NR_rt_sigtimedwait
+ .cpload t9
+ li v0, __NR_rt_sigtimedwait
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __rt_sigtimedwait
+END(__rt_sigtimedwait)
diff --git a/libc/arch-mips/syscalls/__sched_getaffinity.S b/libc/arch-mips/syscalls/__sched_getaffinity.S
index 0038ff9d62b3989d8378114a53f8d8306e670e78..da7170954fbc36793c12fa0b81629ae6248ff339 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __sched_getaffinity
- .align 4
- .ent __sched_getaffinity
+#include <private/bionic_asm.h>
-__sched_getaffinity:
+ENTRY(__sched_getaffinity)
.set noreorder
- .cpload $t9
- li $v0, __NR_sched_getaffinity
+ .cpload t9
+ li v0, __NR_sched_getaffinity
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __sched_getaffinity
+END(__sched_getaffinity)
diff --git a/libc/arch-mips/syscalls/__set_thread_area.S b/libc/arch-mips/syscalls/__set_thread_area.S
index 69383e9813d49563e681e9567a9b7b37beb97586..f83249efc8bc6b92ecf29c6bebdf35691d080fe6 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __set_thread_area
- .align 4
- .ent __set_thread_area
+#include <private/bionic_asm.h>
-__set_thread_area:
+ENTRY(__set_thread_area)
.set noreorder
- .cpload $t9
- li $v0, __NR_set_thread_area
+ .cpload t9
+ li v0, __NR_set_thread_area
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __set_thread_area
+END(__set_thread_area)
diff --git a/libc/arch-mips/syscalls/__set_tid_address.S b/libc/arch-mips/syscalls/__set_tid_address.S
index 4fcc82a5e1c2ed479f851f89a3c45d687701104b..146cd0d80f5293150b760591b210ca4ce5f472b3 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __set_tid_address
- .align 4
- .ent __set_tid_address
+#include <private/bionic_asm.h>
-__set_tid_address:
+ENTRY(__set_tid_address)
.set noreorder
- .cpload $t9
- li $v0, __NR_set_tid_address
+ .cpload t9
+ li v0, __NR_set_tid_address
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __set_tid_address
+END(__set_tid_address)
index cc53ab41716301238cde97df414eb74d5f65a080..03dd9da0c09e19396a4ecfa71abf9d6b38ff6abf 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __sigaction
- .align 4
- .ent __sigaction
+#include <private/bionic_asm.h>
-__sigaction:
+ENTRY(__sigaction)
.set noreorder
- .cpload $t9
- li $v0, __NR_sigaction
+ .cpload t9
+ li v0, __NR_sigaction
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __sigaction
+END(__sigaction)
index 4b3351c65bb96c31ad0f382395be4e4705e35472..9f94e6a2830ec857cc3590938113692d0d257d53 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __statfs64
- .align 4
- .ent __statfs64
+#include <private/bionic_asm.h>
-__statfs64:
+ENTRY(__statfs64)
.set noreorder
- .cpload $t9
- li $v0, __NR_statfs64
+ .cpload t9
+ li v0, __NR_statfs64
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __statfs64
+END(__statfs64)
index 61a32423172836c3dac4486cfc5c42cd348c90ee..ace69c70197205822fa85bfa009ced6def23d04d 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __syslog
- .align 4
- .ent __syslog
+#include <private/bionic_asm.h>
-__syslog:
+ENTRY(__syslog)
.set noreorder
- .cpload $t9
- li $v0, __NR_syslog
+ .cpload t9
+ li v0, __NR_syslog
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __syslog
+END(__syslog)
index 054c1b9697c6e28a66a790759e319f5fc4565c2d..449bd28375d1056cc978be4e53e5ed99b47c8f40 100644 (file)
/* Generated by gensyscalls.py. Do not edit. */
-#include <asm/unistd.h>
- .text
- .globl __timer_create
- .align 4
- .ent __timer_create
+#include <private/bionic_asm.h>
-__timer_create:
+ENTRY(__timer_create)
.set noreorder
- .cpload $t9
- li $v0, __NR_timer_create
+ .cpload t9
+ li v0, __NR_timer_create
syscall
- bnez $a3, 1f
- move $a0, $v0
- j $ra
+ bnez a3, 1f
+ move a0, v0
+ j ra
nop
1:
- la $t9,__set_errno
- j $t9
+ la t9,__set_errno
+ j t9
nop
.set reorder
- .end __timer_create
+END(__timer_create)
index 2fa6e5018ceced3fafb418f5c4a8a65111c35962..7bc5e05980c20ec8df39c5627de0184bc71a2095 100644 (file)