remove obsolete SuperH support
We don't have a toolchain anymore, we don't have working original
kernel headers, and nobody is maintaining this so there is really
no point in keeping this here. Details of the patch:
- removed code paths from Android.mk files related to the SuperH
architecture ("sh")
- removed libc/arch-sh, linker/arch-sh, libc/kernel/arch-sh
- simplified libc/SYSCALLS.TXT
- simplified the scripts in libc/tools/ and libc/kernel/tools
Change-Id: I26b0e1422bdc347489e4573e2fbec0e402f75560
Signed-off-by: David 'Digit' Turner <digit@android.com>
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py
index c188e04..bed9445 100755
--- a/libc/tools/gensyscalls.py
+++ b/libc/tools/gensyscalls.py
@@ -31,7 +31,7 @@
bionic_temp = "/tmp/bionic_gensyscalls/"
# all architectures, update as you see fit
-all_archs = [ "arm", "x86", "sh" ]
+all_archs = [ "arm", "x86" ]
def make_dir( path ):
if not os.path.exists(path):
@@ -183,63 +183,6 @@
.fnend
"""
-# SuperH assembler templates for each syscall stub
-#
-superh_header = """/* autogenerated by gensyscalls.py */
-#include <sys/linux-syscalls.h>
-
- .text
- .type %(fname)s, @function
- .globl %(fname)s
- .align 4
-
-%(fname)s:
-"""
-
-superh_call_default = """
- /* invoke trap */
- mov.l 0f, r3 /* trap num */
- trapa #(%(numargs)s + 0x10)
-
- /* check return value */
- cmp/pz r0
- bt %(idname)s_end
-
- /* keep error number */
- sts.l pr, @-r15
- mov.l 1f, r1
- jsr @r1
- mov r0, r4
- lds.l @r15+, pr
-
-%(idname)s_end:
- rts
- nop
-
- .align 2
-0: .long %(idname)s
-1: .long __set_syscall_errno
-"""
-
-superh_5args_header = """
- /* get ready for additonal arg */
- mov.l @r15, r0
-"""
-
-superh_6args_header = """
- /* get ready for additonal arg */
- mov.l @r15, r0
- mov.l @(4, r15), r1
-"""
-
-superh_7args_header = """
- /* get ready for additonal arg */
- mov.l @r15, r0
- mov.l @(4, r15), r1
- mov.l @(8, r15), r2
-"""
-
-
def param_uses_64bits(param):
"""Returns True iff a syscall parameter description corresponds
to a 64-bit type."""
@@ -437,10 +380,6 @@
E("cid for dispatch syscalls is only supported for x86 in "
"'%s'" % syscall_name)
return
- if t["id3"] >= 0:
- num_regs = count_generic_param_registers(syscall_params)
- t["asm-sh"] = self.superh_genstub(syscall_func,num_regs,"__NR_"+syscall_name)
-
def gen_NR_syscall(self,fp,name,id):
@@ -490,20 +429,6 @@
gen_syscalls[sc_name] = True
fp.write( "#endif\n" );
- # all superh-specific syscalls
- fp.write( "\n#if defined(__SH3__) || defined(__SH4__) \n" );
- for sc in self.syscalls:
- sc_id = sc["id"]
- sc_id2 = sc["id2"]
- sc_id3 = sc["id3"]
- sc_name = sc["name"]
- if sc_id2 != sc_id3 and sc_id3 >= 0:
- self.gen_NR_syscall( fp, sc_name, sc_id3 )
- else:
- if sc_id != sc_id2 and sc_id2 >= 0:
- self.gen_NR_syscall( fp, sc_name, sc_id2 )
- fp.write( "#endif\n" );
-
fp.write( "\n#endif\n" )
fp.write( "\n#endif /* _BIONIC_LINUX_SYSCALLS_H_ */\n" );
fp.close()
@@ -537,7 +462,6 @@
arch_test = {
"arm": lambda x: x.has_key("asm-arm") or x.has_key("asm-thumb"),
"x86": lambda x: x.has_key("asm-x86"),
- "sh": lambda x: x.has_key("asm-sh")
}
for sc in self.syscalls:
@@ -574,14 +498,6 @@
fp.close()
self.new_stubs.append( fname )
- if sc.has_key("asm-sh"):
- fname = "arch-sh/syscalls/%s.S" % sc["func"]
- D2( ">>> generating "+fname )
- fp = create_file( fname )
- fp.write(sc["asm-sh"])
- fp.close()
- self.new_stubs.append( fname )
-
def regenerate(self):
D( "scanning for existing architecture-specific stub files" )