Permalink
Browse files

delete obsolete files imported from armv5 and leave an empty asmacros…

….h file as the rest of klibc expects to find it.
  • Loading branch information...
1 parent fc21266 commit 61db0ec37a165ce2b75c846ec202c56159ebe6fe @codehelp committed Jan 13, 2013
@@ -1,5 +1,5 @@
/*
- * include/arch/arm/klibc/archconfig.h
+ * include/arch/aarch64/klibc/archconfig.h
*
* See include/klibc/sysconfig.h for the options that can be set in
* this file.
@@ -9,12 +9,6 @@
#ifndef _KLIBC_ARCHCONFIG_H
#define _KLIBC_ARCHCONFIG_H
-/* newer arm arch support bx instruction */
-#if (!defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__) \
- && !defined(__ARM_ARCH_3M__) && !defined(__ARM_ARCH_4__))
-# define _KLIBC_ARM_USE_BX 1
-#endif
-
/* Use rt_* signals */
#define _KLIBC_USE_RT_SIG 1
@@ -7,10 +7,5 @@
#ifndef _KLIBC_ASMMACROS_H
#define _KLIBC_ASMMACROS_H
-#if _KLIBC_ARM_USE_BX
-# define BX(x) bx x
-#else
-# define BX(x) mov pc, x
-#endif
#endif /* _KLIBC_ASMMACROS_H */
@@ -1,13 +1,7 @@
#
-# klibc files for arm
+# klibc files for aarch64
#
-klib-y := setjmp.o syscall.o vfork.o aeabi_nonsense.o
-
-klib-y += ../../libgcc/__udivmodsi4.o ../../libgcc/__divdi3.o
-klib-y += ../../libgcc/__moddi3.o ../../libgcc/__udivdi3.o
-klib-y += ../../libgcc/__umoddi3.o ../../libgcc/__udivmoddi4.o
-klib-y += ../../libgcc/__clzsi2.o
-
+klib-y := setjmp.o
always := crt0.o
targets := crt0.o
@@ -1,6 +1,6 @@
# -*- makefile -*-
#
-# arch/arm/MCONFIG
+# arch/aarch64/MCONFIG
#
# Special rules for this architecture. Note that this is actually
# included from the main Makefile, and that pathnames should be
@@ -11,13 +11,13 @@ CPU_ARCH ?= armv8-a
CPU_TUNE ?= generic
KLIBCOPTFLAGS += -Os -march=$(CPU_ARCH) -mtune=$(CPU_TUNE)
-KLIBCBITSIZE = 32
+KLIBCBITSIZE = 64
KLIBCREQFLAGS += -fno-exceptions
-KLIBCSTRIPFLAGS += -R .ARM.exidx
+#KLIBCSTRIPFLAGS += -R .ARM.exidx
# Extra linkflags when building the shared version of the library
# This address needs to be reachable using normal inter-module
# calls, and work on the memory models for this architecture
-KLIBCSHAREDFLAGS = -Ttext 0x01800200
-KLIBCREQFLAGS +=
-KLIBCOPTFLAGS += -mgeneral-regs-only
+#KLIBCSHAREDFLAGS = -Ttext 0x01800200
+#KLIBCREQFLAGS +=
+#KLIBCOPTFLAGS += -mgeneral-regs-only
@@ -1,15 +0,0 @@
-#include <stdint.h>
-
-uint64_t __muldi3(uint64_t a, uint64_t b)
-{
- uint32_t al = (uint32_t)a;
- uint32_t ah = (uint32_t)(a >> 32);
- uint32_t bl = (uint32_t)b;
- uint32_t bh = (uint32_t)(b >> 32);
- uint64_t v;
-
- v = (uint64_t)al * bl;
- v += (uint64_t)(al*bh+ah*bl) << 32;
-
- return v;
-}
@@ -1,9 +0,0 @@
- .text
- .globl __aeabi_unwind_cpp_pr0
-__aeabi_unwind_cpp_pr0:
- .globl __aeabi_unwind_cpp_pr1
-__aeabi_unwind_cpp_pr1:
- .globl __aeabi_unwind_cpp_pr2
-__aeabi_unwind_cpp_pr2:
- .globl __aeabi_unwind_cpp_pr3
-__aeabi_unwind_cpp_pr3:
@@ -1,7 +1,7 @@
#
-# arch/arm/setjmp.S
+# arch/aarch64/setjmp.S
#
-# setjmp/longjmp for the ARM architecture
+# setjmp/longjmp for the AARCH64 architecture
#
#include <klibc/asmmacros.h>
@@ -1,34 +0,0 @@
-/*
- * arch/arm/syscall.S
- *
- * System call common handling
- */
-
- .type __syscall_common,#function
- .globl __syscall_common
-
- /* ARM version - this is executed after the swi
- stack already populated
- load x4, x5 & x7 from the current stack in places
- set by the AARCH64 ABI.
- x64
- sp + 0 1 2 3 4 5 6 7 = sp
- sp + 8 9 10 11 12 13 14 15 = x4
- sp + 16 17 18 19 20 21 22 23 = x5
- sp + 24 25 26 27 28 29 30 31 = x7
- sp + 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 = lr
- */
-
- .balign 8
-__syscall_common:
-
- ldr x4, [sp,#32] : load x4 from the address of the stack pointer + 32
- ldr x5, [sp,#40] : load x5 from the address of the stack pointer + 40
- ldr x7, [lr] : load x7 from the address of the link register
- swi 0 : software interrupt 0
-
- ldmfd sp!,{x4,x5,x7,pc}
-
- .balign 8
-1:
- .word errno
@@ -1,6 +1,6 @@
# -*- perl -*-
#
-# arch/arm/sysstub.ph
+# arch/aarch64/sysstub.ph
#
# Script to generate system call stubs
#
@@ -11,18 +11,19 @@ sub make_sysstub($$$$$@) {
open(OUT, '>', "${outputdir}/${fname}.S");
print OUT "#include <asm/unistd.h>\n";
print OUT "#include <klibc/asmmacros.h>\n";
-
print OUT " .text\n";
print OUT " .type ${fname}, #function\n";
print OUT " .globl ${fname}\n";
-
print out " .balign 8\n";
print OUT "${fname}:\n";
- print OUT " stmfd sp!,{x4,x5,x7,lr}\n";
- print OUT " bl __syscall_common\n";
+ print OUT " mov x0,__NR_${sname}\n";
+ print OUT " svc 0\n";
print OUT " .word __NR_${sname}\n";
-
print OUT " .size ${fname},.-${fname}\n";
+# branch if not set
+# print OUT " b .__syscall_error\n";
+# print OUT " .size .${fname},.-.${fname}\n";
+
}
1;
@@ -1,29 +0,0 @@
-/*
- * arch/arm/vfork.S
- *
- * vfork - nasty system call which must not use the stack.
- */
-
-#include <klibc/asmmacros.h>
-#include <asm/unistd.h>
-
- .type vfork,#function
- .globl vfork
-
- .balign 4
-vfork:
- mov r3, r7
- mov r7, # __NR_vfork
- swi 0
- mov r7, r3
-
- cmn r0, #4096
- rsbcs r2, r0, #0
- ldrcs r3, 1f
- mvncs r0, #0
- strcs r2, [r3]
- BX(lr)
-
- .balign 4
-1:
- .word errno

0 comments on commit 61db0ec

Please sign in to comment.