auto import from //depot/cupcake/@135843
This commit is contained in:
parent
a799b53f10
commit
1767f908af
19
Android.mk
19
Android.mk
@ -1,19 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
ifneq ($(TARGET_SIMULATOR),true)
|
||||
include $(call all-subdir-makefiles)
|
||||
endif
|
573
libc/Android.mk
573
libc/Android.mk
@ -1,573 +0,0 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
|
||||
libc_common_src_files := \
|
||||
$(syscall_src) \
|
||||
unistd/abort.c \
|
||||
unistd/alarm.c \
|
||||
unistd/brk.c \
|
||||
unistd/creat.c \
|
||||
unistd/daemon.c \
|
||||
unistd/exec.c \
|
||||
unistd/fcntl.c \
|
||||
unistd/fnmatch.c \
|
||||
unistd/ftime.c \
|
||||
unistd/ftok.c \
|
||||
unistd/getcwd.c \
|
||||
unistd/getdtablesize.c \
|
||||
unistd/gethostname.c \
|
||||
unistd/getopt_long.c \
|
||||
unistd/getpgrp.c \
|
||||
unistd/getpriority.c \
|
||||
unistd/getpt.c \
|
||||
unistd/initgroups.c \
|
||||
unistd/isatty.c \
|
||||
unistd/issetugid.c \
|
||||
unistd/lseek64.c \
|
||||
unistd/mmap.c \
|
||||
unistd/nice.c \
|
||||
unistd/open.c \
|
||||
unistd/openat.c \
|
||||
unistd/opendir.c \
|
||||
unistd/pathconf.c \
|
||||
unistd/perror.c \
|
||||
unistd/popen.c \
|
||||
unistd/pread.c \
|
||||
unistd/pselect.c \
|
||||
unistd/ptsname.c \
|
||||
unistd/ptsname_r.c \
|
||||
unistd/pwrite.c \
|
||||
unistd/raise.c \
|
||||
unistd/reboot.c \
|
||||
unistd/recv.c \
|
||||
unistd/sbrk.c \
|
||||
unistd/send.c \
|
||||
unistd/setegid.c \
|
||||
unistd/seteuid.c \
|
||||
unistd/setpgrp.c \
|
||||
unistd/sigblock.c \
|
||||
unistd/siginterrupt.c \
|
||||
unistd/siglist.c \
|
||||
unistd/signal.c \
|
||||
unistd/sigsetmask.c \
|
||||
unistd/sigsuspend.c \
|
||||
unistd/sigwait.c \
|
||||
unistd/sleep.c \
|
||||
unistd/statfs.c \
|
||||
unistd/strsignal.c \
|
||||
unistd/sysconf.c \
|
||||
unistd/syslog.c \
|
||||
unistd/system.c \
|
||||
unistd/tcgetpgrp.c \
|
||||
unistd/tcsetpgrp.c \
|
||||
unistd/time.c \
|
||||
unistd/umount.c \
|
||||
unistd/unlockpt.c \
|
||||
unistd/usleep.c \
|
||||
unistd/wait.c \
|
||||
stdio/asprintf.c \
|
||||
stdio/clrerr.c \
|
||||
stdio/fclose.c \
|
||||
stdio/fdopen.c \
|
||||
stdio/feof.c \
|
||||
stdio/ferror.c \
|
||||
stdio/fflush.c \
|
||||
stdio/fgetc.c \
|
||||
stdio/fgetln.c \
|
||||
stdio/fgetpos.c \
|
||||
stdio/fgets.c \
|
||||
stdio/fileno.c \
|
||||
stdio/findfp.c \
|
||||
stdio/flags.c \
|
||||
stdio/flockfile.c \
|
||||
stdio/fopen.c \
|
||||
stdio/fprintf.c \
|
||||
stdio/fpurge.c \
|
||||
stdio/fputc.c \
|
||||
stdio/fputs.c \
|
||||
stdio/fread.c \
|
||||
stdio/freopen.c \
|
||||
stdio/fscanf.c \
|
||||
stdio/fseek.c \
|
||||
stdio/fsetpos.c \
|
||||
stdio/ftell.c \
|
||||
stdio/funopen.c \
|
||||
stdio/fvwrite.c \
|
||||
stdio/fwalk.c \
|
||||
stdio/fwrite.c \
|
||||
stdio/getc.c \
|
||||
stdio/getchar.c \
|
||||
stdio/gets.c \
|
||||
stdio/makebuf.c \
|
||||
stdio/mktemp.c \
|
||||
stdio/printf.c \
|
||||
stdio/putc.c \
|
||||
stdio/putchar.c \
|
||||
stdio/puts.c \
|
||||
stdio/putw.c \
|
||||
stdio/refill.c \
|
||||
stdio/remove.c \
|
||||
stdio/rewind.c \
|
||||
stdio/rget.c \
|
||||
stdio/scanf.c \
|
||||
stdio/setbuf.c \
|
||||
stdio/setbuffer.c \
|
||||
stdio/setvbuf.c \
|
||||
stdio/snprintf.c\
|
||||
stdio/sprintf.c \
|
||||
stdio/sscanf.c \
|
||||
stdio/stdio.c \
|
||||
stdio/tempnam.c \
|
||||
stdio/tmpfile.c \
|
||||
stdio/tmpnam.c \
|
||||
stdio/ungetc.c \
|
||||
stdio/vasprintf.c \
|
||||
stdio/vfprintf.c \
|
||||
stdio/vfscanf.c \
|
||||
stdio/vprintf.c \
|
||||
stdio/vsnprintf.c \
|
||||
stdio/vsprintf.c \
|
||||
stdio/vscanf.c \
|
||||
stdio/vsscanf.c \
|
||||
stdio/wbuf.c \
|
||||
stdio/wsetup.c \
|
||||
stdlib/_rand48.c \
|
||||
stdlib/assert.c \
|
||||
stdlib/atexit.c \
|
||||
stdlib/atoi.c \
|
||||
stdlib/atol.c \
|
||||
stdlib/atoll.c \
|
||||
stdlib/bsearch.c \
|
||||
stdlib/ctype_.c \
|
||||
stdlib/div.c \
|
||||
stdlib/exit.c \
|
||||
stdlib/getenv.c \
|
||||
stdlib/jrand48.c \
|
||||
stdlib/ldiv.c \
|
||||
stdlib/lldiv.c \
|
||||
stdlib/locale.c \
|
||||
stdlib/lrand48.c \
|
||||
stdlib/mrand48.c \
|
||||
stdlib/nrand48.c \
|
||||
stdlib/putenv.c \
|
||||
stdlib/qsort.c \
|
||||
stdlib/seed48.c \
|
||||
stdlib/setenv.c \
|
||||
stdlib/setjmperr.c \
|
||||
stdlib/srand48.c \
|
||||
stdlib/strntoimax.c \
|
||||
stdlib/strntoumax.c \
|
||||
stdlib/strtod.c \
|
||||
stdlib/strtoimax.c \
|
||||
stdlib/strtol.c \
|
||||
stdlib/strtoll.c \
|
||||
stdlib/strtoul.c \
|
||||
stdlib/strtoull.c \
|
||||
stdlib/strtoumax.c \
|
||||
stdlib/tolower_.c \
|
||||
stdlib/toupper_.c \
|
||||
stdlib/wchar.c \
|
||||
string/bcopy.c \
|
||||
string/index.c \
|
||||
string/memccpy.c \
|
||||
string/memchr.c \
|
||||
string/memmem.c \
|
||||
string/memmove.c.arm \
|
||||
string/memrchr.c \
|
||||
string/memswap.c \
|
||||
string/strcasecmp.c \
|
||||
string/strcasestr.c \
|
||||
string/strcat.c \
|
||||
string/strchr.c \
|
||||
string/strcmp.c \
|
||||
string/strcoll.c \
|
||||
string/strcpy.c \
|
||||
string/strcspn.c \
|
||||
string/strdup.c \
|
||||
string/strerror.c \
|
||||
string/strerror_r.c \
|
||||
string/strlcat.c \
|
||||
string/strlcpy.c \
|
||||
string/strncat.c \
|
||||
string/strncmp.c \
|
||||
string/strncpy.c \
|
||||
string/strndup.c \
|
||||
string/strnlen.c \
|
||||
string/strpbrk.c \
|
||||
string/strrchr.c \
|
||||
string/strsep.c \
|
||||
string/strspn.c \
|
||||
string/strstr.c \
|
||||
string/strtok.c \
|
||||
string/strtotimeval.c \
|
||||
string/strxfrm.c \
|
||||
inet/bindresvport.c \
|
||||
inet/inet_addr.c \
|
||||
inet/inet_aton.c \
|
||||
inet/inet_ntoa.c \
|
||||
inet/inet_ntop.c \
|
||||
inet/inet_pton.c \
|
||||
tzcode/asctime.c \
|
||||
tzcode/difftime.c \
|
||||
tzcode/localtime.c \
|
||||
tzcode/strftime.c \
|
||||
tzcode/strptime.c \
|
||||
bionic/__errno.c \
|
||||
bionic/__set_errno.c \
|
||||
bionic/_rand48.c \
|
||||
bionic/arc4random.c \
|
||||
bionic/basename.c \
|
||||
bionic/basename_r.c \
|
||||
bionic/dirname.c \
|
||||
bionic/dirname_r.c \
|
||||
bionic/drand48.c \
|
||||
bionic/erand48.c \
|
||||
bionic/fork.c \
|
||||
bionic/if_nametoindex.c \
|
||||
bionic/if_indextoname.c \
|
||||
bionic/ioctl.c \
|
||||
bionic/ldexp.c \
|
||||
bionic/libc_init_common.c \
|
||||
bionic/logd_write.c \
|
||||
bionic/md5.c \
|
||||
bionic/pututline.c \
|
||||
bionic/realpath.c \
|
||||
bionic/semaphore.c \
|
||||
bionic/sha1.c \
|
||||
bionic/ssp.c \
|
||||
bionic/stubs.c \
|
||||
bionic/system_properties.c \
|
||||
bionic/time64.c \
|
||||
bionic/thread_atexit.c \
|
||||
bionic/utime.c \
|
||||
bionic/utmp.c \
|
||||
netbsd/gethnamaddr.c \
|
||||
netbsd/isc/ev_timers.c \
|
||||
netbsd/isc/ev_streams.c \
|
||||
netbsd/inet/nsap_addr.c \
|
||||
netbsd/resolv/__dn_comp.c \
|
||||
netbsd/resolv/__res_close.c \
|
||||
netbsd/resolv/__res_send.c \
|
||||
netbsd/resolv/herror.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_state.c.arm \
|
||||
netbsd/resolv/res_cache.c \
|
||||
netbsd/net/nsdispatch.c \
|
||||
netbsd/net/getaddrinfo.c \
|
||||
netbsd/net/getnameinfo.c \
|
||||
netbsd/net/getservbyname.c \
|
||||
netbsd/net/getservent.c \
|
||||
netbsd/net/base64.c \
|
||||
netbsd/net/getservbyport.c \
|
||||
netbsd/nameser/ns_name.c \
|
||||
netbsd/nameser/ns_parse.c \
|
||||
netbsd/nameser/ns_ttl.c \
|
||||
netbsd/nameser/ns_netint.c \
|
||||
netbsd/nameser/ns_print.c \
|
||||
netbsd/nameser/ns_samedomain.c
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
libc_common_src_files += \
|
||||
bionic/eabi.c \
|
||||
arch-arm/bionic/__get_pc.S \
|
||||
arch-arm/bionic/__get_sp.S \
|
||||
arch-arm/bionic/_exit_with_stack_teardown.S \
|
||||
arch-arm/bionic/_setjmp.S \
|
||||
arch-arm/bionic/atomics_arm.S \
|
||||
arch-arm/bionic/clone.S \
|
||||
arch-arm/bionic/ffs.S \
|
||||
arch-arm/bionic/kill.S \
|
||||
arch-arm/bionic/tkill.S \
|
||||
arch-arm/bionic/memcmp.S \
|
||||
arch-arm/bionic/memcmp16.S \
|
||||
arch-arm/bionic/memcpy.S \
|
||||
arch-arm/bionic/memset.S \
|
||||
arch-arm/bionic/setjmp.S \
|
||||
arch-arm/bionic/sigsetjmp.S \
|
||||
arch-arm/bionic/strlen.c.arm \
|
||||
arch-arm/bionic/syscall.S \
|
||||
unistd/socketcalls.c
|
||||
|
||||
# These files need to be arm so that gdbserver
|
||||
# can set breakpoints in them without messing
|
||||
# up any thumb code.
|
||||
libc_common_src_files += \
|
||||
bionic/pthread.c.arm \
|
||||
bionic/pthread-timers.c.arm \
|
||||
bionic/ptrace.c.arm
|
||||
else # !arm
|
||||
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
libc_common_src_files += \
|
||||
arch-x86/bionic/__get_sp.S \
|
||||
arch-x86/bionic/__get_tls.c \
|
||||
arch-x86/bionic/__set_tls.c \
|
||||
arch-x86/bionic/atomics_x86.S \
|
||||
arch-x86/bionic/clone.S \
|
||||
arch-x86/bionic/_exit_with_stack_teardown.S \
|
||||
arch-x86/bionic/setjmp.S \
|
||||
arch-x86/bionic/_setjmp.S \
|
||||
arch-x86/bionic/vfork.S \
|
||||
arch-x86/string/bzero.S \
|
||||
arch-x86/string/memset.S \
|
||||
arch-x86/string/memcmp.S \
|
||||
arch-x86/string/memcpy.S \
|
||||
arch-x86/string/strlen.S \
|
||||
bionic/pthread.c \
|
||||
bionic/pthread-timers.c \
|
||||
bionic/ptrace.c
|
||||
endif # x86
|
||||
|
||||
endif # !arm
|
||||
|
||||
libc_common_cflags := \
|
||||
-DWITH_ERRLIST \
|
||||
-DANDROID_CHANGES \
|
||||
-DUSE_LOCKS \
|
||||
-DREALLOC_ZERO_BYTES_FREES \
|
||||
-D_LIBC=1 \
|
||||
-DSOFTFLOAT \
|
||||
-DFLOATING_POINT \
|
||||
-DNEED_PSELECT=1 \
|
||||
-DINET6 \
|
||||
-I$(LOCAL_PATH)/private \
|
||||
|
||||
ifeq ($(TARGET_BUILD_TYPE),debug)
|
||||
libc_common_cflags += -DDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
libc_common_cflags += -fstrict-aliasing
|
||||
endif
|
||||
|
||||
libc_common_c_includes := \
|
||||
$(LOCAL_PATH)/stdlib \
|
||||
$(LOCAL_PATH)/string \
|
||||
$(LOCAL_PATH)/stdio
|
||||
|
||||
# libc_common.a
|
||||
# ========================================================
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(libc_common_src_files)
|
||||
LOCAL_CFLAGS := $(libc_common_cflags) -DUSE_DL_PREFIX
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
|
||||
ifneq ($(TARGET_SIMULATOR),true)
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
crtend_target_cflags := -mthumb-interwork
|
||||
else
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
crtend_target_cflags := -m32
|
||||
endif
|
||||
endif
|
||||
# We rename crtend.o to crtend_android.o to avoid a
|
||||
# name clash between gcc and bionic.
|
||||
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o
|
||||
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend.S
|
||||
@mkdir -p $(dir $@)
|
||||
$(TARGET_CC) $(crtend_target_cflags) -o $@ -c $<
|
||||
ALL_GENERATED_SOURCES += $(GEN)
|
||||
endif
|
||||
|
||||
|
||||
# crtbegin_so.o/crtend_so.o
|
||||
# These are needed for building the shared libs.
|
||||
ifneq ($(TARGET_SIMULATOR),true)
|
||||
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
|
||||
crt_begin_end_so_target_cflags := -m32
|
||||
|
||||
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_so.o
|
||||
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_so.S
|
||||
@mkdir -p $(dir $@)
|
||||
$(TARGET_CC) $(crt_begin_end_so_target_cflags) -o $@ -c $<
|
||||
ALL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_so.o
|
||||
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtend_so.S
|
||||
@mkdir -p $(dir $@)
|
||||
$(TARGET_CC) $(crt_begin_end_so_target_cflags) -o $@ -c $<
|
||||
ALL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
endif # TARGET_ARCH == x86
|
||||
|
||||
endif # !TARGET_SIMULATOR
|
||||
|
||||
|
||||
LOCAL_MODULE := libc_common
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
# libc.a
|
||||
# ========================================================
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/syscalls.mk
|
||||
|
||||
# To enable malloc leak check for statically linked programs, add
|
||||
# "WITH_MALLOC_CHECK_LIBC_A := true" to device/buildspec.mk
|
||||
WITH_MALLOC_CHECK_LIBC_A := $(strip $(WITH_MALLOC_CHECK_LIBC_A))
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(libc_common_src_files) \
|
||||
bionic/dlmalloc.c \
|
||||
bionic/libc_init_static.c
|
||||
|
||||
ifeq ($(WITH_MALLOC_CHECK_LIBC_A),true)
|
||||
LOCAL_SRC_FILES += bionic/malloc_leak.c.arm
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
LOCAL_SRC_FILES += \
|
||||
arch-arm/bionic/exidx_static.c
|
||||
|
||||
else # TARGET_ARCH != arm
|
||||
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
LOCAL_SRC_FILES += \
|
||||
arch-x86/bionic/dl_iterate_phdr_static.c
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(TARGET_SIMULATOR),true)
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
crtbegin_static_target_cflags := -mthumb-interwork
|
||||
else
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
crtbegin_static_target_cflags := -m32
|
||||
endif
|
||||
endif
|
||||
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o
|
||||
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_static.S
|
||||
@mkdir -p $(dir $@)
|
||||
$(TARGET_CC) $(crtbegin_static_target_cflags) -o $@ -c $<
|
||||
ALL_GENERATED_SOURCES += $(GEN)
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
|
||||
ifeq ($(WITH_MALLOC_CHECK_LIBC_A),true)
|
||||
LOCAL_CFLAGS += -DUSE_DL_PREFIX -DMALLOC_LEAK_CHECK
|
||||
endif
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||
LOCAL_MODULE:= libc
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
# libc.so
|
||||
# ========================================================
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||
|
||||
LOCAL_CFLAGS += -DUSE_DL_PREFIX
|
||||
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
bionic/dlmalloc.c \
|
||||
bionic/malloc_leak.c.arm \
|
||||
bionic/libc_init_dynamic.c
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
LOCAL_SRC_FILES += \
|
||||
arch-arm/bionic/exidx_dynamic.c
|
||||
endif
|
||||
|
||||
LOCAL_MODULE:= libc
|
||||
|
||||
# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
|
||||
# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
|
||||
# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
|
||||
# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
|
||||
# should, instead relying on the external symbols from the dependent libraries. That would
|
||||
# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
|
||||
# you wanted!
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdl
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
|
||||
ifneq ($(TARGET_SIMULATOR),true)
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
crtbegin_dynamic_target_cflags := -mthumb-interwork
|
||||
else
|
||||
ifeq ($(TARGET_ARCH),x86)
|
||||
crtbegin_dynamic_target_cflags := -m32
|
||||
endif
|
||||
endif
|
||||
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
|
||||
$(GEN): $(LOCAL_PATH)/arch-$(TARGET_ARCH)/bionic/crtbegin_dynamic.S
|
||||
@mkdir -p $(dir $@)
|
||||
$(TARGET_CC) $(crtbegin_dynamic_target_cflags) -o $@ -c $<
|
||||
ALL_GENERATED_SOURCES += $(GEN)
|
||||
endif
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
||||
# libc_debug.so
|
||||
# ========================================================
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CFLAGS := $(libc_common_cflags)
|
||||
|
||||
LOCAL_CFLAGS += -DUSE_DL_PREFIX -DMALLOC_LEAK_CHECK
|
||||
|
||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
bionic/dlmalloc.c \
|
||||
bionic/malloc_leak.c.arm \
|
||||
bionic/libc_init_dynamic.c
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
LOCAL_SRC_FILES += \
|
||||
arch-arm/bionic/exidx_dynamic.c
|
||||
endif
|
||||
|
||||
LOCAL_MODULE:= libc_debug
|
||||
|
||||
# WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
|
||||
# make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
|
||||
# ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
|
||||
# external; if that were the case, then libc would not pull those symbols from libgcc.a as it
|
||||
# should, instead relying on the external symbols from the dependent libraries. That would
|
||||
# create an "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
|
||||
# you wanted!
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdl
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
||||
# Don't prelink
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
# Don't install on release build
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
|
||||
GEN := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o
|
||||
ALL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
# ========================================================
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
26
libc/CAVEATS
26
libc/CAVEATS
@ -1,26 +0,0 @@
|
||||
Bionic is a very small C library because we have decided to *not* implement various features
|
||||
of the POSIX standard. we only add functions on a as-needed basis, and there are a few things
|
||||
we wish we'll never put in there.
|
||||
|
||||
this file is here to document explicitely what we don't want to support in Bionic:
|
||||
|
||||
- C++ exceptions are not supported. on embedded systems, they lead to extremely larger and
|
||||
slower code for no good reason (even when so-called zero-cost exception schemes are
|
||||
implemented, they enforce very large numbers of registers spills to the stack, even
|
||||
in functions that do not throw an exception themselves).
|
||||
|
||||
- pthread cancellation is *not* supported. this seemingly simple "feature" is the source
|
||||
of much bloat and complexity in a C library. Besides, you'd better write correct
|
||||
multi-threaded code instead of relying on this stuff.
|
||||
|
||||
- pthread_once() doesn't support C++ exceptions thrown from the init function, or the init
|
||||
function doing a fork().
|
||||
|
||||
- locales and wide characters are not supported. we use ICU for all this i18n stuff, which
|
||||
is much better than the ill-designed related C libraries functions.
|
||||
|
||||
- at the moment, several user-account-related functions like getpwd are stubbed and return
|
||||
the values corresponding to root. this will be fixed when we'll be able to have distinct
|
||||
users on the Android filesystem. :-(
|
||||
|
||||
see bionic/stubs.c for the details
|
441
libc/Jamfile
441
libc/Jamfile
@ -1,441 +0,0 @@
|
||||
# This file is used to build the Bionic library with the Jam build
|
||||
# tool. For info, see www.perforce.com/jam/jam.html
|
||||
#
|
||||
|
||||
BIONIC_TOP ?= $(DOT) ;
|
||||
|
||||
DEBUG = 1 ;
|
||||
|
||||
# pattern used for automatic heade inclusion detection
|
||||
HDRPATTERN = "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
|
||||
|
||||
|
||||
# debugging support, simply define the DEBUG variable to activate verbose output
|
||||
rule Debug
|
||||
{
|
||||
if $(DEBUG) {
|
||||
Echo $(1) ;
|
||||
}
|
||||
}
|
||||
|
||||
# return all elements from $(1) that are not in $(2)
|
||||
rule Filter list : filter
|
||||
{
|
||||
local result = ;
|
||||
local item ;
|
||||
for item in $(list) {
|
||||
if ! $(item) in $(filter) {
|
||||
result += $(item) ;
|
||||
}
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
# reverse a list of elements
|
||||
rule Reverse list
|
||||
{
|
||||
local result = ;
|
||||
local item ;
|
||||
|
||||
for item in $(list) {
|
||||
result = $(item) $(result) ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
# decompose a path into a list of elements
|
||||
rule PathDecompose dir
|
||||
{
|
||||
local result ;
|
||||
|
||||
while $(dir:D)
|
||||
{
|
||||
if ! $(dir:BS) { # for rooted paths like "/foo"
|
||||
break ;
|
||||
}
|
||||
result = $(dir:BS) $(result) ;
|
||||
dir = $(dir:D) ;
|
||||
}
|
||||
result = $(dir) $(result) ;
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
# simply a file path, i.e. get rid of . or .. when possible
|
||||
rule _PathSimplify dir
|
||||
{
|
||||
local result = ;
|
||||
local dir2 d ;
|
||||
|
||||
dir = [ PathDecompose $(dir) ] ;
|
||||
|
||||
# get rid of any single dot
|
||||
dir2 = ;
|
||||
for d in $(dir) {
|
||||
if $(d) = "." {
|
||||
continue ;
|
||||
}
|
||||
dir2 += $(d) ;
|
||||
}
|
||||
|
||||
# get rid of .. when possible
|
||||
for d in $(dir2) {
|
||||
if $(d) = ".." && $(result) {
|
||||
result = $(result[2-]) ;
|
||||
}
|
||||
else
|
||||
result = $(d) $(result) ;
|
||||
}
|
||||
|
||||
# now invert the result
|
||||
result = [ Reverse $(result) ] ;
|
||||
if ! $(result) {
|
||||
result = "." ;
|
||||
}
|
||||
return $(result:J="/") ;
|
||||
}
|
||||
|
||||
|
||||
rule PathSimplify dirs
|
||||
{
|
||||
local result ;
|
||||
local d ;
|
||||
for d in $(dirs) {
|
||||
result += [ _PathSimplify $(d) ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
# retrieve list of subdirectories
|
||||
rule ListSubDirs paths
|
||||
{
|
||||
local result = ;
|
||||
local entry ;
|
||||
for entry in [ Glob $(paths) : * ] {
|
||||
if ! $(entry:S) {
|
||||
result += $(entry) ;
|
||||
}
|
||||
}
|
||||
return [ PathSimplify $(result) ] ;
|
||||
}
|
||||
|
||||
|
||||
# retrieve list of sources in a given directory
|
||||
rule ListSources path
|
||||
{
|
||||
return [ Glob $(path) : *.S *.c ] ;
|
||||
}
|
||||
|
||||
|
||||
# find the prebuilt directory
|
||||
#
|
||||
if ! $(TOP) {
|
||||
Echo "Please define TOP as the root of your device build tree" ;
|
||||
Exit ;
|
||||
}
|
||||
|
||||
Debug "OS is" $(OS) ;
|
||||
Debug "CPU is" $(CPU) ;
|
||||
|
||||
if $(OS) = LINUX
|
||||
{
|
||||
PREBUILT = $(TOP)/prebuilt/Linux ;
|
||||
}
|
||||
else if $(OS) = MACOSX
|
||||
{
|
||||
switch $(CPU) {
|
||||
case i386 : PREBUILT = $(TOP)/prebuilt/darwin-x86 ; break ;
|
||||
case ppc : PREBUILT = $(TOP)/prebuilt/darwin-ppc ; break ;
|
||||
case * : Echo "unsupported CPU" "$(CPU) !!" ;
|
||||
Echo "Please contact digit@google.com for help" ;
|
||||
Exit ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Echo "Unsupported operating system" $(OS) ;
|
||||
Echo "Please contact digit@google.com for help" ;
|
||||
Exit ;
|
||||
}
|
||||
|
||||
Debug "TOP is" $(TOP) ;
|
||||
Debug "PREBUILT is" $(PREBUILT) ;
|
||||
|
||||
|
||||
# check architectures and setup toolchain variables
|
||||
#
|
||||
SUPPORTED_ARCHS = x86 arm ;
|
||||
|
||||
ARCH ?= $(SUPPORTED_ARCHS) ;
|
||||
|
||||
if ! $(ARCH) in $(SUPPORTED_ARCHS) {
|
||||
Echo "The variable ARCH contains an unsupported value, use one or more of these instead" ;
|
||||
Echo "separated by spaces:" $(SUPPORTED_ARCHS) ;
|
||||
Exit ;
|
||||
}
|
||||
|
||||
x86_TOOLSET_PREFIX ?= "" ;
|
||||
arm_TOOLSET_PREFIX ?= $(TOP)/prebuilt/Linux/toolchain-4.1.1/bin/arm-elf- ;
|
||||
|
||||
for arch in $(ARCH) {
|
||||
CC_$(arch) = $($(arch)_TOOLSET_PREFIX)gcc ;
|
||||
C++_$(arch) = $($(arch)_TOOLSET_PREFIX)g++ ;
|
||||
AR_$(arch) = $($(arch)_TOOLSET_PREFIX)ar ;
|
||||
}
|
||||
|
||||
|
||||
# the list of arch-independent source subdirectories
|
||||
BIONIC_SRC_SUBDIRS = string ;
|
||||
BIONIC_x86_SUBDIRS = ;
|
||||
BIONIC_arm_SUBDIRS = ;
|
||||
|
||||
CFLAGS = -O0 -g -W ;
|
||||
|
||||
|
||||
|
||||
# find sources in a given list of subdirectories
|
||||
rule FindSources dirs
|
||||
{
|
||||
local dir ;
|
||||
|
||||
for dir in $(dirs)
|
||||
{
|
||||
local LOCAL_SRC NO_LOCAL_SRC ;
|
||||
|
||||
if [ Glob $(dir) : rules.jam ] {
|
||||
include $(dir)/rules.jam ;
|
||||
if $(LOCAL_SRC) {
|
||||
_sources = $(LOCAL_SRC) ;
|
||||
}
|
||||
else {
|
||||
_sources = [ Glob $(dir) : *.S *.c ] ;
|
||||
_sources = $(_sources:BS) ;
|
||||
}
|
||||
if $(NO_LOCAL_SRC) {
|
||||
_sources = [ Filter $(_sources) : $(NO_LOCAL_SRC) ] ;
|
||||
}
|
||||
sources += $(dir)/$(_sources) ;
|
||||
}
|
||||
else
|
||||
sources += [ ListSources $(dir) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
# Compile a given object file from a source
|
||||
rule Compile object : source
|
||||
{
|
||||
Depends $(object) : $(source) ;
|
||||
Depends bionic : $(object) ;
|
||||
Clean clean : $(object) ;
|
||||
|
||||
MakeLocate $(object) : $(OUT) ;
|
||||
|
||||
|
||||
CC on $(object) = $(CC_$(arch)) ;
|
||||
CFLAGS on $(object) = $(CFLAGS) ;
|
||||
INCLUDES on $(object) = $(INCLUDES) ;
|
||||
DEFINES on $(object) = $(DEFINES) ;
|
||||
|
||||
HDRRULE on $(>) = HdrRule ;
|
||||
HDRSCAN on $(>) = $(HDRPATTERN) ;
|
||||
HDRSEARCH on $(>) = $(INCLUDES) ;
|
||||
HDRGRIST on $(>) = $(HDRGRIST) ;
|
||||
}
|
||||
|
||||
|
||||
actions Compile
|
||||
{
|
||||
$(CC) -c -o $(1) $(CFLAGS) -I$(INCLUDES) -D$(DEFINES) $(2)
|
||||
}
|
||||
|
||||
|
||||
rule RmTemps
|
||||
{
|
||||
Temporary $(2) ;
|
||||
}
|
||||
|
||||
actions quietly updated piecemeal together RmTemps
|
||||
{
|
||||
rm -f $(2)
|
||||
}
|
||||
|
||||
actions Archive
|
||||
{
|
||||
$(AR) ru $(1) $(2)
|
||||
}
|
||||
|
||||
rule Library library : objects
|
||||
{
|
||||
local obj ;
|
||||
|
||||
if ! $(library:S) {
|
||||
library = $(library:S=.a) ;
|
||||
}
|
||||
library = $(library:G=<$(arch)>) ;
|
||||
|
||||
Depends all : $(library) ;
|
||||
|
||||
if ! $(library:D) {
|
||||
MakeLocate $(library) $(library)($(objects:BS)) : $(OUT) ;
|
||||
}
|
||||
|
||||
Depends $(library) : $(library)($(objects:BS)) ;
|
||||
for obj in $(objects) {
|
||||
Depends $(library)($(obj:BS)) : $(obj) ;
|
||||
}
|
||||
|
||||
Clean clean : $(library) ;
|
||||
|
||||
AR on $(library) = $(AR_$(arch)) ;
|
||||
Archive $(library) : $(objects) ;
|
||||
|
||||
RmTemps $(library) : $(objects) ;
|
||||
}
|
||||
|
||||
|
||||
rule ProcessDir
|
||||
{
|
||||
local CFLAGS = $(CFLAGS) ;
|
||||
local DEFINES = $(DEFINES) ;
|
||||
local INCLUDES = $(INCLUDES) ;
|
||||
local local_rules = [ Glob $(1) : rules.jam ] ;
|
||||
local source sources ;
|
||||
|
||||
if $(local_rules) {
|
||||
local LOCAL_CFLAGS LOCAL_DEFINES LOCAL_INCLUDES LOCAL_SRC NO_LOCAL_SRC ;
|
||||
|
||||
include $(local_rules) ;
|
||||
CFLAGS += $(LOCAL_CFLAGS) ;
|
||||
DEFINES += $(LOCAL_DEFINES) ;
|
||||
INCLUDES += $(LOCAL_INCLUDES) ;
|
||||
|
||||
if $(LOCAL_SRC) {
|
||||
sources = $(LOCAL_SRC) ;
|
||||
}
|
||||
else {
|
||||
sources = [ Glob $(1) : *.S *.c ] ;
|
||||
sources = $(sources:BS) ;
|
||||
}
|
||||
|
||||
if $(NO_LOCAL_SRC) {
|
||||
sources = [ Filter $(sources) : $(NO_LOCAL_SRC) ] ;
|
||||
}
|
||||
|
||||
sources = $(1)/$(sources) ;
|
||||
}
|
||||
else
|
||||
sources = [ Glob $(1) : *.S *.c ] ;
|
||||
|
||||
for source in $(sources) {
|
||||
local name = $(source:B) ;
|
||||
|
||||
if $(source:S) = ".S" {
|
||||
# record the list of assembler sources
|
||||
ASSEMBLER_SOURCES += $(name) ;
|
||||
}
|
||||
else if $(source:S) = ".c" && $(name) in $(ASSEMBLER_SOURCES) {
|
||||
# skip C source file if corresponding assembler exists
|
||||
continue ;
|
||||
}
|
||||
|
||||
objname = <$(arch)>$(name).o ;
|
||||
|
||||
Compile $(objname) : $(source) ;
|
||||
ALL_OBJECTS += $(objname) ;
|
||||
}
|
||||
}
|
||||
|
||||
rule ProcessDirs
|
||||
{
|
||||
local dir ;
|
||||
for dir in $(1) {
|
||||
ProcessDir $(dir) ;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDES_x86 = /usr/src/linux/include ;
|
||||
|
||||
INCLUDES_arm = ../kernel_headers
|
||||
include/arch/arm
|
||||
include/bits32
|
||||
;
|
||||
|
||||
INCLUDES = include stdio string stdlib .
|
||||
../msun/include
|
||||
;
|
||||
|
||||
DEFINES = ANDROID_CHANGES
|
||||
USE_LOCKS
|
||||
REALLOC_ZERO_BYTES_FREES
|
||||
_LIBC=1
|
||||
SOFTFLOAT
|
||||
FLOATING_POINT
|
||||
NEED_PSELECT=1
|
||||
ANDROID
|
||||
;
|
||||
|
||||
CFLAGS_x86 = ;
|
||||
|
||||
|
||||
for arch in $(ARCH)
|
||||
{
|
||||
local ARCH_DIR = $(BIONIC_TOP)/arch-$(arch) ;
|
||||
local INCLUDES = $(INCLUDES_$(arch)) $(ARCH_DIR)/include $(INCLUDES) ;
|
||||
local DEFINES = $(DEFINES_$(arch)) $(DEFINES) ARCH=$(arch) ;
|
||||
local CFLAGS = $(CFLAGS) $(CFLAGS_$(arch)) ;
|
||||
local OUT = out/$(arch) ;
|
||||
local ASSEMBLER_SOURCES ALL_OBJECTS ;
|
||||
|
||||
ProcessDirs [ ListSubDirs $(ARCH_DIR) ] ;
|
||||
ProcessDirs stdlib stdio unistd string tzcode inet ;
|
||||
ProcessDirs [ ListSubDirs netbsd ] ;
|
||||
ProcessDirs bionic ;
|
||||
|
||||
Library bionic : $(ALL_OBJECTS) ;
|
||||
}
|
||||
|
||||
BIONIC_SEARCH = $(BIONIC_TOP)/include ;
|
||||
|
||||
|
||||
|
||||
# /HdrRule source : headers ;
|
||||
#
|
||||
# Arranges the proper dependencies when the file _source_ includes the files
|
||||
# _headers_ through the #include C preprocessor directive
|
||||
#
|
||||
# this rule is not intendend to be called explicitely. It is called
|
||||
# automatically during header scanning on sources handled by the @Object
|
||||
# rule (e.g. sources in @Main or @Library rules)
|
||||
#
|
||||
rule HdrRule
|
||||
{
|
||||
# HdrRule source : headers ;
|
||||
|
||||
# N.B. This rule is called during binding, potentially after
|
||||
# the fate of many targets has been determined, and must be
|
||||
# used with caution: don't add dependencies to unrelated
|
||||
# targets, and don't set variables on $(<).
|
||||
|
||||
# Tell Jam that anything depending on $(<) also depends on $(>),
|
||||
# set SEARCH so Jam can find the headers, but then say we don't
|
||||
# care if we can't actually find the headers (they may have been
|
||||
# within ifdefs),
|
||||
|
||||
local s = $(>:G=$(HDRGRIST:E)) ;
|
||||
|
||||
Includes $(<) : $(s) ;
|
||||
SEARCH on $(s) = $(HDRSEARCH) ;
|
||||
NoCare $(s) ;
|
||||
|
||||
# Propagate on $(<) to $(>)
|
||||
|
||||
HDRSEARCH on $(s) = $(HDRSEARCH) ;
|
||||
HDRSCAN on $(s) = $(HDRSCAN) ;
|
||||
HDRRULE on $(s) = $(HDRRULE) ;
|
||||
HDRGRIST on $(s) = $(HDRGRIST) ;
|
||||
}
|
||||
|
||||
|
382
libc/NOTICE
382
libc/NOTICE
@ -1,382 +0,0 @@
|
||||
|
||||
Copyright (c) 2005-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.
|
||||
* Neither the name of The Android Open Source Project nor the names
|
||||
of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (c) 1995,1996,1999 by Internet Software Consortium.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
Portions Copyright (c) 1995 by International Business Machines, Inc.
|
||||
|
||||
International Business Machines, Inc. (hereinafter called IBM) grants
|
||||
permission under its copyrights to use, copy, modify, and distribute this
|
||||
Software with or without fee, provided that the above copyright notice and
|
||||
all paragraphs of this notice appear in all copies, and that the name of IBM
|
||||
not be used in connection with the marketing of any product incorporating
|
||||
the Software or modifications thereof, without specific, written prior
|
||||
permission.
|
||||
|
||||
To the extent it has a right to do so, IBM grants an immunity from suit
|
||||
under its patents, if any, for the use, sale or manufacture of products to
|
||||
the extent that such products are used for performing Domain Name System
|
||||
dynamic updates in TCP/IP networks by means of the Software. No immunity is
|
||||
granted for any product per se or for any other function of any product.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
|
||||
DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
|
||||
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
|
||||
IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
|
||||
All rights reserved.
|
||||
|
||||
This code is derived from software contributed to The NetBSD Foundation
|
||||
by Luke Mewburn; and by Jason R. Thorpe.
|
||||
This code is derived from software contributed to The NetBSD Foundation
|
||||
by Christos Zoulas.
|
||||
|
||||
Copyright (c) 1993 Christopher G. Demetriou
|
||||
Copyright (c) 1983, 1985, 1993 The Regents of the University of California. All rights reserved.
|
||||
Copyright (c) 2000 Ben Harris.
|
||||
Copyright (C) 1995, 1996, 1997, and 1998 WIDE 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:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. 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.
|
||||
3. Neither the name of the project nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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.
|
||||
|
||||
Copyright (c) 2003 Networks Associates Technology, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Portions of this software were developed for the FreeBSD Project by
|
||||
Jacques A. Vidrine, Safeport Network Services, and Network
|
||||
Associates Laboratories, the Security Research Division of Network
|
||||
Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
|
||||
("CBOSS"), as part of the DARPA CHATS research program.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. 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 AUTHOR 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 AUTHOR 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.
|
||||
|
||||
Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies, and that
|
||||
the name of Digital Equipment Corporation not be used in advertising or
|
||||
publicity pertaining to distribution of the document or software without
|
||||
specific, written prior permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
Copyright (c) 1997 Mark Brinicombe
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. 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.
|
||||
3. All advertising materials mentioning features or use of this software
|
||||
must display the following acknowledgement:
|
||||
This product includes software developed by Mark Brinicombe
|
||||
4. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
|
||||
|
||||
|
||||
Copyright (c) 1993 Martin Birgmeier
|
||||
All rights reserved.
|
||||
|
||||
You may redistribute unmodified or modified versions of this source
|
||||
code provided that the above copyright notice and this and the
|
||||
following conditions are retained.
|
||||
|
||||
This software is provided ``as is'', and comes with no warranties
|
||||
of any kind. I shall in no event be liable for anything that happens
|
||||
to anyone/anything when using this software.
|
||||
|
||||
|
||||
Arc4 random number generator for OpenBSD.
|
||||
Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
|
||||
|
||||
Modification and redistribution in source and binary forms is
|
||||
permitted provided that due credit is given to the author and the
|
||||
OpenBSD project by leaving this copyright notice intact.
|
||||
|
||||
|
||||
Copyright (c) 1999 Kungliga Tekniska Högskolan
|
||||
(Royal Institute of Technology, Stockholm, Sweden).
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. 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.
|
||||
|
||||
3. Neither the name of KTH nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY KTH AND ITS 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 KTH OR ITS 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. */
|
||||
|
||||
|
||||
====================================================
|
||||
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||
|
||||
Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
Permission to use, copy, modify, and distribute this
|
||||
software is freely granted, provided that this notice
|
||||
is preserved.
|
||||
====================================================
|
||||
|
||||
|
||||
Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
Copyright (c) 1989, 1993
|
||||
The Regents of the University of California. All rights reserved.
|
||||
(c) UNIX System Laboratories, Inc.
|
||||
All or some portions of this file are derived from material licensed
|
||||
to the University of California by American Telephone and Telegraph
|
||||
Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
the permission of UNIX System Laboratories, Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. 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.
|
||||
3. Neither the name of the University nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
|
||||
|
||||
Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
All rights reserved.
|
||||
|
||||
Author: Chris G. Demetriou
|
||||
|
||||
Permission to use, copy, modify and distribute this software and
|
||||
its documentation is hereby granted, provided that both the copyright
|
||||
notice and this permission notice appear in all copies of the
|
||||
software, derivative works or modified versions, and any portions
|
||||
thereof, and that both notices appear in supporting documentation.
|
||||
|
||||
CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
|
||||
FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
|
||||
Carnegie Mellon requests users of this software to return to
|
||||
|
||||
Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
School of Computer Science
|
||||
Carnegie Mellon University
|
||||
Pittsburgh PA 15213-3890
|
||||
|
||||
any improvements or extensions that they make and grant Carnegie the
|
||||
rights to redistribute these changes.
|
||||
|
||||
|
||||
Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
All rights reserved.
|
||||
|
||||
Author: Chris G. Demetriou
|
||||
|
||||
Permission to use, copy, modify and distribute this software and
|
||||
its documentation is hereby granted, provided that both the copyright
|
||||
notice and this permission notice appear in all copies of the
|
||||
software, derivative works or modified versions, and any portions
|
||||
thereof, and that both notices appear in supporting documentation.
|
||||
|
||||
CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
||||
CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
|
||||
FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
||||
|
||||
Carnegie Mellon requests users of this software to return to
|
||||
|
||||
Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
||||
School of Computer Science
|
||||
Carnegie Mellon University
|
||||
Pittsburgh PA 15213-3890
|
||||
|
||||
any improvements or extensions that they make and grant Carnegie the
|
||||
rights to redistribute these changes.
|
||||
|
||||
|
||||
Copyright (c) 2003 Networks Associates Technology, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Portions of this software were developed for the FreeBSD Project by
|
||||
Jacques A. Vidrine, Safeport Network Services, and Network
|
||||
Associates Laboratories, the Security Research Division of Network
|
||||
Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
|
||||
("CBOSS"), as part of the DARPA CHATS research program.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. 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 AUTHOR 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 AUTHOR 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.
|
||||
|
||||
|
53
libc/README
53
libc/README
@ -1,53 +0,0 @@
|
||||
Welcome to Bionic, Android small and custom C library for the Android platform
|
||||
|
||||
Bionic is mainly a port of the BSD C library to our Linux kernel with the
|
||||
following additions/changes:
|
||||
|
||||
- no support for locales
|
||||
- no support for wide chars (i.e. multi-byte characters)
|
||||
- its own smallish implementation of pthreads based on Linux futexes
|
||||
- support for x86, ARM and ARM thumb CPU instruction sets and kernel interfaces
|
||||
|
||||
Bionic is released under the standard 3-clause BSD License
|
||||
|
||||
Bionic doesn't want to implement all features of a traditional C library, we only
|
||||
add features to it as we need them, and we try to keep things as simple and small
|
||||
as possible. Our goal is not to support scaling to thousands of concurrent threads
|
||||
on multi-processors machines; we're running this on cell-phones, damnit !!
|
||||
|
||||
Note that Bionic doesn't provide a libthread_db or a libm implementation.
|
||||
|
||||
|
||||
Adding new syscalls:
|
||||
====================
|
||||
|
||||
Bionic provides the gensyscalls.py Python script to automatically generate syscall
|
||||
stubs from the list defined in the file SYSCALLS.TXT. You can thus add a new syscall
|
||||
by doing the following:
|
||||
|
||||
- edit SYSCALLS.TXT
|
||||
- add a new line describing your syscall, it should look like:
|
||||
|
||||
return_type syscall_name(parameters) syscall_number
|
||||
|
||||
- in the event where you want to differentiate the syscall function from its entry name,
|
||||
use the alternate:
|
||||
|
||||
return_type funcname:syscall_name(parameters) syscall_number
|
||||
|
||||
- additionally, if the syscall number is different between ARM and x86, use:
|
||||
|
||||
return_type funcname[:syscall_name](parameters) arm_number,x86_number
|
||||
|
||||
- a syscall number can be -1 to indicate that the syscall is not implemented on
|
||||
a given platform, for example:
|
||||
|
||||
void __set_tls(void*) arm_number,-1
|
||||
|
||||
|
||||
the comments in SYSCALLS.TXT contain more information about the line format
|
||||
|
||||
You can also use the 'checksyscalls.py' script to check that all the syscall
|
||||
numbers you entered are correct. It does so by looking at the values defined in
|
||||
your Linux kernel headers. The script indicates where the values are incorrect
|
||||
and what is expected instead.
|
@ -1,245 +0,0 @@
|
||||
# this file is used to list all the syscalls that will be supported by
|
||||
# the Bionic C library. It is used to automatically generate the syscall
|
||||
# stubs, the list of syscall constants (__NR_xxxx) and the content of <linux/_unitsd.h>
|
||||
#
|
||||
# each non comment line has the following format:
|
||||
#
|
||||
# return_type func_name[:syscall_name[:call_id]]([parameter_list]) (#syscall_number|stub)
|
||||
#
|
||||
# note that:
|
||||
# - syscall_name correspond to the name of the syscall, which may differ from
|
||||
# the exported function name (example: the exit syscall is implemented by the _exit()
|
||||
# function, which is not the same as the standard C exit() function which calls it)
|
||||
# The call_id parameter, given that func_name and syscall_name have
|
||||
# been provided, allows the user to specify dispatch style syscalls.
|
||||
# For example, socket() syscall on i386 actually becomes:
|
||||
# socketcall(__NR_socket, 1, *(rest of args on stack)).
|
||||
#
|
||||
# - each parameter type is assumed to be stored on 32 bits, there is no plan to support
|
||||
# 64-bit architectures at the moment
|
||||
#
|
||||
# - it there is "stub" instead of a syscall number, the tool will not generate any
|
||||
# assembler template for the syscall; it's up to the bionic implementation to provide
|
||||
# a relevant C stub
|
||||
#
|
||||
# the file is processed by a python script named gensyscalls.py
|
||||
#
|
||||
|
||||
# process management
|
||||
void _exit:exit_group (int) 248,252
|
||||
void _exit_thread:exit (int) 1
|
||||
pid_t __fork:fork (void) 2
|
||||
pid_t _waitpid:waitpid (pid_t, int*, int, struct rusage*) -1,7
|
||||
int waitid(int, pid_t, struct siginfo_t*, int,void*) 280,284
|
||||
pid_t __clone:clone(int (*fn)(void*), void *child_stack, int flags, void *arg) 120
|
||||
int execve (const char*, char* const*, char* const*) 11
|
||||
|
||||
int setuid:setuid32 (uid_t) 213
|
||||
uid_t getuid:getuid32 () 199
|
||||
gid_t getgid:getgid32 () 200
|
||||
uid_t geteuid:geteuid32 () 201
|
||||
gid_t getegid:getegid32 () 202
|
||||
uid_t getresuid:getresuid32 () 209
|
||||
gid_t getresgid:getresgid32 () 211
|
||||
pid_t gettid() 224
|
||||
int getgroups:getgroups32(int, gid_t *) 205
|
||||
pid_t getpgid(pid_t) 132
|
||||
pid_t getppid() 64
|
||||
pid_t setsid() 66
|
||||
int setgid:setgid32(gid_t) 214
|
||||
int seteuid:seteuid32(uid_t) stub
|
||||
int setreuid:setreuid32(uid_t, uid_t) 203
|
||||
int setresuid:setresuid32(uid_t, uid_t, uid_t) 208
|
||||
int setresgid:setresgid32(gid_t, gid_t, gid_t) 210
|
||||
void* __brk:brk(void*) 45
|
||||
# see comments in arch-arm/bionic/kill.S to understand why we don't generate an ARM stub for kill/tkill
|
||||
int kill(pid_t, int) -1,37
|
||||
int tkill(pid_t tid, int sig) -1,238
|
||||
int __ptrace:ptrace(int request, int pid, void* addr, void* data) 26
|
||||
int __set_thread_area:set_thread_area(void* user_desc) -1,243
|
||||
int __getpriority:getpriority(int, int) 96
|
||||
int setpriority(int, int, int) 97
|
||||
int setrlimit(int resource, const struct rlimit *rlp) 75
|
||||
int getrlimit:ugetrlimit(int resource, struct rlimit *rlp) 191
|
||||
int getrusage(int who, struct rusage* r_usage) 77
|
||||
int setgroups:setgroups32(int, const gid_t *) 206
|
||||
pid_t getpgrp(void) stub
|
||||
int setpgid(pid_t, pid_t) 57
|
||||
pid_t vfork(void) 190,-1
|
||||
int setregid:setregid32(gid_t, gid_t) 204
|
||||
int chroot(const char *) 61
|
||||
int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) 172
|
||||
int capget(cap_user_header_t header, cap_user_data_t data) 184
|
||||
int capset(cap_user_header_t header, const cap_user_data_t data) 185
|
||||
int acct(const char* filepath) 51
|
||||
|
||||
# file descriptors
|
||||
ssize_t read (int, void*, size_t) 3
|
||||
ssize_t write (int, const void*, size_t) 4
|
||||
ssize_t __pread64:pread64 (int, void *, size_t, off_t, off_t) 180
|
||||
ssize_t __pwrite64:pwrite64 (int, void *, size_t, off_t, off_t) 181
|
||||
int __open:open (const char*, int, mode_t) 5
|
||||
int __openat:openat (int, const char*, int, mode_t) 322,295
|
||||
int close (int) 6
|
||||
int creat(const char*, mode_t) stub
|
||||
off_t lseek(int, off_t, int) 19
|
||||
int __llseek:_llseek (int, unsigned long, unsigned long, loff_t*, int) 140
|
||||
pid_t getpid () 20
|
||||
void * mmap(void *, size_t, int, int, int, long) stub
|
||||
void * __mmap2:mmap2(void*, size_t, int, int, int, long) 192
|
||||
int munmap(void *, size_t) 91
|
||||
void * mremap(void *, size_t, size_t, unsigned long) 163
|
||||
int msync(const void *, size_t, int) 144
|
||||
int mprotect(const void *, size_t, int) 125
|
||||
int madvise(const void *, size_t, int) 220,219
|
||||
int mlock(const void *addr, size_t len) 150
|
||||
int munlock(const void *addr, size_t len) 151
|
||||
int mincore(void* start, size_t length, unsigned char* vec) 219,218
|
||||
int __ioctl:ioctl(int, int, void *) 54
|
||||
int readv(int, const struct iovec *, int) 145
|
||||
int writev(int, const struct iovec *, int) 146
|
||||
int __fcntl:fcntl(int, int, void*) 55
|
||||
int flock(int, int) 143
|
||||
int fchmod(int, mode_t) 94
|
||||
int dup(int) 41
|
||||
int pipe(int *) 42
|
||||
int dup2(int, int) 63
|
||||
int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *) 142
|
||||
int ftruncate(int, off_t) 93
|
||||
int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 217,220
|
||||
int fsync(int) 118
|
||||
int fchown:fchown32(int, uid_t, gid_t) 207
|
||||
void sync(void) 36
|
||||
int __fcntl64:fcntl64(int, int, void *) 221
|
||||
int fstatfs:fstatfs64(int, size_t, struct statfs *) 267,269
|
||||
ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) 187
|
||||
int fstatat:fstatat64(int dirfd, const char *path, struct stat *buf, int flags) 327,300
|
||||
int mkdirat(int dirfd, const char *pathname, mode_t mode) 323,296
|
||||
int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags) 325,298
|
||||
int fchmodat(int dirfd, const char *path, mode_t mode, int flags) 333,306
|
||||
int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath) 329,302
|
||||
|
||||
# file system
|
||||
int link (const char*, const char*) 9
|
||||
int unlink (const char*) 10
|
||||
int unlinkat (int, const char *, int) 328,301
|
||||
int chdir (const char*) 12
|
||||
int mknod (const char*, mode_t, dev_t) 14
|
||||
int chmod (const char*,mode_t) 15
|
||||
int chown:chown32(const char *, uid_t, gid_t) 212
|
||||
int lchown:lchown32 (const char*, uid_t, gid_t) 198
|
||||
int mount (const char*, const char*, const char*, unsigned long, const void*) 21
|
||||
int umount(const char*) stub
|
||||
int umount2 (const char*, int) 52
|
||||
int fstat:fstat64(int, struct stat*) 197
|
||||
int stat:stat64(const char *, struct stat *) 195
|
||||
int lstat:lstat64(const char *, struct stat *) 196
|
||||
int mkdir(const char *, mode_t) 39
|
||||
int readlink(const char *, char *, size_t) 85
|
||||
int rmdir(const char *) 40
|
||||
int rename(const char *, const char *) 38
|
||||
int __getcwd:getcwd(char * buf, size_t size) 183
|
||||
int access(const char *, int) 33
|
||||
int symlink(const char *, const char *) 83
|
||||
int fchdir(int) 133
|
||||
int truncate(const char*, off_t) 92
|
||||
int __statfs64:statfs64(const char *, size_t, struct statfs *) 266,268
|
||||
# time
|
||||
int pause () 29
|
||||
int gettimeofday(struct timeval*, struct timezone*) 78
|
||||
int settimeofday(const struct timeval*, const struct timezone*) 79
|
||||
clock_t times(struct tms *) 43
|
||||
int nanosleep(const struct timespec *, struct timespec *) 162
|
||||
int clock_gettime(clockid_t clk_id, struct timespec *tp) 263,265
|
||||
int clock_settime(clockid_t clk_id, const struct timespec *tp) 262,264
|
||||
int clock_getres(clockid_t clk_id, struct timespec *res) 264,266
|
||||
int clock_nanosleep(const struct timespec *req, struct timespec *rem) 265,267
|
||||
int getitimer(int, const struct itimerval *) 105
|
||||
int setitimer(int, const struct itimerval *, struct itimerval *) 104
|
||||
int __timer_create:timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) 257,259
|
||||
int __timer_settime:timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) 258,260
|
||||
int __timer_gettime:timer_gettime(timer_t, struct itimerspec*) 259,261
|
||||
int __timer_getoverrun:timer_getoverrun(timer_t) 260,262
|
||||
int __timer_delete:timer_delete(timer_t) 261,263
|
||||
int utimes(const char*, const struct timeval tvp[2]) 269, 271
|
||||
|
||||
# signals
|
||||
int sigaction(int, const struct sigaction *, struct sigaction *) 67
|
||||
int sigprocmask(int, const sigset_t *, sigset_t *) 126
|
||||
int __sigsuspend:sigsuspend(int unused1, int unused2, unsigned mask) 72
|
||||
int __rt_sigaction:rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize) 174
|
||||
int __rt_sigprocmask:rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize) 175
|
||||
int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size) 177
|
||||
int sigpending(sigset_t *) 73
|
||||
|
||||
# sockets
|
||||
int socket(int, int, int) 281,-1
|
||||
int socketpair(int, int, int, int*) 288,-1
|
||||
int bind(int, struct sockaddr *, int) 282,-1
|
||||
int connect(int, struct sockaddr *, socklen_t) 283,-1
|
||||
int listen(int, int) 284,-1
|
||||
int accept(int, struct sockaddr *, socklen_t *) 285,-1
|
||||
int getsockname(int, struct sockaddr *, socklen_t *) 286,-1
|
||||
int getpeername(int, struct sockaddr *, socklen_t *) 287,-1
|
||||
int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t) 290,-1
|
||||
int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) 292,-1
|
||||
int shutdown(int, int) 293,-1
|
||||
int setsockopt(int, int, int, const void *, socklen_t) 294,-1
|
||||
int getsockopt(int, int, int, void *, socklen_t *) 295,-1
|
||||
int sendmsg(int, const struct msghdr *, unsigned int) 296,-1
|
||||
int recvmsg(int, struct msghdr *, unsigned int) 297,-1
|
||||
|
||||
# sockets for x86. These are done as an "indexed" call to socketcall syscall.
|
||||
int socket:socketcall:1 (int, int, int) -1,102
|
||||
int bind:socketcall:2 (int, struct sockaddr *, int) -1,102
|
||||
int connect:socketcall:3(int, struct sockaddr *, socklen_t) -1,102
|
||||
int listen:socketcall:4(int, int) -1,102
|
||||
int accept:socketcall:5(int, struct sockaddr *, socklen_t *) -1,102
|
||||
int getsockname:socketcall:6(int, struct sockaddr *, socklen_t *) -1,102
|
||||
int getpeername:socketcall:7(int, struct sockaddr *, socklen_t *) -1,102
|
||||
int socketpair:socketcall:8(int, int, int, int*) -1,102
|
||||
int sendto:socketcall:11(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -1,102
|
||||
int recvfrom:socketcall:12(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -1,102
|
||||
int shutdown:socketcall:13(int, int) -1,102
|
||||
int setsockopt:socketcall:14(int, int, int, const void *, socklen_t) -1,102
|
||||
int getsockopt:socketcall:15(int, int, int, void *, socklen_t *) -1,102
|
||||
int sendmsg:socketcall:16(int, const struct msghdr *, unsigned int) -1,102
|
||||
int recvmsg:socketcall:17(int, struct msghdr *, unsigned int) -1,102
|
||||
|
||||
# scheduler & real-time
|
||||
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param) 156
|
||||
int sched_getscheduler(pid_t pid) 157
|
||||
int sched_yield(void) 158
|
||||
int sched_setparam(pid_t pid, const struct sched_param *param) 154
|
||||
int sched_getparam(pid_t pid, struct sched_param *param) 155
|
||||
int sched_get_priority_max(int policy) 159
|
||||
int sched_get_priority_min(int policy) 160
|
||||
int sched_rr_get_interval(pid_t pid, struct timespec *interval) 161
|
||||
|
||||
# other
|
||||
int uname(struct utsname *) 122
|
||||
pid_t __wait4:wait4(pid_t pid, int *status, int options, struct rusage *rusage) 114
|
||||
mode_t umask(mode_t) 60
|
||||
int __reboot:reboot(int, int, int, void *) 88
|
||||
int __syslog:syslog(int, char *, int) 103
|
||||
int init_module(void *, unsigned long, const char *) 128
|
||||
int delete_module(const char*, unsigned int) 129
|
||||
int klogctl:syslog(int, char *, int) 103
|
||||
|
||||
# futex
|
||||
int futex(void *, int, int, void *, void *, int) 240
|
||||
|
||||
# epoll
|
||||
int epoll_create(int size) 250,254
|
||||
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) 251,255
|
||||
int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout) 252,256
|
||||
|
||||
int inotify_init(void) 316,291
|
||||
int inotify_add_watch(int, const char *, unsigned int) 317,292
|
||||
int inotify_rm_watch(int, unsigned int) 318,293
|
||||
|
||||
int poll(struct pollfd *, unsigned int, long) 168
|
||||
|
||||
# ARM-specific ARM_NR_BASE == 0x0f0000 == 983040
|
||||
int __set_tls:ARM_set_tls(void*) 983045,-1
|
||||
int cacheflush:ARM_cacheflush(long start, long end, long flags) 983042,-1
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
.global __get_pc
|
||||
|
||||
__get_pc:
|
||||
mov r0, pc
|
||||
bx lr
|
||||
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
.global __get_sp
|
||||
|
||||
__get_sp:
|
||||
mov r0, sp
|
||||
bx lr
|
||||
|
@ -1,55 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#include <asm/unistd.h>
|
||||
|
||||
.text
|
||||
.type _exit_with_stack_teardown, #function
|
||||
.globl _exit_with_stack_teardown
|
||||
.align 4
|
||||
|
||||
@ void _exit_with_stack_teardown(void * stackBase, int stackSize, int retCode)
|
||||
|
||||
_exit_with_stack_teardown:
|
||||
|
||||
#if __ARM_EABI__
|
||||
mov lr, r2
|
||||
ldr r7, =__NR_munmap
|
||||
swi #0 @ the stack is destroyed by this call
|
||||
mov r0, lr
|
||||
ldr r7, =__NR_exit
|
||||
swi #0
|
||||
#else
|
||||
mov lr, r2
|
||||
swi # __NR_munmap @ the stack is destroyed by this call
|
||||
mov r0, lr
|
||||
swi # __NR_exit
|
||||
#endif
|
||||
|
||||
@ exit() should never return, cause a crash if it does
|
||||
mov r0, #0
|
||||
ldr r0, [r0]
|
@ -1,106 +0,0 @@
|
||||
/* $OpenBSD: _setjmp.S,v 1.2 2004/02/01 05:40:52 drahn Exp $ */
|
||||
/* $NetBSD: _setjmp.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Brinicombe
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <machine/setjmp.h>
|
||||
|
||||
/*
|
||||
* C library -- _setjmp, _longjmp
|
||||
*
|
||||
* _longjmp(a,v)
|
||||
* will generate a "return(v)" from the last call to
|
||||
* _setjmp(a)
|
||||
* by restoring registers from the stack.
|
||||
* The previous signal state is NOT restored.
|
||||
*
|
||||
* Note: r0 is the return value
|
||||
* r1-r3 are scratch registers in functions
|
||||
*/
|
||||
|
||||
ENTRY(_setjmp)
|
||||
ldr r1, .L_setjmp_magic
|
||||
str r1, [r0], #4
|
||||
#ifdef SOFTFLOAT
|
||||
add r0, r0, #52
|
||||
#else
|
||||
/* Store fp registers */
|
||||
sfm f4, 4, [r0], #48
|
||||
/* Store fpsr */
|
||||
rfs r1
|
||||
str r1, [r0], #0x0004
|
||||
#endif /* SOFTFLOAT */
|
||||
/* Store integer registers */
|
||||
stmia r0, {r4-r14}
|
||||
|
||||
mov r0, #0x00000000
|
||||
bx lr
|
||||
|
||||
.L_setjmp_magic:
|
||||
.word _JB_MAGIC__SETJMP
|
||||
|
||||
ENTRY(_longjmp)
|
||||
ldr r2, .L_setjmp_magic
|
||||
ldr r3, [r0], #4
|
||||
teq r2, r3
|
||||
bne botch
|
||||
|
||||
#ifdef SOFTFLOAT
|
||||
add r0, r0, #52
|
||||
#else
|
||||
/* Restore fp registers */
|
||||
lfm f4, 4, [r0], #48
|
||||
/* Restore fpsr */
|
||||
ldr r4, [r0], #0x0004
|
||||
wfs r4
|
||||
#endif /* SOFTFLOAT */
|
||||
/* Restore integer registers */
|
||||
ldmia r0, {r4-r14}
|
||||
|
||||
/* Validate sp and r14 */
|
||||
teq sp, #0
|
||||
teqne r14, #0
|
||||
beq botch
|
||||
|
||||
/* Set return value */
|
||||
mov r0, r1
|
||||
teq r0, #0x00000000
|
||||
moveq r0, #0x00000001
|
||||
bx lr
|
||||
|
||||
/* validation failed, die die die. */
|
||||
botch:
|
||||
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
||||
bl PIC_SYM(_C_LABEL(abort), PLT)
|
||||
b . - 8 /* Cannot get here */
|
@ -1,178 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.global __atomic_cmpxchg
|
||||
.global __atomic_swap
|
||||
.global __atomic_dec
|
||||
.global __atomic_inc
|
||||
.global __futex_wait
|
||||
.global __futex_wake
|
||||
|
||||
#define FUTEX_WAIT 0
|
||||
#define FUTEX_WAKE 1
|
||||
|
||||
#if 1
|
||||
.equ kernel_cmpxchg, 0xFFFF0FC0
|
||||
.equ kernel_atomic_base, 0xFFFF0FFF
|
||||
__atomic_dec:
|
||||
stmdb sp!, {r4, lr}
|
||||
mov r2, r0
|
||||
1: @ atomic_dec
|
||||
ldr r0, [r2]
|
||||
mov r3, #kernel_atomic_base
|
||||
add lr, pc, #4
|
||||
sub r1, r0, #1
|
||||
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
|
||||
bcc 1b
|
||||
add r0, r1, #1
|
||||
ldmia sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
__atomic_inc:
|
||||
stmdb sp!, {r4, lr}
|
||||
mov r2, r0
|
||||
1: @ atomic_inc
|
||||
ldr r0, [r2]
|
||||
mov r3, #kernel_atomic_base
|
||||
add lr, pc, #4
|
||||
add r1, r0, #1
|
||||
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
|
||||
bcc 1b
|
||||
sub r0, r1, #1
|
||||
ldmia sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
/* r0(old) r1(new) r2(addr) -> r0(zero_if_succeeded) */
|
||||
__atomic_cmpxchg:
|
||||
stmdb sp!, {r4, lr}
|
||||
mov r4, r0 /* r4 = save oldvalue */
|
||||
1: @ atomic_cmpxchg
|
||||
mov r3, #kernel_atomic_base
|
||||
add lr, pc, #4
|
||||
mov r0, r4 /* r0 = oldvalue */
|
||||
add pc, r3, #(kernel_cmpxchg - kernel_atomic_base)
|
||||
bcs 2f /* swap was made. we're good, return. */
|
||||
ldr r3, [r2] /* swap not made, see if it's because *ptr!=oldvalue */
|
||||
cmp r3, r4
|
||||
beq 1b
|
||||
2: @ atomic_cmpxchg
|
||||
ldmia sp!, {r4, lr}
|
||||
bx lr
|
||||
#else
|
||||
#define KUSER_CMPXCHG 0xffffffc0
|
||||
|
||||
/* r0(old) r1(new) r2(addr) -> r0(zero_if_succeeded) */
|
||||
__atomic_cmpxchg:
|
||||
stmdb sp!, {r4, lr}
|
||||
mov r4, r0 /* r4 = save oldvalue */
|
||||
1: add lr, pc, #4
|
||||
mov r0, r4 /* r0 = oldvalue */
|
||||
mov pc, #KUSER_CMPXCHG
|
||||
bcs 2f /* swap was made. we're good, return. */
|
||||
ldr r3, [r2] /* swap not made, see if it's because *ptr!=oldvalue */
|
||||
cmp r3, r4
|
||||
beq 1b
|
||||
2: ldmia sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
/* r0(addr) -> r0(old) */
|
||||
__atomic_dec:
|
||||
stmdb sp!, {r4, lr}
|
||||
mov r2, r0 /* address */
|
||||
1: ldr r0, [r2] /* oldvalue */
|
||||
add lr, pc, #4
|
||||
sub r1, r0, #1 /* newvalue = oldvalue - 1 */
|
||||
mov pc, #KUSER_CMPXCHG
|
||||
bcc 1b /* no swap, try again until we get it right */
|
||||
mov r0, ip /* swapped, return the old value */
|
||||
ldmia sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
/* r0(addr) -> r0(old) */
|
||||
__atomic_inc:
|
||||
stmdb sp!, {r4, lr}
|
||||
mov r2, r0 /* address */
|
||||
1: ldr r0, [r2] /* oldvalue */
|
||||
add lr, pc, #4
|
||||
add r1, r0, #1 /* newvalue = oldvalue + 1 */
|
||||
mov pc, #KUSER_CMPXCHG
|
||||
bcc 1b /* no swap, try again until we get it right */
|
||||
mov r0, ip /* swapped, return the old value */
|
||||
ldmia sp!, {r4, lr}
|
||||
bx lr
|
||||
#endif
|
||||
|
||||
/* r0(new) r1(addr) -> r0(old) */
|
||||
__atomic_swap:
|
||||
swp r0, r0, [r1]
|
||||
bx lr
|
||||
|
||||
/* __futex_wait(*ftx, val, *timespec) */
|
||||
/* __futex_syscall(*ftx, op, val, *timespec, *addr2, val3) */
|
||||
|
||||
#if __ARM_EABI__
|
||||
|
||||
__futex_wait:
|
||||
.fnstart
|
||||
stmdb sp!, {r4, r7}
|
||||
.save {r4, r7}
|
||||
mov r3, r2
|
||||
mov r2, r1
|
||||
mov r1, #FUTEX_WAIT
|
||||
ldr r7, =__NR_futex
|
||||
swi #0
|
||||
ldmia sp!, {r4, r7}
|
||||
bx lr
|
||||
.fnend
|
||||
|
||||
__futex_wake:
|
||||
stmdb sp!, {r4, r7}
|
||||
mov r2, r1
|
||||
mov r1, #FUTEX_WAKE
|
||||
ldr r7, =__NR_futex
|
||||
swi #0
|
||||
ldmia sp!, {r4, r7}
|
||||
bx lr
|
||||
|
||||
#else
|
||||
|
||||
__futex_wait:
|
||||
mov r3, r2
|
||||
mov r2, r1
|
||||
mov r1, #FUTEX_WAIT
|
||||
swi #__NR_futex
|
||||
bx lr
|
||||
|
||||
__futex_wake:
|
||||
mov r2, r1
|
||||
mov r1, #FUTEX_WAKE
|
||||
swi #__NR_futex
|
||||
bx lr
|
||||
|
||||
#endif
|
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __pthread_clone, #function
|
||||
.global __pthread_clone
|
||||
.align 4
|
||||
|
||||
__pthread_clone:
|
||||
@ insert the args onto the new stack
|
||||
str r0, [r1, #-4]
|
||||
str r3, [r1, #-8]
|
||||
|
||||
@ do the system call
|
||||
@ get flags
|
||||
|
||||
mov r0, r2
|
||||
|
||||
@ new sp is already in r1
|
||||
|
||||
#if __ARM_EABI__
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_clone
|
||||
swi #0
|
||||
#else
|
||||
swi #__NR_clone
|
||||
#endif
|
||||
|
||||
movs r0, r0
|
||||
#if __ARM_EABI__
|
||||
ldmnefd sp!, {r4, r7}
|
||||
#endif
|
||||
blt __error
|
||||
bxne lr
|
||||
|
||||
|
||||
@ pick the function arg and call address off the stack and jump
|
||||
@ to the C __thread_entry function which does some setup and then
|
||||
@ calls the thread's start function
|
||||
|
||||
ldr r0, [sp, #-4]
|
||||
ldr r1, [sp, #-8]
|
||||
mov r2, sp @ __thread_entry needs the TLS pointer
|
||||
b __thread_entry
|
||||
|
||||
__error:
|
||||
mov r0, #-1
|
||||
bx lr
|
@ -1,92 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
.text
|
||||
.align 4
|
||||
.type _start,#function
|
||||
.globl _start
|
||||
|
||||
# this is the small startup code that is first run when
|
||||
# any executable that is statically-linked with Bionic
|
||||
# runs.
|
||||
#
|
||||
# it's purpose is to call __libc_init with appropriate
|
||||
# arguments, which are:
|
||||
#
|
||||
# - the address of the raw data block setup by the Linux
|
||||
# kernel ELF loader
|
||||
#
|
||||
# - address of an "onexit" function, not used on any
|
||||
# platform supported by Bionic
|
||||
#
|
||||
# - address of the "main" function of the program. We
|
||||
# can't hard-code it in the adr pseudo instruction
|
||||
# so we use a tiny trampoline that will get relocated
|
||||
# by the dynamic linker before this code runs
|
||||
#
|
||||
# - address of the constructor list
|
||||
#
|
||||
_start:
|
||||
mov r0, sp
|
||||
mov r1, #0
|
||||
adr r2, 0f
|
||||
adr r3, 1f
|
||||
b __libc_init
|
||||
|
||||
0: b main
|
||||
|
||||
1: .long __PREINIT_ARRAY__
|
||||
.long __INIT_ARRAY__
|
||||
.long __FINI_ARRAY__
|
||||
.long __CTOR_LIST__
|
||||
|
||||
# the .ctors section contains a list of pointers to "constructor"
|
||||
# functions that need to be called in order during C library initialization,
|
||||
# just before the program is being run. This is a C++ requirement
|
||||
#
|
||||
# the last entry shall be 0, and is defined in crtend.S
|
||||
#
|
||||
.section .preinit_array, "aw"
|
||||
.globl __PREINIT_ARRAY__
|
||||
__PREINIT_ARRAY__:
|
||||
.long -1
|
||||
|
||||
.section .init_array, "aw"
|
||||
.globl __INIT_ARRAY__
|
||||
__INIT_ARRAY__:
|
||||
.long -1
|
||||
|
||||
.section .fini_array, "aw"
|
||||
.globl __FINI_ARRAY__
|
||||
__FINI_ARRAY__:
|
||||
.long -1
|
||||
|
||||
.section .ctors, "aw"
|
||||
.globl __CTOR_LIST__
|
||||
__CTOR_LIST__:
|
||||
.long -1
|
||||
|
@ -1,92 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
.text
|
||||
.align 4
|
||||
.type _start,#function
|
||||
.globl _start
|
||||
|
||||
# this is the small startup code that is first run when
|
||||
# any executable that is statically-linked with Bionic
|
||||
# runs.
|
||||
#
|
||||
# it's purpose is to call __libc_init with appropriate
|
||||
# arguments, which are:
|
||||
#
|
||||
# - the address of the raw data block setup by the Linux
|
||||
# kernel ELF loader
|
||||
#
|
||||
# - address of an "onexit" function, not used on any
|
||||
# platform supported by Bionic
|
||||
#
|
||||
# - address of the "main" function of the program. We
|
||||
# can't hard-code it in the adr pseudo instruction
|
||||
# so we use a tiny trampoline that will get relocated
|
||||
# by the dynamic linker before this code runs
|
||||
#
|
||||
# - address of the constructor list
|
||||
#
|
||||
_start:
|
||||
mov r0, sp
|
||||
mov r1, #0
|
||||
adr r2, 0f
|
||||
adr r3, 1f
|
||||
b __libc_init
|
||||
|
||||
0: b main
|
||||
|
||||
1: .long __PREINIT_ARRAY__
|
||||
.long __INIT_ARRAY__
|
||||
.long __FINI_ARRAY__
|
||||
.long __CTOR_LIST__
|
||||
|
||||
# the .ctors section contains a list of pointers to "constructor"
|
||||
# functions that need to be called in order during C library initialization,
|
||||
# just before the program is being run. This is a C++ requirement
|
||||
#
|
||||
# the last entry shall be 0, and is defined in crtend.S
|
||||
#
|
||||
.section .preinit_array, "aw"
|
||||
.globl __PREINIT_ARRAY__
|
||||
__PREINIT_ARRAY__:
|
||||
.long -1
|
||||
|
||||
.section .init_array, "aw"
|
||||
.globl __INIT_ARRAY__
|
||||
__INIT_ARRAY__:
|
||||
.long -1
|
||||
|
||||
.section .fini_array, "aw"
|
||||
.globl __FINI_ARRAY__
|
||||
__FINI_ARRAY__:
|
||||
.long -1
|
||||
|
||||
.section .ctors, "aw"
|
||||
.globl __CTOR_LIST__
|
||||
__CTOR_LIST__:
|
||||
.long -1
|
||||
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
.section .preinit_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .init_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .fini_array, "aw"
|
||||
.long 0
|
||||
|
||||
.section .ctors, "aw"
|
||||
.long 0
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
typedef long unsigned int *_Unwind_Ptr;
|
||||
|
||||
/* Stubbed out in libdl and defined in the dynamic linker.
|
||||
* Same semantics as __gnu_Unwind_Find_exidx().
|
||||
*/
|
||||
extern _Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr pc, int *pcount);
|
||||
|
||||
/* For a given PC, find the .so that it belongs to.
|
||||
* Returns the base address of the .ARM.exidx section
|
||||
* for that .so, and the number of 8-byte entries
|
||||
* in that section (via *pcount).
|
||||
*
|
||||
* libgcc declares __gnu_Unwind_Find_exidx() as a weak symbol, with
|
||||
* the expectation that libc will define it and call through to
|
||||
* a differently-named function in the dynamic linker.
|
||||
*/
|
||||
_Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr pc, int *pcount)
|
||||
{
|
||||
return dl_unwind_find_exidx(pc, pcount);
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
typedef long unsigned int *_Unwind_Ptr;
|
||||
|
||||
/* Find the .ARM.exidx section (which in the case of a static executable
|
||||
* can be identified through its start and end symbols), and return its
|
||||
* beginning and numbe of entries to the caller. Note that for static
|
||||
* executables we do not need to use the value of the PC to find the
|
||||
* EXIDX section.
|
||||
*/
|
||||
|
||||
extern unsigned __exidx_end;
|
||||
extern unsigned __exidx_start;
|
||||
|
||||
_Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr pc __attribute__((unused)),
|
||||
int *pcount)
|
||||
{
|
||||
*pcount = (__exidx_end-__exidx_start)/8;
|
||||
return (_Unwind_Ptr)__exidx_start;
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/* $NetBSD: ffs.S,v 1.5 2003/04/05 23:08:52 bjh21 Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2001 Christopher Gilbert
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. The name of the company nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
/*
|
||||
* ffs - find first set bit, this algorithm isolates the first set
|
||||
* bit, then multiplies the number by 0x0450fbaf which leaves the top
|
||||
* 6 bits as an index into the table. This algorithm should be a win
|
||||
* over the checking each bit in turn as per the C compiled version.
|
||||
*
|
||||
* under ARMv5 there's an instruction called CLZ (count leading Zero's) that
|
||||
* could be used
|
||||
*
|
||||
* This is the ffs algorithm devised by d.seal and posted to comp.sys.arm on
|
||||
* 16 Feb 1994.
|
||||
*/
|
||||
|
||||
ENTRY(ffs)
|
||||
/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */
|
||||
rsb r1, r0, #0
|
||||
ands r0, r0, r1
|
||||
#ifndef __ARM_ARCH_5__
|
||||
/*
|
||||
* now r0 has at most one set bit, call this X
|
||||
* if X = 0, all further instructions are skipped
|
||||
*/
|
||||
adrne r2, .L_ffs_table
|
||||
orrne r0, r0, r0, lsl #4 /* r0 = X * 0x11 */
|
||||
orrne r0, r0, r0, lsl #6 /* r0 = X * 0x451 */
|
||||
rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */
|
||||
|
||||
/* now lookup in table indexed on top 6 bits of r0 */
|
||||
ldrneb r0, [ r2, r0, lsr #26 ]
|
||||
|
||||
bx lr
|
||||
|
||||
.text;
|
||||
.type .L_ffs_table, _ASM_TYPE_OBJECT;
|
||||
.L_ffs_table:
|
||||
/* 0 1 2 3 4 5 6 7 */
|
||||
.byte 0, 1, 2, 13, 3, 7, 0, 14 /* 0- 7 */
|
||||
.byte 4, 0, 8, 0, 0, 0, 0, 15 /* 8-15 */
|
||||
.byte 11, 5, 0, 0, 9, 0, 0, 26 /* 16-23 */
|
||||
.byte 0, 0, 0, 0, 0, 22, 28, 16 /* 24-31 */
|
||||
.byte 32, 12, 6, 0, 0, 0, 0, 0 /* 32-39 */
|
||||
.byte 10, 0, 0, 25, 0, 0, 21, 27 /* 40-47 */
|
||||
.byte 31, 0, 0, 0, 0, 24, 0, 20 /* 48-55 */
|
||||
.byte 30, 0, 23, 19, 29, 18, 17, 0 /* 56-63 */
|
||||
#else
|
||||
clzne r0, r0
|
||||
rsbne r0, r0, #32
|
||||
bx lr
|
||||
#endif
|
||||
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
/* unlike our auto-generated syscall stubs, this code saves lr
|
||||
on the stack, as well as a few other registers. this makes
|
||||
our stack unwinder happy, when we generate debug stack
|
||||
traces after the C library or other parts of the system
|
||||
abort due to a fatal runtime error (e.g. detection
|
||||
of a corrupted malloc heap).
|
||||
*/
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
#ifndef __NR_kill
|
||||
#define __NR_kill 37
|
||||
#endif
|
||||
|
||||
.text
|
||||
.type kill, #function
|
||||
.globl kill
|
||||
.align 4
|
||||
|
||||
kill:
|
||||
stmfd sp!, {r4-r7, ip, lr}
|
||||
ldr r7, =__NR_kill
|
||||
swi #0
|
||||
ldmfd sp!, {r4-r7, ip, lr}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
@ -1,285 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <machine/cpu-features.h>
|
||||
|
||||
.text
|
||||
|
||||
.global memcmp
|
||||
.type memcmp, %function
|
||||
.align 4
|
||||
|
||||
/*
|
||||
* Optimized memcmp() for ARM9.
|
||||
* This would not be optimal on XScale or ARM11, where more prefetching
|
||||
* and use of PLD will be needed.
|
||||
* The 2 major optimzations here are
|
||||
* (1) The main loop compares 16 bytes at a time
|
||||
* (2) The loads are scheduled in a way they won't stall
|
||||
*/
|
||||
|
||||
memcmp:
|
||||
PLD (r0, #0)
|
||||
PLD (r1, #0)
|
||||
|
||||
/* take of the case where length is 0 or the buffers are the same */
|
||||
cmp r0, r1
|
||||
cmpne r2, #0
|
||||
moveq r0, #0
|
||||
bxeq lr
|
||||
|
||||
/* save registers */
|
||||
stmfd sp!, {r4, lr}
|
||||
|
||||
PLD (r0, #32)
|
||||
PLD (r1, #32)
|
||||
|
||||
/* since r0 hold the result, move the first source
|
||||
* pointer somewhere else
|
||||
*/
|
||||
|
||||
mov r4, r0
|
||||
|
||||
/* make sure we have at least 8+4 bytes, this simplify things below
|
||||
* and avoid some overhead for small blocks
|
||||
*/
|
||||
cmp r2, #(8+4)
|
||||
bmi 8f
|
||||
|
||||
/* align first pointer to word boundary
|
||||
* offset = -src & 3
|
||||
*/
|
||||
rsb r3, r4, #0
|
||||
ands r3, r3, #3
|
||||
beq 0f
|
||||
|
||||
/* align first pointer */
|
||||
sub r2, r2, r3
|
||||
1: ldrb r0, [r4], #1
|
||||
ldrb ip, [r1], #1
|
||||
subs r0, r0, ip
|
||||
bne 9f
|
||||
subs r3, r3, #1
|
||||
bne 1b
|
||||
|
||||
|
||||
0: /* here the first pointer is aligned, and we have at least 4 bytes
|
||||
* to process.
|
||||
*/
|
||||
|
||||
/* see if the pointers are congruent */
|
||||
eor r0, r4, r1
|
||||
ands r0, r0, #3
|
||||
bne 5f
|
||||
|
||||
/* congruent case, 32 bytes per iteration
|
||||
* We need to make sure there are at least 32+4 bytes left
|
||||
* because we effectively read ahead one word, and we could
|
||||
* read past the buffer (and segfault) if we're not careful.
|
||||
*/
|
||||
|
||||
ldr ip, [r1]
|
||||
subs r2, r2, #(32 + 4)
|
||||
bmi 1f
|
||||
|
||||
0: PLD (r4, #64)
|
||||
PLD (r1, #64)
|
||||
ldr r0, [r4], #4
|
||||
ldr lr, [r1, #4]!
|
||||
eors r0, r0, ip
|
||||
ldreq r0, [r4], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
ldreq r0, [r4], #4
|
||||
ldreq lr, [r1, #4]!
|
||||
eoreqs r0, r0, ip
|
||||
ldreq r0, [r4], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
ldreq r0, [r4], #4
|
||||
ldreq lr, [r1, #4]!
|
||||
eoreqs r0, r0, ip
|
||||
ldreq r0, [r4], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
ldreq r0, [r4], #4
|
||||
ldreq lr, [r1, #4]!
|
||||
eoreqs r0, r0, ip
|
||||
ldreq r0, [r4], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
bne 2f
|
||||
subs r2, r2, #32
|
||||
bhs 0b
|
||||
|
||||
/* do we have at least 4 bytes left? */
|
||||
1: adds r2, r2, #(32 - 4 + 4)
|
||||
bmi 4f
|
||||
|
||||
/* finish off 4 bytes at a time */
|
||||
3: ldr r0, [r4], #4
|
||||
ldr ip, [r1], #4
|
||||
eors r0, r0, ip
|
||||
bne 2f
|
||||
subs r2, r2, #4
|
||||
bhs 3b
|
||||
|
||||
/* are we done? */
|
||||
4: adds r2, r2, #4
|
||||
moveq r0, #0
|
||||
beq 9f
|
||||
|
||||
/* finish off the remaining bytes */
|
||||
b 8f
|
||||
|
||||
2: /* the last 4 bytes are different, restart them */
|
||||
sub r4, r4, #4
|
||||
sub r1, r1, #4
|
||||
mov r2, #4
|
||||
|
||||
/* process the last few bytes */
|
||||
8: ldrb r0, [r4], #1
|
||||
ldrb ip, [r1], #1
|
||||
// stall
|
||||
subs r0, r0, ip
|
||||
bne 9f
|
||||
subs r2, r2, #1
|
||||
bne 8b
|
||||
|
||||
9: /* restore registers and return */
|
||||
ldmfd sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
5: /*************** non-congruent case ***************/
|
||||
and r0, r1, #3
|
||||
cmp r0, #2
|
||||
bne 4f
|
||||
|
||||
/* here, offset is 2 (16-bits aligned, special cased) */
|
||||
|
||||
/* make sure we have at least 16 bytes to process */
|
||||
subs r2, r2, #16
|
||||
addmi r2, r2, #16
|
||||
bmi 8b
|
||||
|
||||
/* align the unaligned pointer */
|
||||
bic r1, r1, #3
|
||||
ldr lr, [r1], #4
|
||||
|
||||
6: PLD (r1, #64)
|
||||
PLD (r4, #64)
|
||||
mov ip, lr, lsr #16
|
||||
ldr lr, [r1], #4
|
||||
ldr r0, [r4], #4
|
||||
orr ip, ip, lr, lsl #16
|
||||
eors r0, r0, ip
|
||||
moveq ip, lr, lsr #16
|
||||
ldreq lr, [r1], #4
|
||||
ldreq r0, [r4], #4
|
||||
orreq ip, ip, lr, lsl #16
|
||||
eoreqs r0, r0, ip
|
||||
moveq ip, lr, lsr #16
|
||||
ldreq lr, [r1], #4
|
||||
ldreq r0, [r4], #4
|
||||
orreq ip, ip, lr, lsl #16
|
||||
eoreqs r0, r0, ip
|
||||
moveq ip, lr, lsr #16
|
||||
ldreq lr, [r1], #4
|
||||
ldreq r0, [r4], #4
|
||||
orreq ip, ip, lr, lsl #16
|
||||
eoreqs r0, r0, ip
|
||||
bne 7f
|
||||
subs r2, r2, #16
|
||||
bhs 6b
|
||||
sub r1, r1, #2
|
||||
/* are we done? */
|
||||
adds r2, r2, #16
|
||||
moveq r0, #0
|
||||
beq 9b
|
||||
/* finish off the remaining bytes */
|
||||
b 8b
|
||||
|
||||
7: /* fix up the 2 pointers and fallthrough... */
|
||||
sub r1, r1, #(4+2)
|
||||
sub r4, r4, #4
|
||||
mov r2, #4
|
||||
b 8b
|
||||
|
||||
|
||||
4: /*************** offset is 1 or 3 (less optimized) ***************/
|
||||
|
||||
stmfd sp!, {r5, r6, r7}
|
||||
|
||||
// r5 = rhs
|
||||
// r6 = lhs
|
||||
// r7 = scratch
|
||||
|
||||
mov r5, r0, lsl #3 /* r5 = right shift */
|
||||
rsb r6, r5, #32 /* r6 = left shift */
|
||||
|
||||
/* align the unaligned pointer */
|
||||
bic r1, r1, #3
|
||||
ldr r7, [r1], #4
|
||||
sub r2, r2, #8
|
||||
|
||||
6: mov ip, r7, lsr r5
|
||||
ldr r7, [r1], #4
|
||||
ldr r0, [r4], #4
|
||||
orr ip, ip, r7, lsl r6
|
||||
eors r0, r0, ip
|
||||
moveq ip, r7, lsr r5
|
||||
ldreq r7, [r1], #4
|
||||
ldreq r0, [r4], #4
|
||||
orreq ip, ip, r7, lsl r6
|
||||
eoreqs r0, r0, ip
|
||||
bne 7f
|
||||
subs r2, r2, #8
|
||||
bhs 6b
|
||||
|
||||
sub r1, r1, r6, lsr #3
|
||||
ldmfd sp!, {r5, r6, r7}
|
||||
|
||||
/* are we done? */
|
||||
adds r2, r2, #8
|
||||
moveq r0, #0
|
||||
beq 9b
|
||||
|
||||
/* finish off the remaining bytes */
|
||||
b 8b
|
||||
|
||||
7: /* fix up the 2 pointers and fallthrough... */
|
||||
sub r1, r1, #4
|
||||
sub r1, r1, r6, lsr #3
|
||||
sub r4, r4, #4
|
||||
mov r2, #4
|
||||
ldmfd sp!, {r5, r6, r7}
|
||||
b 8b
|
@ -1,236 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <machine/cpu-features.h>
|
||||
|
||||
.text
|
||||
|
||||
.global __memcmp16
|
||||
.type __memcmp16, %function
|
||||
.align 4
|
||||
|
||||
/*
|
||||
* Optimized memcmp16() for ARM9.
|
||||
* This would not be optimal on XScale or ARM11, where more prefetching
|
||||
* and use of PLD will be needed.
|
||||
* The 2 major optimzations here are
|
||||
* (1) The main loop compares 16 bytes at a time
|
||||
* (2) The loads are scheduled in a way they won't stall
|
||||
*/
|
||||
|
||||
__memcmp16:
|
||||
PLD (r0, #0)
|
||||
PLD (r1, #0)
|
||||
|
||||
/* take of the case where length is nul or the buffers are the same */
|
||||
cmp r0, r1
|
||||
cmpne r2, #0
|
||||
moveq r0, #0
|
||||
bxeq lr
|
||||
|
||||
/* since r0 hold the result, move the first source
|
||||
* pointer somewhere else
|
||||
*/
|
||||
|
||||
mov r3, r0
|
||||
|
||||
/* make sure we have at least 12 words, this simplify things below
|
||||
* and avoid some overhead for small blocks
|
||||
*/
|
||||
|
||||
cmp r2, #12
|
||||
bpl 0f
|
||||
|
||||
/* small blocks (less then 12 words) */
|
||||
PLD (r0, #32)
|
||||
PLD (r1, #32)
|
||||
|
||||
1: ldrh r0, [r3], #2
|
||||
ldrh ip, [r1], #2
|
||||
subs r0, r0, ip
|
||||
bxne lr
|
||||
subs r2, r2, #1
|
||||
bne 1b
|
||||
bx lr
|
||||
|
||||
|
||||
/* save registers */
|
||||
0: stmfd sp!, {r4, lr}
|
||||
|
||||
/* align first pointer to word boundary */
|
||||
tst r3, #2
|
||||
beq 0f
|
||||
|
||||
ldrh r0, [r3], #2
|
||||
ldrh ip, [r1], #2
|
||||
sub r2, r2, #1
|
||||
subs r0, r0, ip
|
||||
/* restore registers and return */
|
||||
ldmnefd sp!, {r4, lr}
|
||||
bxne lr
|
||||
|
||||
|
||||
|
||||
0: /* here the first pointer is aligned, and we have at least 3 words
|
||||
* to process.
|
||||
*/
|
||||
|
||||
/* see if the pointers are congruent */
|
||||
eor r0, r3, r1
|
||||
ands r0, r0, #2
|
||||
bne 5f
|
||||
|
||||
/* congruent case, 16 half-words per iteration
|
||||
* We need to make sure there are at least 16+2 words left
|
||||
* because we effectively read ahead one long word, and we could
|
||||
* read past the buffer (and segfault) if we're not careful.
|
||||
*/
|
||||
|
||||
ldr ip, [r1]
|
||||
subs r2, r2, #(16 + 2)
|
||||
bmi 1f
|
||||
|
||||
0:
|
||||
PLD (r3, #64)
|
||||
PLD (r1, #64)
|
||||
ldr r0, [r3], #4
|
||||
ldr lr, [r1, #4]!
|
||||
eors r0, r0, ip
|
||||
ldreq r0, [r3], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
ldreq r0, [r3], #4
|
||||
ldreq lr, [r1, #4]!
|
||||
eoreqs r0, r0, ip
|
||||
ldreq r0, [r3], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
ldreq r0, [r3], #4
|
||||
ldreq lr, [r1, #4]!
|
||||
eoreqs r0, r0, ip
|
||||
ldreq r0, [r3], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
ldreq r0, [r3], #4
|
||||
ldreq lr, [r1, #4]!
|
||||
eoreqs r0, r0, ip
|
||||
ldreq r0, [r3], #4
|
||||
ldreq ip, [r1, #4]!
|
||||
eoreqs r0, r0, lr
|
||||
bne 2f
|
||||
subs r2, r2, #16
|
||||
bhs 0b
|
||||
|
||||
/* do we have at least 2 words left? */
|
||||
1: adds r2, r2, #(16 - 2 + 2)
|
||||
bmi 4f
|
||||
|
||||
/* finish off 2 words at a time */
|
||||
3: ldr r0, [r3], #4
|
||||
ldr ip, [r1], #4
|
||||
eors r0, r0, ip
|
||||
bne 2f
|
||||
subs r2, r2, #2
|
||||
bhs 3b
|
||||
|
||||
/* are we done? */
|
||||
4: adds r2, r2, #2
|
||||
bne 8f
|
||||
/* restore registers and return */
|
||||
mov r0, #0
|
||||
ldmfd sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
2: /* the last 2 words are different, restart them */
|
||||
ldrh r0, [r3, #-4]
|
||||
ldrh ip, [r1, #-4]
|
||||
subs r0, r0, ip
|
||||
ldreqh r0, [r3, #-2]
|
||||
ldreqh ip, [r1, #-2]
|
||||
subeqs r0, r0, ip
|
||||
/* restore registers and return */
|
||||
ldmfd sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
/* process the last few words */
|
||||
8: ldrh r0, [r3], #2
|
||||
ldrh ip, [r1], #2
|
||||
subs r0, r0, ip
|
||||
bne 9f
|
||||
subs r2, r2, #1
|
||||
bne 8b
|
||||
|
||||
9: /* restore registers and return */
|
||||
ldmfd sp!, {r4, lr}
|
||||
bx lr
|
||||
|
||||
|
||||
5: /*************** non-congruent case ***************/
|
||||
|
||||
/* align the unaligned pointer */
|
||||
bic r1, r1, #3
|
||||
ldr lr, [r1], #4
|
||||
sub r2, r2, #8
|
||||
|
||||
6:
|
||||
PLD (r3, #64)
|
||||
PLD (r1, #64)
|
||||
mov ip, lr, lsr #16
|
||||
ldr lr, [r1], #4
|
||||
ldr r0, [r3], #4
|
||||
orr ip, ip, lr, lsl #16
|
||||
eors r0, r0, ip
|
||||
moveq ip, lr, lsr #16
|
||||
ldreq lr, [r1], #4
|
||||
ldreq r0, [r3], #4
|
||||
orreq ip, ip, lr, lsl #16
|
||||
eoreqs r0, r0, ip
|
||||
moveq ip, lr, lsr #16
|
||||
ldreq lr, [r1], #4
|
||||
ldreq r0, [r3], #4
|
||||
orreq ip, ip, lr, lsl #16
|
||||
eoreqs r0, r0, ip
|
||||
moveq ip, lr, lsr #16
|
||||
ldreq lr, [r1], #4
|
||||
ldreq r0, [r3], #4
|
||||
orreq ip, ip, lr, lsl #16
|
||||
eoreqs r0, r0, ip
|
||||
bne 7f
|
||||
subs r2, r2, #8
|
||||
bhs 6b
|
||||
sub r1, r1, #2
|
||||
/* are we done? */
|
||||
adds r2, r2, #8
|
||||
moveq r0, #0
|
||||
beq 9b
|
||||
/* finish off the remaining bytes */
|
||||
b 8b
|
||||
|
||||
7: /* fix up the 2 pointers and fallthrough... */
|
||||
sub r1, r1, #2
|
||||
b 2b
|
@ -1,387 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <machine/cpu-features.h>
|
||||
|
||||
.text
|
||||
|
||||
.global memcpy
|
||||
.type memcpy, %function
|
||||
.align 4
|
||||
|
||||
/*
|
||||
* Optimized memcpy() for ARM.
|
||||
*
|
||||
* note that memcpy() always returns the destination pointer,
|
||||
* so we have to preserve R0.
|
||||
*/
|
||||
|
||||
memcpy:
|
||||
/* The stack must always be 64-bits aligned to be compliant with the
|
||||
* ARM ABI. Since we have to save R0, we might as well save R4
|
||||
* which we can use for better pipelining of the reads below
|
||||
*/
|
||||
.fnstart
|
||||
.save {r0, r4, lr}
|
||||
stmfd sp!, {r0, r4, lr}
|
||||
/* Making room for r5-r11 which will be spilled later */
|
||||
.pad #28
|
||||
sub sp, sp, #28
|
||||
|
||||
// preload the destination because we'll align it to a cache line
|
||||
// with small writes. Also start the source "pump".
|
||||
PLD (r0, #0)
|
||||
PLD (r1, #0)
|
||||
PLD (r1, #32)
|
||||
|
||||
/* it simplifies things to take care of len<4 early */
|
||||
cmp r2, #4
|
||||
blo copy_last_3_and_return
|
||||
|
||||
/* compute the offset to align the source
|
||||
* offset = (4-(src&3))&3 = -src & 3
|
||||
*/
|
||||
rsb r3, r1, #0
|
||||
ands r3, r3, #3
|
||||
beq src_aligned
|
||||
|
||||
/* align source to 32 bits. We need to insert 2 instructions between
|
||||
* a ldr[b|h] and str[b|h] because byte and half-word instructions
|
||||
* stall 2 cycles.
|
||||
*/
|
||||
movs r12, r3, lsl #31
|
||||
sub r2, r2, r3 /* we know that r3 <= r2 because r2 >= 4 */
|
||||
ldrmib r3, [r1], #1
|
||||
ldrcsb r4, [r1], #1
|
||||
ldrcsb r12,[r1], #1
|
||||
strmib r3, [r0], #1
|
||||
strcsb r4, [r0], #1
|
||||
strcsb r12,[r0], #1
|
||||
|
||||
src_aligned:
|
||||
|
||||
/* see if src and dst are aligned together (congruent) */
|
||||
eor r12, r0, r1
|
||||
tst r12, #3
|
||||
bne non_congruent
|
||||
|
||||
/* Use post-incriment mode for stm to spill r5-r11 to reserved stack
|
||||
* frame. Don't update sp.
|
||||
*/
|
||||
stmea sp, {r5-r11}
|
||||
|
||||
/* align the destination to a cache-line */
|
||||
rsb r3, r0, #0
|
||||
ands r3, r3, #0x1C
|
||||
beq congruent_aligned32
|
||||
cmp r3, r2
|
||||
andhi r3, r2, #0x1C
|
||||
|
||||
/* conditionnaly copies 0 to 7 words (length in r3) */
|
||||
movs r12, r3, lsl #28
|
||||
ldmcsia r1!, {r4, r5, r6, r7} /* 16 bytes */
|
||||
ldmmiia r1!, {r8, r9} /* 8 bytes */
|
||||
stmcsia r0!, {r4, r5, r6, r7}
|
||||
stmmiia r0!, {r8, r9}
|
||||
tst r3, #0x4
|
||||
ldrne r10,[r1], #4 /* 4 bytes */
|
||||
strne r10,[r0], #4
|
||||
sub r2, r2, r3
|
||||
|
||||
congruent_aligned32:
|
||||
/*
|
||||
* here source is aligned to 32 bytes.
|
||||
*/
|
||||
|
||||
cached_aligned32:
|
||||
subs r2, r2, #32
|
||||
blo less_than_32_left
|
||||
|
||||
/*
|
||||
* We preload a cache-line up to 64 bytes ahead. On the 926, this will
|
||||
* stall only until the requested world is fetched, but the linefill
|
||||
* continues in the the background.
|
||||
* While the linefill is going, we write our previous cache-line
|
||||
* into the write-buffer (which should have some free space).
|
||||
* When the linefill is done, the writebuffer will
|
||||
* start dumping its content into memory
|
||||
*
|
||||
* While all this is going, we then load a full cache line into
|
||||
* 8 registers, this cache line should be in the cache by now
|
||||
* (or partly in the cache).
|
||||
*
|
||||
* This code should work well regardless of the source/dest alignment.
|
||||
*
|
||||
*/
|
||||
|
||||
// Align the preload register to a cache-line because the cpu does
|
||||
// "critical word first" (the first word requested is loaded first).
|
||||
bic r12, r1, #0x1F
|
||||
add r12, r12, #64
|
||||
|
||||
1: ldmia r1!, { r4-r11 }
|
||||
PLD (r12, #64)
|
||||
subs r2, r2, #32
|
||||
|
||||
// NOTE: if r12 is more than 64 ahead of r1, the following ldrhi
|
||||
// for ARM9 preload will not be safely guarded by the preceding subs.
|
||||
// When it is safely guarded the only possibility to have SIGSEGV here
|
||||
// is because the caller overstates the length.
|
||||
ldrhi r3, [r12], #32 /* cheap ARM9 preload */
|
||||
stmia r0!, { r4-r11 }
|
||||
bhs 1b
|
||||
|
||||
add r2, r2, #32
|
||||
|
||||
|
||||
|
||||
|
||||
less_than_32_left:
|
||||
/*
|
||||
* less than 32 bytes left at this point (length in r2)
|
||||
*/
|
||||
|
||||
/* skip all this if there is nothing to do, which should
|
||||
* be a common case (if not executed the code below takes
|
||||
* about 16 cycles)
|
||||
*/
|
||||
tst r2, #0x1F
|
||||
beq 1f
|
||||
|
||||
/* conditionnaly copies 0 to 31 bytes */
|
||||
movs r12, r2, lsl #28
|
||||
ldmcsia r1!, {r4, r5, r6, r7} /* 16 bytes */
|
||||
ldmmiia r1!, {r8, r9} /* 8 bytes */
|
||||
stmcsia r0!, {r4, r5, r6, r7}
|
||||
stmmiia r0!, {r8, r9}
|
||||
movs r12, r2, lsl #30
|
||||
ldrcs r3, [r1], #4 /* 4 bytes */
|
||||
ldrmih r4, [r1], #2 /* 2 bytes */
|
||||
strcs r3, [r0], #4
|
||||
strmih r4, [r0], #2
|
||||
tst r2, #0x1
|
||||
ldrneb r3, [r1] /* last byte */
|
||||
strneb r3, [r0]
|
||||
|
||||
/* we're done! restore everything and return */
|
||||
1: ldmfd sp!, {r5-r11}
|
||||
ldmfd sp!, {r0, r4, lr}
|
||||
bx lr
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
non_congruent:
|
||||
/*
|
||||
* here source is aligned to 4 bytes
|
||||
* but destination is not.
|
||||
*
|
||||
* in the code below r2 is the number of bytes read
|
||||
* (the number of bytes written is always smaller, because we have
|
||||
* partial words in the shift queue)
|
||||
*/
|
||||
cmp r2, #4
|
||||
blo copy_last_3_and_return
|
||||
|
||||
/* Use post-incriment mode for stm to spill r5-r11 to reserved stack
|
||||
* frame. Don't update sp.
|
||||
*/
|
||||
stmea sp, {r5-r11}
|
||||
|
||||
/* compute shifts needed to align src to dest */
|
||||
rsb r5, r0, #0
|
||||
and r5, r5, #3 /* r5 = # bytes in partial words */
|
||||
mov r12, r5, lsl #3 /* r12 = right */
|
||||
rsb lr, r12, #32 /* lr = left */
|
||||
|
||||
/* read the first word */
|
||||
ldr r3, [r1], #4
|
||||
sub r2, r2, #4
|
||||
|
||||
/* write a partial word (0 to 3 bytes), such that destination
|
||||
* becomes aligned to 32 bits (r5 = nb of words to copy for alignment)
|
||||
*/
|
||||
movs r5, r5, lsl #31
|
||||
strmib r3, [r0], #1
|
||||
movmi r3, r3, lsr #8
|
||||
strcsb r3, [r0], #1
|
||||
movcs r3, r3, lsr #8
|
||||
strcsb r3, [r0], #1
|
||||
movcs r3, r3, lsr #8
|
||||
|
||||
cmp r2, #4
|
||||
blo partial_word_tail
|
||||
|
||||
/* Align destination to 32 bytes (cache line boundary) */
|
||||
1: tst r0, #0x1c
|
||||
beq 2f
|
||||
ldr r5, [r1], #4
|
||||
sub r2, r2, #4
|
||||
orr r4, r3, r5, lsl lr
|
||||
mov r3, r5, lsr r12
|
||||
str r4, [r0], #4
|
||||
cmp r2, #4
|
||||
bhs 1b
|
||||
blo partial_word_tail
|
||||
|
||||
/* copy 32 bytes at a time */
|
||||
2: subs r2, r2, #32
|
||||
blo less_than_thirtytwo
|
||||
|
||||
/* Use immediate mode for the shifts, because there is an extra cycle
|
||||
* for register shifts, which could account for up to 50% of
|
||||
* performance hit.
|
||||
*/
|
||||
|
||||
cmp r12, #24
|
||||
beq loop24
|
||||
cmp r12, #8
|
||||
beq loop8
|
||||
|
||||
loop16:
|
||||
ldr r12, [r1], #4
|
||||
1: mov r4, r12
|
||||
ldmia r1!, { r5,r6,r7, r8,r9,r10,r11}
|
||||
PLD (r1, #64)
|
||||
subs r2, r2, #32
|
||||
ldrhs r12, [r1], #4
|
||||
orr r3, r3, r4, lsl #16
|
||||
mov r4, r4, lsr #16
|
||||
orr r4, r4, r5, lsl #16
|
||||
mov r5, r5, lsr #16
|
||||
orr r5, r5, r6, lsl #16
|
||||
mov r6, r6, lsr #16
|
||||
orr r6, r6, r7, lsl #16
|
||||
mov r7, r7, lsr #16
|
||||
orr r7, r7, r8, lsl #16
|
||||
mov r8, r8, lsr #16
|
||||
orr r8, r8, r9, lsl #16
|
||||
mov r9, r9, lsr #16
|
||||
orr r9, r9, r10, lsl #16
|
||||
mov r10, r10, lsr #16
|
||||
orr r10, r10, r11, lsl #16
|
||||
stmia r0!, {r3,r4,r5,r6, r7,r8,r9,r10}
|
||||
mov r3, r11, lsr #16
|
||||
bhs 1b
|
||||
b less_than_thirtytwo
|
||||
|
||||
loop8:
|
||||
ldr r12, [r1], #4
|
||||
1: mov r4, r12
|
||||
ldmia r1!, { r5,r6,r7, r8,r9,r10,r11}
|
||||
PLD (r1, #64)
|
||||
subs r2, r2, #32
|
||||
ldrhs r12, [r1], #4
|
||||
orr r3, r3, r4, lsl #24
|
||||
mov r4, r4, lsr #8
|
||||
orr r4, r4, r5, lsl #24
|
||||
mov r5, r5, lsr #8
|
||||
orr r5, r5, r6, lsl #24
|
||||
mov r6, r6, lsr #8
|
||||
orr r6, r6, r7, lsl #24
|
||||
mov r7, r7, lsr #8
|
||||
orr r7, r7, r8, lsl #24
|
||||
mov r8, r8, lsr #8
|
||||
orr r8, r8, r9, lsl #24
|
||||
mov r9, r9, lsr #8
|
||||
orr r9, r9, r10, lsl #24
|
||||
mov r10, r10, lsr #8
|
||||
orr r10, r10, r11, lsl #24
|
||||
stmia r0!, {r3,r4,r5,r6, r7,r8,r9,r10}
|
||||
mov r3, r11, lsr #8
|
||||
bhs 1b
|
||||
b less_than_thirtytwo
|
||||
|
||||
loop24:
|
||||
ldr r12, [r1], #4
|
||||
1: mov r4, r12
|
||||
ldmia r1!, { r5,r6,r7, r8,r9,r10,r11}
|
||||
PLD (r1, #64)
|
||||
subs r2, r2, #32
|
||||
ldrhs r12, [r1], #4
|
||||
orr r3, r3, r4, lsl #8
|
||||
mov r4, r4, lsr #24
|
||||
orr r4, r4, r5, lsl #8
|
||||
mov r5, r5, lsr #24
|
||||
orr r5, r5, r6, lsl #8
|
||||
mov r6, r6, lsr #24
|
||||
orr r6, r6, r7, lsl #8
|
||||
mov r7, r7, lsr #24
|
||||
orr r7, r7, r8, lsl #8
|
||||
mov r8, r8, lsr #24
|
||||
orr r8, r8, r9, lsl #8
|
||||
mov r9, r9, lsr #24
|
||||
orr r9, r9, r10, lsl #8
|
||||
mov r10, r10, lsr #24
|
||||
orr r10, r10, r11, lsl #8
|
||||
stmia r0!, {r3,r4,r5,r6, r7,r8,r9,r10}
|
||||
mov r3, r11, lsr #24
|
||||
bhs 1b
|
||||
|
||||
|
||||
less_than_thirtytwo:
|
||||
/* copy the last 0 to 31 bytes of the source */
|
||||
rsb r12, lr, #32 /* we corrupted r12, recompute it */
|
||||
add r2, r2, #32
|
||||
cmp r2, #4
|
||||
blo partial_word_tail
|
||||
|
||||
1: ldr r5, [r1], #4
|
||||
sub r2, r2, #4
|
||||
orr r4, r3, r5, lsl lr
|
||||
mov r3, r5, lsr r12
|
||||
str r4, [r0], #4
|
||||
cmp r2, #4
|
||||
bhs 1b
|
||||
|
||||
partial_word_tail:
|
||||
/* we have a partial word in the input buffer */
|
||||
movs r5, lr, lsl #(31-3)
|
||||
strmib r3, [r0], #1
|
||||
movmi r3, r3, lsr #8
|
||||
strcsb r3, [r0], #1
|
||||
movcs r3, r3, lsr #8
|
||||
strcsb r3, [r0], #1
|
||||
|
||||
/* Refill spilled registers from the stack. Don't update sp. */
|
||||
ldmfd sp, {r5-r11}
|
||||
|
||||
copy_last_3_and_return:
|
||||
movs r2, r2, lsl #31 /* copy remaining 0, 1, 2 or 3 bytes */
|
||||
ldrmib r2, [r1], #1
|
||||
ldrcsb r3, [r1], #1
|
||||
ldrcsb r12,[r1]
|
||||
strmib r2, [r0], #1
|
||||
strcsb r3, [r0], #1
|
||||
strcsb r12,[r0]
|
||||
|
||||
/* we're done! restore sp and spilled registers and return */
|
||||
add sp, sp, #28
|
||||
ldmfd sp!, {r0, r4, lr}
|
||||
bx lr
|
||||
.fnend
|
||||
|
@ -1,117 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
.text
|
||||
|
||||
.global memset
|
||||
.type memset, %function
|
||||
|
||||
.global bzero
|
||||
.type bzero, %function
|
||||
|
||||
.align
|
||||
|
||||
/*
|
||||
* Optimized memset() for ARM.
|
||||
*
|
||||
* memset() returns its first argument.
|
||||
*/
|
||||
|
||||
bzero:
|
||||
mov r2, r1
|
||||
mov r1, #0
|
||||
|
||||
memset:
|
||||
/* compute the offset to align the destination
|
||||
* offset = (4-(src&3))&3 = -src & 3
|
||||
*/
|
||||
.fnstart
|
||||
.save {r0, r4-r7, lr}
|
||||
stmfd sp!, {r0, r4-r7, lr}
|
||||
rsb r3, r0, #0
|
||||
ands r3, r3, #3
|
||||
cmp r3, r2
|
||||
movhi r3, r2
|
||||
|
||||
/* splat r1 */
|
||||
mov r1, r1, lsl #24
|
||||
orr r1, r1, r1, lsr #8
|
||||
orr r1, r1, r1, lsr #16
|
||||
|
||||
movs r12, r3, lsl #31
|
||||
strcsb r1, [r0], #1 /* can't use strh (alignment unknown) */
|
||||
strcsb r1, [r0], #1
|
||||
strmib r1, [r0], #1
|
||||
subs r2, r2, r3
|
||||
ldmlsfd sp!, {r0, r4-r7, lr} /* return */
|
||||
bxls lr
|
||||
|
||||
/* align the destination to a cache-line */
|
||||
mov r12, r1
|
||||
mov lr, r1
|
||||
mov r4, r1
|
||||
mov r5, r1
|
||||
mov r6, r1
|
||||
mov r7, r1
|
||||
|
||||
rsb r3, r0, #0
|
||||
ands r3, r3, #0x1C
|
||||
beq aligned32
|
||||
cmp r3, r2
|
||||
andhi r3, r2, #0x1C
|
||||
sub r2, r2, r3
|
||||
|
||||
/* conditionnaly writes 0 to 7 words (length in r3) */
|
||||
movs r3, r3, lsl #28
|
||||
stmcsia r0!, {r1, lr}
|
||||
stmcsia r0!, {r1, lr}
|
||||
stmmiia r0!, {r1, lr}
|
||||
movs r3, r3, lsl #2
|
||||
strcs r1, [r0], #4
|
||||
|
||||
aligned32:
|
||||
subs r2, r2, #32
|
||||
mov r3, r1
|
||||
bmi 2f
|
||||
1: subs r2, r2, #32
|
||||
stmia r0!, {r1,r3,r4,r5,r6,r7,r12,lr}
|
||||
bhs 1b
|
||||
2: add r2, r2, #32
|
||||
|
||||
/* conditionnaly stores 0 to 31 bytes */
|
||||
movs r2, r2, lsl #28
|
||||
stmcsia r0!, {r1,r3,r12,lr}
|
||||
stmmiia r0!, {r1, lr}
|
||||
movs r2, r2, lsl #2
|
||||
strcs r1, [r0], #4
|
||||
strmih r1, [r0], #2
|
||||
movs r2, r2, lsl #2
|
||||
strcsb r1, [r0]
|
||||
ldmfd sp!, {r0, r4-r7, lr}
|
||||
bx lr
|
||||
.fnend
|
||||
|
@ -1,136 +0,0 @@
|
||||
/* $OpenBSD: setjmp.S,v 1.2 2004/02/01 05:40:52 drahn Exp $ */
|
||||
/* $NetBSD: setjmp.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Brinicombe
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <machine/setjmp.h>
|
||||
|
||||
/*
|
||||
* C library -- setjmp, longjmp
|
||||
*
|
||||
* longjmp(a,v)
|
||||
* will generate a "return(v)" from the last call to
|
||||
* setjmp(a)
|
||||
* by restoring registers from the stack.
|
||||
* The previous signal state is restored.
|
||||
*/
|
||||
|
||||
ENTRY(setjmp)
|
||||
/* Block all signals and retrieve the old signal mask */
|
||||
stmfd sp!, {r0, r14}
|
||||
mov r0, #0x00000000
|
||||
|
||||
bl PIC_SYM(_C_LABEL(sigblock), PLT)
|
||||
mov r1, r0
|
||||
|
||||
ldmfd sp!, {r0, r14}
|
||||
|
||||
/* Store signal mask */
|
||||
str r1, [r0, #(25 * 4)]
|
||||
|
||||
ldr r1, .Lsetjmp_magic
|
||||
str r1, [r0], #4
|
||||
|
||||
#ifdef SOFTFLOAT
|
||||
add r0, r0, #52
|
||||
#else
|
||||
/* Store fp registers */
|
||||
sfm f4, 4, [r0], #48
|
||||
/* Store fpsr */
|
||||
rfs r1
|
||||
str r1, [r0], #0x0004
|
||||
#endif /*SOFTFLOAT*/
|
||||
/* Store integer registers */
|
||||
stmia r0, {r4-r14}
|
||||
mov r0, #0x00000000
|
||||
bx lr
|
||||
|
||||
.Lsetjmp_magic:
|
||||
.word _JB_MAGIC_SETJMP
|
||||
|
||||
|
||||
ENTRY(longjmp)
|
||||
ldr r2, .Lsetjmp_magic
|
||||
ldr r3, [r0]
|
||||
teq r2, r3
|
||||
bne botch
|
||||
|
||||
/* Fetch signal mask */
|
||||
ldr r2, [r0, #(25 * 4)]
|
||||
|
||||
/* Set signal mask */
|
||||
stmfd sp!, {r0, r1, r14}
|
||||
sub sp, sp, #4 /* align the stack */
|
||||
|
||||
mov r0, r2
|
||||
bl PIC_SYM(_C_LABEL(sigsetmask), PLT)
|
||||
|
||||
add sp, sp, #4 /* unalign the stack */
|
||||
ldmfd sp!, {r0, r1, r14}
|
||||
|
||||
add r0, r0, #4
|
||||
#ifdef SOFTFLOAT
|
||||
add r0, r0, #52
|
||||
#else
|
||||
/* Restore fp registers */
|
||||
lfm f4, 4, [r0], #48
|
||||
/* Restore FPSR */
|
||||
ldr r4, [r0], #0x0004
|
||||
wfs r4
|
||||
#endif /* SOFTFLOAT */
|
||||
/* Restore integer registers */
|
||||
ldmia r0, {r4-r14}
|
||||
|
||||
/* Validate sp and r14 */
|
||||
teq sp, #0
|
||||
teqne r14, #0
|
||||
beq botch
|
||||
|
||||
/* Set return value */
|
||||
|
||||
mov r0, r1
|
||||
teq r0, #0x00000000
|
||||
moveq r0, #0x00000001
|
||||
bx lr
|
||||
#ifdef __ARM_26__
|
||||
mov r15, r14
|
||||
#else
|
||||
mov r15, r14
|
||||
#endif
|
||||
|
||||
/* validation failed, die die die. */
|
||||
botch:
|
||||
bl PIC_SYM(_C_LABEL(longjmperror), PLT)
|
||||
bl PIC_SYM(_C_LABEL(abort), PLT)
|
||||
b . - 8 /* Cannot get here */
|
@ -1,62 +0,0 @@
|
||||
/* $OpenBSD: sigsetjmp.S,v 1.2 2004/02/01 05:40:52 drahn Exp $ */
|
||||
/* $NetBSD: sigsetjmp.S,v 1.3 2002/08/17 19:54:30 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Mark Brinicombe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Brinicombe
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <machine/setjmp.h>
|
||||
|
||||
/*
|
||||
* C library -- sigsetjmp, siglongjmp
|
||||
*
|
||||
* longjmp(a,v)
|
||||
* will generate a "return(v)" from the last call to
|
||||
* setjmp(a, m)
|
||||
* by restoring registers from the stack.
|
||||
* The previous signal state is restored.
|
||||
*/
|
||||
|
||||
ENTRY(sigsetjmp)
|
||||
teq r1, #0
|
||||
beq PIC_SYM(_C_LABEL(_setjmp), PLT)
|
||||
b PIC_SYM(_C_LABEL(setjmp), PLT)
|
||||
|
||||
.L_setjmp_magic:
|
||||
.word _JB_MAGIC__SETJMP
|
||||
|
||||
ENTRY(siglongjmp)
|
||||
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)
|
@ -1,129 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <machine/cpu-features.h>
|
||||
|
||||
size_t strlen(const char *s)
|
||||
{
|
||||
__builtin_prefetch(s);
|
||||
__builtin_prefetch(s+32);
|
||||
|
||||
union {
|
||||
const char *b;
|
||||
const uint32_t *w;
|
||||
uintptr_t i;
|
||||
} u;
|
||||
|
||||
// these are some scratch variables for the asm code below
|
||||
uint32_t v, t;
|
||||
|
||||
// initialize the string length to zero
|
||||
size_t l = 0;
|
||||
|
||||
// align the pointer to a 32-bit word boundary
|
||||
u.b = s;
|
||||
while (u.i & 0x3) {
|
||||
if (__builtin_expect(*u.b++ == 0, 0)) {
|
||||
goto done;
|
||||
}
|
||||
l++;
|
||||
}
|
||||
|
||||
// loop for each word, testing if it contains a zero byte
|
||||
// if so, exit the loop and update the length.
|
||||
// We need to process 32 bytes per loop to schedule PLD properly
|
||||
// and achieve the maximum bus speed.
|
||||
asm(
|
||||
"ldr %[v], [ %[s] ], #4 \n"
|
||||
"sub %[l], %[l], %[s] \n"
|
||||
"0: \n"
|
||||
#if __ARM_HAVE_PLD
|
||||
"pld [ %[s], #64 ] \n"
|
||||
#endif
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
#if !defined(__OPTIMIZE_SIZE__)
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
"bne 1f \n"
|
||||
"sub %[t], %[v], %[mask], lsr #7\n"
|
||||
"and %[t], %[t], %[mask] \n"
|
||||
"bics %[t], %[t], %[v] \n"
|
||||
"ldreq %[v], [ %[s] ], #4 \n"
|
||||
#endif
|
||||
"beq 0b \n"
|
||||
"1: \n"
|
||||
"add %[l], %[l], %[s] \n"
|
||||
"tst %[v], #0xFF \n"
|
||||
"beq 2f \n"
|
||||
"add %[l], %[l], #1 \n"
|
||||
"tst %[v], #0xFF00 \n"
|
||||
"beq 2f \n"
|
||||
"add %[l], %[l], #1 \n"
|
||||
"tst %[v], #0xFF0000 \n"
|
||||
"addne %[l], %[l], #1 \n"
|
||||
"2: \n"
|
||||
: [l]"=&r"(l), [v]"=&r"(v), [t]"=&r"(t), [s]"=&r"(u.b)
|
||||
: "%[l]"(l), "%[s]"(u.b), [mask]"r"(0x80808080UL)
|
||||
: "cc"
|
||||
);
|
||||
|
||||
done:
|
||||
return l;
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.type syscall,#function
|
||||
.globl syscall
|
||||
|
||||
.text
|
||||
.align
|
||||
|
||||
#if __ARM_EABI__
|
||||
|
||||
syscall:
|
||||
mov ip, sp
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
mov r7, r0
|
||||
mov r0, r1
|
||||
mov r1, r2
|
||||
mov r2, r3
|
||||
ldmfd ip, {r3, r4, r5, r6}
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
|
||||
#else
|
||||
|
||||
#ifndef __NR_syscall
|
||||
#define __NR_syscall 113
|
||||
#endif
|
||||
|
||||
syscall:
|
||||
stmfd sp!, {r4, r5, lr}
|
||||
ldr r4, [sp, #12]
|
||||
ldr r5, [sp, #16]
|
||||
swi __NR_syscall
|
||||
ldmfd sp!, {r4, r5, lr}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
|
||||
#endif
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
/* unlike our auto-generated syscall stubs, this code saves lr
|
||||
on the stack, as well as a few other registers. this makes
|
||||
our stack unwinder happy, when we generate debug stack
|
||||
traces after the C library or other parts of the system
|
||||
abort due to a fatal runtime error (e.g. detection
|
||||
of a corrupted malloc heap).
|
||||
*/
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
#ifndef __NR_tkill
|
||||
#define __NR_tkill 238
|
||||
#endif
|
||||
|
||||
.text
|
||||
.type tkill, #function
|
||||
.globl tkill
|
||||
.align 4
|
||||
|
||||
tkill:
|
||||
stmfd sp!, {r4-r7, ip, lr}
|
||||
ldr r7, =__NR_tkill
|
||||
swi #0
|
||||
ldmfd sp!, {r4-r7, ip, lr}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
@ -1,10 +0,0 @@
|
||||
/* $OpenBSD: endian.h,v 1.3 2005/12/13 00:35:23 millert Exp $ */
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define _BYTE_ORDER _BIG_ENDIAN
|
||||
#else
|
||||
#define _BYTE_ORDER _LITTLE_ENDIAN
|
||||
#endif
|
||||
#define __STRICT_ALIGNMENT
|
||||
#include <sys/types.h>
|
||||
#include <sys/endian.h>
|
@ -1,127 +0,0 @@
|
||||
/* $OpenBSD: _types.h,v 1.3 2006/02/14 18:12:58 miod Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
* @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
*/
|
||||
|
||||
#ifndef _ARM__TYPES_H_
|
||||
#define _ARM__TYPES_H_
|
||||
|
||||
|
||||
#if !defined(__ARM_EABI__)
|
||||
/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */
|
||||
#define _SIZE_T
|
||||
#define _SSIZE_T
|
||||
#define _PTRDIFF_T
|
||||
typedef unsigned long size_t;
|
||||
typedef long ssize_t;
|
||||
typedef long ptrdiff_t;
|
||||
#endif
|
||||
|
||||
//#include <linux/types.h>
|
||||
|
||||
/* 7.18.1.1 Exact-width integer types */
|
||||
typedef __signed char __int8_t;
|
||||
typedef unsigned char __uint8_t;
|
||||
typedef short __int16_t;
|
||||
typedef unsigned short __uint16_t;
|
||||
typedef int __int32_t;
|
||||
typedef unsigned int __uint32_t;
|
||||
/* LONGLONG */
|
||||
typedef long long __int64_t;
|
||||
/* LONGLONG */
|
||||
typedef unsigned long long __uint64_t;
|
||||
|
||||
/* 7.18.1.2 Minimum-width integer types */
|
||||
typedef __int8_t __int_least8_t;
|
||||
typedef __uint8_t __uint_least8_t;
|
||||
typedef __int16_t __int_least16_t;
|
||||
typedef __uint16_t __uint_least16_t;
|
||||
typedef __int32_t __int_least32_t;
|
||||
typedef __uint32_t __uint_least32_t;
|
||||
typedef __int64_t __int_least64_t;
|
||||
typedef __uint64_t __uint_least64_t;
|
||||
|
||||
/* 7.18.1.3 Fastest minimum-width integer types */
|
||||
typedef __int32_t __int_fast8_t;
|
||||
typedef __uint32_t __uint_fast8_t;
|
||||
typedef __int32_t __int_fast16_t;
|
||||
typedef __uint32_t __uint_fast16_t;
|
||||
typedef __int32_t __int_fast32_t;
|
||||
typedef __uint32_t __uint_fast32_t;
|
||||
typedef __int64_t __int_fast64_t;
|
||||
typedef __uint64_t __uint_fast64_t;
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers */
|
||||
typedef int __intptr_t;
|
||||
typedef unsigned int __uintptr_t;
|
||||
|
||||
/* 7.18.1.5 Greatest-width integer types */
|
||||
typedef __int64_t __intmax_t;
|
||||
typedef __uint64_t __uintmax_t;
|
||||
|
||||
/* Register size */
|
||||
typedef __int32_t __register_t;
|
||||
|
||||
/* VM system types */
|
||||
typedef unsigned long __vaddr_t;
|
||||
typedef unsigned long __paddr_t;
|
||||
typedef unsigned long __vsize_t;
|
||||
typedef unsigned long __psize_t;
|
||||
|
||||
/* Standard system types */
|
||||
typedef int __clock_t;
|
||||
typedef int __clockid_t;
|
||||
typedef long __ptrdiff_t;
|
||||
typedef int __time_t;
|
||||
typedef int __timer_t;
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
typedef __builtin_va_list __va_list;
|
||||
#else
|
||||
typedef char * __va_list;
|
||||
#endif
|
||||
|
||||
/* Wide character support types */
|
||||
#ifndef __cplusplus
|
||||
typedef int __wchar_t;
|
||||
#endif
|
||||
typedef int __wint_t;
|
||||
typedef int __rune_t;
|
||||
typedef void * __wctrans_t;
|
||||
typedef void * __wctype_t;
|
||||
|
||||
#ifdef __ARMEB__
|
||||
#define _BYTE_ORDER _BIG_ENDIAN
|
||||
#else
|
||||
#define _BYTE_ORDER _LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#endif /* _ARM__TYPES_H_ */
|
@ -1,130 +0,0 @@
|
||||
/* $OpenBSD: asm.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
|
||||
/* $NetBSD: asm.h,v 1.4 2001/07/16 05:43:32 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* William Jolitz.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)asm.h 5.5 (Berkeley) 5/7/91
|
||||
*/
|
||||
|
||||
#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:
|
||||
|
||||
#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 ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
|
||||
#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
|
||||
|
||||
#define ASMSTR .asciz
|
||||
|
||||
#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
|
||||
#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_ */
|
@ -1,19 +0,0 @@
|
||||
/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:44 deraadt Exp $ */
|
||||
|
||||
#ifndef _MACHINE_CDEFS_H_
|
||||
#define _MACHINE_CDEFS_H_
|
||||
|
||||
#if defined(lint)
|
||||
#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
|
||||
#define __warn_references(sym,msg)
|
||||
#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
|
||||
#elif defined(__GNUC__) && defined(__STDC__)
|
||||
#define __weak_alias(alias,sym) \
|
||||
__asm__(".weak " __STRING(alias) " ; " __STRING(alias) \
|
||||
" = " __STRING(sym));
|
||||
#define __warn_references(sym,msg) \
|
||||
__asm__(".section .gnu.warning." __STRING(sym) \
|
||||
" ; .ascii \"" msg "\" ; .text");
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_CDEFS_H_ */
|
@ -1,164 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef _ARM_MACHINE_CPU_FEATURES_H
|
||||
#define _ARM_MACHINE_CPU_FEATURES_H
|
||||
|
||||
/* The purpose of this file is to define several macros corresponding
|
||||
* to CPU features that may or may not be available at build time on
|
||||
* on the target CPU.
|
||||
*
|
||||
* This is done to abstract us from the various ARM Architecture
|
||||
* quirks and alphabet soup.
|
||||
*
|
||||
* IMPORTANT: We have no intention to support anything below an ARMv4T !
|
||||
*/
|
||||
|
||||
/* _ARM_ARCH_REVISION is a number corresponding to the ARM revision
|
||||
* we're going to support
|
||||
*
|
||||
* it looks like our toolchain doesn't define __ARM_ARCH__
|
||||
* so try to guess it.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#ifndef __ARM_ARCH__
|
||||
|
||||
# if defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ || \
|
||||
defined __ARM_ARCH_7R__ || defined __ARM_ARCH_7M__
|
||||
|
||||
# define __ARM_ARCH__ 7
|
||||
|
||||
# elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ || \
|
||||
defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6Z__ || \
|
||||
defined __ARM_ARCH_6KZ__ || defined __ARM_ARCH_6T2__
|
||||
#
|
||||
# define __ARM_ARCH__ 6
|
||||
#
|
||||
# elif defined __ARM_ARCH_5__ || defined __ARM_ARCH_5T__ || \
|
||||
defined __ARM_ARCH_5TE__ || defined __ARM_ARCH_5TEJ__
|
||||
#
|
||||
# define __ARM_ARCH__ 5
|
||||
#
|
||||
# elif defined __ARM_ARCH_4T__
|
||||
#
|
||||
# define __ARM_ARCH__ 4
|
||||
#
|
||||
# elif defined __ARM_ARCH_4__
|
||||
# error ARMv4 is not supported, please use ARMv4T at a minimum
|
||||
# else
|
||||
# error Unknown or unsupported ARM architecture
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* experimental feature used to check that our ARMv4 workarounds
|
||||
* work correctly without a real ARMv4 machine */
|
||||
#ifdef BIONIC_EXPERIMENTAL_FORCE_ARMV4
|
||||
# undef __ARM_ARCH__
|
||||
# define __ARM_ARCH__ 4
|
||||
#endif
|
||||
|
||||
/* define __ARM_HAVE_5TE if we have the ARMv5TE instructions */
|
||||
#if __ARM_ARCH__ > 5
|
||||
# define __ARM_HAVE_5TE 1
|
||||
#elif __ARM_ARCH__ == 5
|
||||
# if defined __ARM_ARCH_5TE__ || defined __ARM_ARCH_5TEJ__
|
||||
# define __ARM_HAVE_5TE 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* instructions introduced in ARMv5 */
|
||||
#if __ARM_ARCH__ >= 5
|
||||
# define __ARM_HAVE_BLX 1
|
||||
# define __ARM_HAVE_CLZ 1
|
||||
# define __ARM_HAVE_LDC2 1
|
||||
# define __ARM_HAVE_MCR2 1
|
||||
# define __ARM_HAVE_MRC2 1
|
||||
# define __ARM_HAVE_STC2 1
|
||||
#endif
|
||||
|
||||
/* ARMv5TE introduces a few instructions */
|
||||
#if __ARM_HAVE_5TE
|
||||
# define __ARM_HAVE_PLD 1
|
||||
# define __ARM_HAVE_MCRR 1
|
||||
# define __ARM_HAVE_MRRC 1
|
||||
#endif
|
||||
|
||||
/* define __ARM_HAVE_HALFWORD_MULTIPLY when half-word multiply instructions
|
||||
* this means variants of: smul, smulw, smla, smlaw, smlal
|
||||
*/
|
||||
#if __ARM_HAVE_5TE
|
||||
# define __ARM_HAVE_HALFWORD_MULTIPLY 1
|
||||
#endif
|
||||
|
||||
/* define __ARM_HAVE_PAIR_LOAD_STORE when 64-bit memory loads and stored
|
||||
* into/from a pair of 32-bit registers is supported throuhg 'ldrd' and 'strd'
|
||||
*/
|
||||
#if __ARM_HAVE_5TE
|
||||
# define __ARM_HAVE_PAIR_LOAD_STORE 1
|
||||
#endif
|
||||
|
||||
/* define __ARM_HAVE_SATURATED_ARITHMETIC is you have the saturated integer
|
||||
* arithmetic instructions: qdd, qdadd, qsub, qdsub
|
||||
*/
|
||||
#if __ARM_HAVE_5TE
|
||||
# define __ARM_HAVE_SATURATED_ARITHMETIC 1
|
||||
#endif
|
||||
|
||||
/* define __ARM_HAVE_PC_INTERWORK when a direct assignment to the
|
||||
* pc register will switch into thumb/ARM mode depending on bit 0
|
||||
* of the new instruction address. Before ARMv5, this was not the
|
||||
* case, and you have to write:
|
||||
*
|
||||
* mov r0, [<some address>]
|
||||
* bx r0
|
||||
*
|
||||
* instead of:
|
||||
*
|
||||
* ldr pc, [<some address>]
|
||||
*
|
||||
* note that this affects any instruction that explicitely changes the
|
||||
* value of the pc register, including ldm { ...,pc } or 'add pc, #offset'
|
||||
*/
|
||||
#if __ARM_ARCH__ >= 5
|
||||
# define __ARM_HAVE_PC_INTERWORK
|
||||
#endif
|
||||
|
||||
|
||||
/* Assembly-only macros */
|
||||
|
||||
/* define a handy PLD(address) macro since the cache preload
|
||||
* is an optional opcode
|
||||
*/
|
||||
#if __ARM_HAVE_PLD
|
||||
# define PLD(reg,offset) pld [reg, offset]
|
||||
#else
|
||||
# define PLD(reg,offset) /* nothing */
|
||||
#endif
|
||||
|
||||
#endif /* _ARM_MACHINE_CPU_FEATURES_H */
|
@ -1,50 +0,0 @@
|
||||
/* $OpenBSD: exec.h,v 1.9 2003/04/17 03:42:14 drahn Exp $ */
|
||||
/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_EXEC_H_
|
||||
#define _ARM_EXEC_H_
|
||||
|
||||
#define __LDPGSZ 4096
|
||||
|
||||
#define NATIVE_EXEC_ELF
|
||||
|
||||
#define ARCH_ELFSIZE 32
|
||||
|
||||
#define ELF_TARG_CLASS ELFCLASS32
|
||||
#define ELF_TARG_DATA ELFDATA2LSB
|
||||
#define ELF_TARG_MACH EM_ARM
|
||||
|
||||
#define _NLIST_DO_AOUT
|
||||
#define _NLIST_DO_ELF
|
||||
|
||||
#define _KERN_DO_AOUT
|
||||
#define _KERN_DO_ELF
|
||||
|
||||
#endif /* _ARM_EXEC_H_ */
|
@ -1,191 +0,0 @@
|
||||
/* $OpenBSD: ieee.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
|
||||
/* $NetBSD: ieee.h,v 1.2 2001/02/21 17:43:50 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This software was developed by the Computer Systems Engineering group
|
||||
* at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
|
||||
* contributed to Berkeley.
|
||||
*
|
||||
* All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Lawrence Berkeley Laboratory.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* @(#)ieee.h 8.1 (Berkeley) 6/11/93
|
||||
*/
|
||||
|
||||
/*
|
||||
* ieee.h defines the machine-dependent layout of the machine's IEEE
|
||||
* floating point.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Define the number of bits in each fraction and exponent.
|
||||
*
|
||||
* k k+1
|
||||
* Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented
|
||||
*
|
||||
* (-exp_bias+1)
|
||||
* as fractions that look like 0.fffff x 2 . This means that
|
||||
*
|
||||
* -126
|
||||
* the number 0.10000 x 2 , for instance, is the same as the normalized
|
||||
*
|
||||
* -127 -128
|
||||
* float 1.0 x 2 . Thus, to represent 2 , we need one leading zero
|
||||
*
|
||||
* -129
|
||||
* in the fraction; to represent 2 , we need two, and so on. This
|
||||
*
|
||||
* (-exp_bias-fracbits+1)
|
||||
* implies that the smallest denormalized number is 2
|
||||
*
|
||||
* for whichever format we are talking about: for single precision, for
|
||||
*
|
||||
* -126 -149
|
||||
* instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and
|
||||
*
|
||||
* -149 == -127 - 23 + 1.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The ARM has two sets of FP data formats. The FPA supports 32-bit, 64-bit
|
||||
* and 96-bit IEEE formats, with the words in big-endian order. VFP supports
|
||||
* 32-bin and 64-bit IEEE formats with the words in the CPU's native byte
|
||||
* order.
|
||||
*
|
||||
* The FPA also has two packed decimal formats, but we ignore them here.
|
||||
*/
|
||||
|
||||
#define SNG_EXPBITS 8
|
||||
#define SNG_FRACBITS 23
|
||||
|
||||
#define DBL_EXPBITS 11
|
||||
#define DBL_FRACBITS 52
|
||||
|
||||
#ifndef __VFP_FP__
|
||||
#define E80_EXPBITS 15
|
||||
#define E80_FRACBITS 64
|
||||
|
||||
#define EXT_EXPBITS 15
|
||||
#define EXT_FRACBITS 112
|
||||
#endif
|
||||
|
||||
struct ieee_single {
|
||||
u_int sng_frac:23;
|
||||
u_int sng_exponent:8;
|
||||
u_int sng_sign:1;
|
||||
};
|
||||
|
||||
#ifdef __VFP_FP__
|
||||
struct ieee_double {
|
||||
#ifdef __ARMEB__
|
||||
u_int dbl_sign:1;
|
||||
u_int dbl_exp:11;
|
||||
u_int dbl_frach:20;
|
||||
u_int dbl_fracl;
|
||||
#else /* !__ARMEB__ */
|
||||
u_int dbl_fracl;
|
||||
u_int dbl_frach:20;
|
||||
u_int dbl_exp:11;
|
||||
u_int dbl_sign:1;
|
||||
#endif /* !__ARMEB__ */
|
||||
};
|
||||
#else /* !__VFP_FP__ */
|
||||
struct ieee_double {
|
||||
u_int dbl_frach:20;
|
||||
u_int dbl_exp:11;
|
||||
u_int dbl_sign:1;
|
||||
u_int dbl_fracl;
|
||||
};
|
||||
|
||||
union ieee_double_u {
|
||||
double dblu_d;
|
||||
struct ieee_double dblu_dbl;
|
||||
};
|
||||
|
||||
|
||||
struct ieee_e80 {
|
||||
u_int e80_exp:15;
|
||||
u_int e80_zero:16;
|
||||
u_int e80_sign:1;
|
||||
u_int e80_frach:31;
|
||||
u_int e80_j:1;
|
||||
u_int e80_fracl;
|
||||
};
|
||||
|
||||
struct ieee_ext {
|
||||
u_int ext_frach:16;
|
||||
u_int ext_exp:15;
|
||||
u_int ext_sign:1;
|
||||
u_int ext_frachm;
|
||||
u_int ext_fraclm;
|
||||
u_int ext_fracl;
|
||||
};
|
||||
#endif /* !__VFP_FP__ */
|
||||
|
||||
/*
|
||||
* Floats whose exponent is in [1..INFNAN) (of whatever type) are
|
||||
* `normal'. Floats whose exponent is INFNAN are either Inf or NaN.
|
||||
* Floats whose exponent is zero are either zero (iff all fraction
|
||||
* bits are zero) or subnormal values.
|
||||
*
|
||||
* A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
|
||||
* high fraction; if the bit is set, it is a `quiet NaN'.
|
||||
*/
|
||||
#define SNG_EXP_INFNAN 255
|
||||
#define DBL_EXP_INFNAN 2047
|
||||
#ifndef __VFP_FP__
|
||||
#define E80_EXP_INFNAN 32767
|
||||
#define EXT_EXP_INFNAN 32767
|
||||
#endif /* !__VFP_FP__ */
|
||||
|
||||
#if 0
|
||||
#define SNG_QUIETNAN (1 << 22)
|
||||
#define DBL_QUIETNAN (1 << 19)
|
||||
#ifndef __VFP_FP__
|
||||
#define E80_QUIETNAN (1 << 15)
|
||||
#define EXT_QUIETNAN (1 << 15)
|
||||
#endif /* !__VFP_FP__ */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Exponent biases.
|
||||
*/
|
||||
#define SNG_EXP_BIAS 127
|
||||
#define DBL_EXP_BIAS 1023
|
||||
#ifndef __VFP_FP__
|
||||
#define E80_EXP_BIAS 16383
|
||||
#define EXT_EXP_BIAS 16383
|
||||
#endif /* !__VFP_FP__ */
|
@ -1,10 +0,0 @@
|
||||
/* $OpenBSD: internal_types.h,v 1.2 2004/05/06 15:53:39 drahn Exp $ */
|
||||
/* Public domain */
|
||||
#ifndef _ARM_INTERNAL_TYPES_H_
|
||||
#define _ARM_INTERNAL_TYPES_H_
|
||||
|
||||
#ifdef __CHAR_UNSIGNED__
|
||||
#define __machine_has_unsigned_chars
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef _ARCH_ARM_KERNEL_H
|
||||
#define _ARCH_ARM_KERNEL_H
|
||||
|
||||
/* this file contains kernel-specific definitions that were optimized out of
|
||||
our processed kernel headers, but still useful nonetheless... */
|
||||
|
||||
typedef unsigned long __kernel_blkcnt_t;
|
||||
typedef unsigned long __kernel_blksize_t;
|
||||
|
||||
/* these aren't really defined by the kernel headers though... */
|
||||
typedef unsigned long __kernel_fsblkcnt_t;
|
||||
typedef unsigned long __kernel_fsfilcnt_t;
|
||||
typedef unsigned int __kernel_id_t;
|
||||
|
||||
#endif /* _ARCH_ARM_KERNEL_H */
|
@ -1,63 +0,0 @@
|
||||
/* $OpenBSD: limits.h,v 1.3 2006/01/06 22:48:46 millert Exp $ */
|
||||
/* $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
|
||||
*
|
||||
* from: @(#)limits.h 7.2 (Berkeley) 6/28/90
|
||||
*/
|
||||
|
||||
#ifndef _ARM32_LIMITS_H_
|
||||
#define _ARM32_LIMITS_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define MB_LEN_MAX 1 /* no multibyte characters */
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX UINT_MAX /* max value for a size_t */
|
||||
#endif
|
||||
#ifndef SSIZE_MAX
|
||||
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
|
||||
#endif
|
||||
|
||||
#if __BSD_VISIBLE
|
||||
#define SIZE_T_MAX UINT_MAX /* max value for a size_t (historic) */
|
||||
|
||||
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
|
||||
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
|
||||
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
|
||||
|
||||
#endif /* __BSD_VISIBLE */
|
||||
|
||||
#define LONGLONG_BIT 64
|
||||
#define LONGLONG_MIN (-9223372036854775807LL-1)
|
||||
#define LONGLONG_MAX 9223372036854775807LL
|
||||
#define ULONGLONG_MAX 18446744073709551615ULL
|
||||
|
||||
#endif /* _ARM32_LIMITS_H_ */
|
@ -1,87 +0,0 @@
|
||||
/* $OpenBSD: setjmp.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
|
||||
/* $NetBSD: setjmp.h,v 1.2 2001/08/25 14:45:59 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* machine/setjmp.h: machine dependent setjmp-related information.
|
||||
*/
|
||||
|
||||
#ifdef __ELF__
|
||||
#define _JBLEN 64 /* size, in longs, of a jmp_buf */
|
||||
#else
|
||||
#define _JBLEN 29 /* size, in longs, of a jmp_buf */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: The internal structure of a jmp_buf is *PRIVATE*
|
||||
* This information is provided as there is software
|
||||
* that fiddles with this with obtain the stack pointer
|
||||
* (yes really ! and its commercial !).
|
||||
*
|
||||
* Description of the setjmp buffer
|
||||
*
|
||||
* word 0 magic number (dependant on creator)
|
||||
* 1 - 3 f4 fp register 4
|
||||
* 4 - 6 f5 fp register 5
|
||||
* 7 - 9 f6 fp register 6
|
||||
* 10 - 12 f7 fp register 7
|
||||
* 13 fpsr fp status register
|
||||
* 14 r4 register 4
|
||||
* 15 r5 register 5
|
||||
* 16 r6 register 6
|
||||
* 17 r7 register 7
|
||||
* 18 r8 register 8
|
||||
* 19 r9 register 9
|
||||
* 20 r10 register 10 (sl)
|
||||
* 21 r11 register 11 (fp)
|
||||
* 22 r12 register 12 (ip)
|
||||
* 23 r13 register 13 (sp)
|
||||
* 24 r14 register 14 (lr)
|
||||
* 25 signal mask (dependant on magic)
|
||||
* 26 (con't)
|
||||
* 27 (con't)
|
||||
* 28 (con't)
|
||||
*
|
||||
* The magic number number identifies the jmp_buf and
|
||||
* how the buffer was created as well as providing
|
||||
* a sanity check
|
||||
*
|
||||
* A side note I should mention - Please do not tamper
|
||||
* with the floating point fields. While they are
|
||||
* always saved and restored at the moment this cannot
|
||||
* be garenteed especially if the compiler happens
|
||||
* to be generating soft-float code so no fp
|
||||
* registers will be used.
|
||||
*
|
||||
* Whilst this can be seen an encouraging people to
|
||||
* use the setjmp buffer in this way I think that it
|
||||
* is for the best then if changes occur compiles will
|
||||
* break rather than just having new builds falling over
|
||||
* mysteriously.
|
||||
*/
|
||||
|
||||
#define _JB_MAGIC__SETJMP 0x4278f500
|
||||
#define _JB_MAGIC_SETJMP 0x4278f501
|
||||
|
||||
/* Valid for all jmp_buf's */
|
||||
|
||||
#define _JB_MAGIC 0
|
||||
#define _JB_REG_F4 1
|
||||
#define _JB_REG_F5 4
|
||||
#define _JB_REG_F6 7
|
||||
#define _JB_REG_F7 10
|
||||
#define _JB_REG_FPSR 13
|
||||
#define _JB_REG_R4 14
|
||||
#define _JB_REG_R5 15
|
||||
#define _JB_REG_R6 16
|
||||
#define _JB_REG_R7 17
|
||||
#define _JB_REG_R8 18
|
||||
#define _JB_REG_R9 19
|
||||
#define _JB_REG_R10 20
|
||||
#define _JB_REG_R11 21
|
||||
#define _JB_REG_R12 22
|
||||
#define _JB_REG_R13 23
|
||||
#define _JB_REG_R14 24
|
||||
|
||||
/* Only valid with the _JB_MAGIC_SETJMP magic */
|
||||
|
||||
#define _JB_SIGMASK 25
|
@ -1,170 +0,0 @@
|
||||
# auto-generated by gensyscalls.py, do not touch
|
||||
syscall_src :=
|
||||
syscall_src += arch-arm/syscalls/_exit.S
|
||||
syscall_src += arch-arm/syscalls/_exit_thread.S
|
||||
syscall_src += arch-arm/syscalls/__fork.S
|
||||
syscall_src += arch-arm/syscalls/waitid.S
|
||||
syscall_src += arch-arm/syscalls/__clone.S
|
||||
syscall_src += arch-arm/syscalls/execve.S
|
||||
syscall_src += arch-arm/syscalls/setuid.S
|
||||
syscall_src += arch-arm/syscalls/getuid.S
|
||||
syscall_src += arch-arm/syscalls/getgid.S
|
||||
syscall_src += arch-arm/syscalls/geteuid.S
|
||||
syscall_src += arch-arm/syscalls/getegid.S
|
||||
syscall_src += arch-arm/syscalls/getresuid.S
|
||||
syscall_src += arch-arm/syscalls/getresgid.S
|
||||
syscall_src += arch-arm/syscalls/gettid.S
|
||||
syscall_src += arch-arm/syscalls/getgroups.S
|
||||
syscall_src += arch-arm/syscalls/getpgid.S
|
||||
syscall_src += arch-arm/syscalls/getppid.S
|
||||
syscall_src += arch-arm/syscalls/setsid.S
|
||||
syscall_src += arch-arm/syscalls/setgid.S
|
||||
syscall_src += arch-arm/syscalls/setreuid.S
|
||||
syscall_src += arch-arm/syscalls/setresuid.S
|
||||
syscall_src += arch-arm/syscalls/setresgid.S
|
||||
syscall_src += arch-arm/syscalls/__brk.S
|
||||
syscall_src += arch-arm/syscalls/__ptrace.S
|
||||
syscall_src += arch-arm/syscalls/__getpriority.S
|
||||
syscall_src += arch-arm/syscalls/setpriority.S
|
||||
syscall_src += arch-arm/syscalls/setrlimit.S
|
||||
syscall_src += arch-arm/syscalls/getrlimit.S
|
||||
syscall_src += arch-arm/syscalls/getrusage.S
|
||||
syscall_src += arch-arm/syscalls/setgroups.S
|
||||
syscall_src += arch-arm/syscalls/setpgid.S
|
||||
syscall_src += arch-arm/syscalls/vfork.S
|
||||
syscall_src += arch-arm/syscalls/setregid.S
|
||||
syscall_src += arch-arm/syscalls/chroot.S
|
||||
syscall_src += arch-arm/syscalls/prctl.S
|
||||
syscall_src += arch-arm/syscalls/capget.S
|
||||
syscall_src += arch-arm/syscalls/capset.S
|
||||
syscall_src += arch-arm/syscalls/acct.S
|
||||
syscall_src += arch-arm/syscalls/read.S
|
||||
syscall_src += arch-arm/syscalls/write.S
|
||||
syscall_src += arch-arm/syscalls/__pread64.S
|
||||
syscall_src += arch-arm/syscalls/__pwrite64.S
|
||||
syscall_src += arch-arm/syscalls/__open.S
|
||||
syscall_src += arch-arm/syscalls/__openat.S
|
||||
syscall_src += arch-arm/syscalls/close.S
|
||||
syscall_src += arch-arm/syscalls/lseek.S
|
||||
syscall_src += arch-arm/syscalls/__llseek.S
|
||||
syscall_src += arch-arm/syscalls/getpid.S
|
||||
syscall_src += arch-arm/syscalls/__mmap2.S
|
||||
syscall_src += arch-arm/syscalls/munmap.S
|
||||
syscall_src += arch-arm/syscalls/mremap.S
|
||||
syscall_src += arch-arm/syscalls/msync.S
|
||||
syscall_src += arch-arm/syscalls/mprotect.S
|
||||
syscall_src += arch-arm/syscalls/madvise.S
|
||||
syscall_src += arch-arm/syscalls/mlock.S
|
||||
syscall_src += arch-arm/syscalls/munlock.S
|
||||
syscall_src += arch-arm/syscalls/mincore.S
|
||||
syscall_src += arch-arm/syscalls/__ioctl.S
|
||||
syscall_src += arch-arm/syscalls/readv.S
|
||||
syscall_src += arch-arm/syscalls/writev.S
|
||||
syscall_src += arch-arm/syscalls/__fcntl.S
|
||||
syscall_src += arch-arm/syscalls/flock.S
|
||||
syscall_src += arch-arm/syscalls/fchmod.S
|
||||
syscall_src += arch-arm/syscalls/dup.S
|
||||
syscall_src += arch-arm/syscalls/pipe.S
|
||||
syscall_src += arch-arm/syscalls/dup2.S
|
||||
syscall_src += arch-arm/syscalls/select.S
|
||||
syscall_src += arch-arm/syscalls/ftruncate.S
|
||||
syscall_src += arch-arm/syscalls/getdents.S
|
||||
syscall_src += arch-arm/syscalls/fsync.S
|
||||
syscall_src += arch-arm/syscalls/fchown.S
|
||||
syscall_src += arch-arm/syscalls/sync.S
|
||||
syscall_src += arch-arm/syscalls/__fcntl64.S
|
||||
syscall_src += arch-arm/syscalls/fstatfs.S
|
||||
syscall_src += arch-arm/syscalls/sendfile.S
|
||||
syscall_src += arch-arm/syscalls/fstatat.S
|
||||
syscall_src += arch-arm/syscalls/mkdirat.S
|
||||
syscall_src += arch-arm/syscalls/fchownat.S
|
||||
syscall_src += arch-arm/syscalls/fchmodat.S
|
||||
syscall_src += arch-arm/syscalls/renameat.S
|
||||
syscall_src += arch-arm/syscalls/link.S
|
||||
syscall_src += arch-arm/syscalls/unlink.S
|
||||
syscall_src += arch-arm/syscalls/unlinkat.S
|
||||
syscall_src += arch-arm/syscalls/chdir.S
|
||||
syscall_src += arch-arm/syscalls/mknod.S
|
||||
syscall_src += arch-arm/syscalls/chmod.S
|
||||
syscall_src += arch-arm/syscalls/chown.S
|
||||
syscall_src += arch-arm/syscalls/lchown.S
|
||||
syscall_src += arch-arm/syscalls/mount.S
|
||||
syscall_src += arch-arm/syscalls/umount2.S
|
||||
syscall_src += arch-arm/syscalls/fstat.S
|
||||
syscall_src += arch-arm/syscalls/stat.S
|
||||
syscall_src += arch-arm/syscalls/lstat.S
|
||||
syscall_src += arch-arm/syscalls/mkdir.S
|
||||
syscall_src += arch-arm/syscalls/readlink.S
|
||||
syscall_src += arch-arm/syscalls/rmdir.S
|
||||
syscall_src += arch-arm/syscalls/rename.S
|
||||
syscall_src += arch-arm/syscalls/__getcwd.S
|
||||
syscall_src += arch-arm/syscalls/access.S
|
||||
syscall_src += arch-arm/syscalls/symlink.S
|
||||
syscall_src += arch-arm/syscalls/fchdir.S
|
||||
syscall_src += arch-arm/syscalls/truncate.S
|
||||
syscall_src += arch-arm/syscalls/__statfs64.S
|
||||
syscall_src += arch-arm/syscalls/pause.S
|
||||
syscall_src += arch-arm/syscalls/gettimeofday.S
|
||||
syscall_src += arch-arm/syscalls/settimeofday.S
|
||||
syscall_src += arch-arm/syscalls/times.S
|
||||
syscall_src += arch-arm/syscalls/nanosleep.S
|
||||
syscall_src += arch-arm/syscalls/clock_gettime.S
|
||||
syscall_src += arch-arm/syscalls/clock_settime.S
|
||||
syscall_src += arch-arm/syscalls/clock_getres.S
|
||||
syscall_src += arch-arm/syscalls/clock_nanosleep.S
|
||||
syscall_src += arch-arm/syscalls/getitimer.S
|
||||
syscall_src += arch-arm/syscalls/setitimer.S
|
||||
syscall_src += arch-arm/syscalls/__timer_create.S
|
||||
syscall_src += arch-arm/syscalls/__timer_settime.S
|
||||
syscall_src += arch-arm/syscalls/__timer_gettime.S
|
||||
syscall_src += arch-arm/syscalls/__timer_getoverrun.S
|
||||
syscall_src += arch-arm/syscalls/__timer_delete.S
|
||||
syscall_src += arch-arm/syscalls/utimes.S
|
||||
syscall_src += arch-arm/syscalls/sigaction.S
|
||||
syscall_src += arch-arm/syscalls/sigprocmask.S
|
||||
syscall_src += arch-arm/syscalls/__sigsuspend.S
|
||||
syscall_src += arch-arm/syscalls/__rt_sigaction.S
|
||||
syscall_src += arch-arm/syscalls/__rt_sigprocmask.S
|
||||
syscall_src += arch-arm/syscalls/__rt_sigtimedwait.S
|
||||
syscall_src += arch-arm/syscalls/sigpending.S
|
||||
syscall_src += arch-arm/syscalls/socket.S
|
||||
syscall_src += arch-arm/syscalls/socketpair.S
|
||||
syscall_src += arch-arm/syscalls/bind.S
|
||||
syscall_src += arch-arm/syscalls/connect.S
|
||||
syscall_src += arch-arm/syscalls/listen.S
|
||||
syscall_src += arch-arm/syscalls/accept.S
|
||||
syscall_src += arch-arm/syscalls/getsockname.S
|
||||
syscall_src += arch-arm/syscalls/getpeername.S
|
||||
syscall_src += arch-arm/syscalls/sendto.S
|
||||
syscall_src += arch-arm/syscalls/recvfrom.S
|
||||
syscall_src += arch-arm/syscalls/shutdown.S
|
||||
syscall_src += arch-arm/syscalls/setsockopt.S
|
||||
syscall_src += arch-arm/syscalls/getsockopt.S
|
||||
syscall_src += arch-arm/syscalls/sendmsg.S
|
||||
syscall_src += arch-arm/syscalls/recvmsg.S
|
||||
syscall_src += arch-arm/syscalls/sched_setscheduler.S
|
||||
syscall_src += arch-arm/syscalls/sched_getscheduler.S
|
||||
syscall_src += arch-arm/syscalls/sched_yield.S
|
||||
syscall_src += arch-arm/syscalls/sched_setparam.S
|
||||
syscall_src += arch-arm/syscalls/sched_getparam.S
|
||||
syscall_src += arch-arm/syscalls/sched_get_priority_max.S
|
||||
syscall_src += arch-arm/syscalls/sched_get_priority_min.S
|
||||
syscall_src += arch-arm/syscalls/sched_rr_get_interval.S
|
||||
syscall_src += arch-arm/syscalls/uname.S
|
||||
syscall_src += arch-arm/syscalls/__wait4.S
|
||||
syscall_src += arch-arm/syscalls/umask.S
|
||||
syscall_src += arch-arm/syscalls/__reboot.S
|
||||
syscall_src += arch-arm/syscalls/__syslog.S
|
||||
syscall_src += arch-arm/syscalls/init_module.S
|
||||
syscall_src += arch-arm/syscalls/delete_module.S
|
||||
syscall_src += arch-arm/syscalls/klogctl.S
|
||||
syscall_src += arch-arm/syscalls/futex.S
|
||||
syscall_src += arch-arm/syscalls/epoll_create.S
|
||||
syscall_src += arch-arm/syscalls/epoll_ctl.S
|
||||
syscall_src += arch-arm/syscalls/epoll_wait.S
|
||||
syscall_src += arch-arm/syscalls/inotify_init.S
|
||||
syscall_src += arch-arm/syscalls/inotify_add_watch.S
|
||||
syscall_src += arch-arm/syscalls/inotify_rm_watch.S
|
||||
syscall_src += arch-arm/syscalls/poll.S
|
||||
syscall_src += arch-arm/syscalls/__set_tls.S
|
||||
syscall_src += arch-arm/syscalls/cacheflush.S
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __brk, #function
|
||||
.globl __brk
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__brk:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_brk
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __clone, #function
|
||||
.globl __clone
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__clone:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_clone
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __fcntl, #function
|
||||
.globl __fcntl
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__fcntl:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_fcntl
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __fcntl64, #function
|
||||
.globl __fcntl64
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__fcntl64:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_fcntl64
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __fork, #function
|
||||
.globl __fork
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__fork:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_fork
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __getcwd, #function
|
||||
.globl __getcwd
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__getcwd:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_getcwd
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __getpriority, #function
|
||||
.globl __getpriority
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__getpriority:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_getpriority
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __ioctl, #function
|
||||
.globl __ioctl
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__ioctl:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_ioctl
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,21 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __llseek, #function
|
||||
.globl __llseek
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__llseek:
|
||||
mov ip, sp
|
||||
.save {r4, r5, r6, r7}
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
ldmfd ip, {r4, r5, r6}
|
||||
ldr r7, =__NR__llseek
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,21 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __mmap2, #function
|
||||
.globl __mmap2
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__mmap2:
|
||||
mov ip, sp
|
||||
.save {r4, r5, r6, r7}
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
ldmfd ip, {r4, r5, r6}
|
||||
ldr r7, =__NR_mmap2
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __open, #function
|
||||
.globl __open
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__open:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_open
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __openat, #function
|
||||
.globl __openat
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__openat:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_openat
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,21 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __pread64, #function
|
||||
.globl __pread64
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__pread64:
|
||||
mov ip, sp
|
||||
.save {r4, r5, r6, r7}
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
ldmfd ip, {r4, r5, r6}
|
||||
ldr r7, =__NR_pread64
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __ptrace, #function
|
||||
.globl __ptrace
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__ptrace:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_ptrace
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,21 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __pwrite64, #function
|
||||
.globl __pwrite64
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__pwrite64:
|
||||
mov ip, sp
|
||||
.save {r4, r5, r6, r7}
|
||||
stmfd sp!, {r4, r5, r6, r7}
|
||||
ldmfd ip, {r4, r5, r6}
|
||||
ldr r7, =__NR_pwrite64
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r5, r6, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __reboot, #function
|
||||
.globl __reboot
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__reboot:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_reboot
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __rt_sigaction, #function
|
||||
.globl __rt_sigaction
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__rt_sigaction:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_rt_sigaction
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __rt_sigprocmask, #function
|
||||
.globl __rt_sigprocmask
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__rt_sigprocmask:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_rt_sigprocmask
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __rt_sigtimedwait, #function
|
||||
.globl __rt_sigtimedwait
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__rt_sigtimedwait:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_rt_sigtimedwait
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __set_tls, #function
|
||||
.globl __set_tls
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__set_tls:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_ARM_set_tls
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __sigsuspend, #function
|
||||
.globl __sigsuspend
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__sigsuspend:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_sigsuspend
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __statfs64, #function
|
||||
.globl __statfs64
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__statfs64:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_statfs64
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __syslog, #function
|
||||
.globl __syslog
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__syslog:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_syslog
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __timer_create, #function
|
||||
.globl __timer_create
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__timer_create:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_timer_create
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __timer_delete, #function
|
||||
.globl __timer_delete
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__timer_delete:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_timer_delete
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __timer_getoverrun, #function
|
||||
.globl __timer_getoverrun
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__timer_getoverrun:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_timer_getoverrun
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __timer_gettime, #function
|
||||
.globl __timer_gettime
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__timer_gettime:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_timer_gettime
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __timer_settime, #function
|
||||
.globl __timer_settime
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__timer_settime:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_timer_settime
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type __wait4, #function
|
||||
.globl __wait4
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
__wait4:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_wait4
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type _exit, #function
|
||||
.globl _exit
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
_exit:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_exit_group
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type _exit_thread, #function
|
||||
.globl _exit_thread
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
_exit_thread:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_exit
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type accept, #function
|
||||
.globl accept
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
accept:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_accept
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type access, #function
|
||||
.globl access
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
access:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_access
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type acct, #function
|
||||
.globl acct
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
acct:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_acct
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type bind, #function
|
||||
.globl bind
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
bind:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_bind
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type cacheflush, #function
|
||||
.globl cacheflush
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
cacheflush:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_ARM_cacheflush
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type capget, #function
|
||||
.globl capget
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
capget:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_capget
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type capset, #function
|
||||
.globl capset
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
capset:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_capset
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type chdir, #function
|
||||
.globl chdir
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
chdir:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_chdir
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type chmod, #function
|
||||
.globl chmod
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
chmod:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_chmod
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type chown, #function
|
||||
.globl chown
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
chown:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_chown32
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type chroot, #function
|
||||
.globl chroot
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
chroot:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_chroot
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type clock_getres, #function
|
||||
.globl clock_getres
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
clock_getres:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_clock_getres
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type clock_gettime, #function
|
||||
.globl clock_gettime
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
clock_gettime:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_clock_gettime
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type clock_nanosleep, #function
|
||||
.globl clock_nanosleep
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
clock_nanosleep:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_clock_nanosleep
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type clock_settime, #function
|
||||
.globl clock_settime
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
clock_settime:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_clock_settime
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type close, #function
|
||||
.globl close
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
close:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_close
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type connect, #function
|
||||
.globl connect
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
connect:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_connect
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type delete_module, #function
|
||||
.globl delete_module
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
delete_module:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_delete_module
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type dup, #function
|
||||
.globl dup
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
dup:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_dup
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type dup2, #function
|
||||
.globl dup2
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
dup2:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_dup2
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type epoll_create, #function
|
||||
.globl epoll_create
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
epoll_create:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_epoll_create
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type epoll_ctl, #function
|
||||
.globl epoll_ctl
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
epoll_ctl:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_epoll_ctl
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type epoll_wait, #function
|
||||
.globl epoll_wait
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
epoll_wait:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_epoll_wait
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type execve, #function
|
||||
.globl execve
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
execve:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_execve
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type fchdir, #function
|
||||
.globl fchdir
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
fchdir:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_fchdir
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type fchmod, #function
|
||||
.globl fchmod
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
fchmod:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_fchmod
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
@ -1,19 +0,0 @@
|
||||
/* autogenerated by gensyscalls.py */
|
||||
#include <sys/linux-syscalls.h>
|
||||
|
||||
.text
|
||||
.type fchmodat, #function
|
||||
.globl fchmodat
|
||||
.align 4
|
||||
.fnstart
|
||||
|
||||
fchmodat:
|
||||
.save {r4, r7}
|
||||
stmfd sp!, {r4, r7}
|
||||
ldr r7, =__NR_fchmodat
|
||||
swi #0
|
||||
ldmfd sp!, {r4, r7}
|
||||
movs r0, r0
|
||||
bxpl lr
|
||||
b __set_syscall_errno
|
||||
.fnend
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user