source:
npl/system/klibc/patches/0002-add-mips64-support-arch-mips32.patch
@
ca72aba
Last change on this file since ca72aba was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 2.2 KB |
-
usr/klibc/arch/mips64/Kbuild
From: Dejan Latinovic <Dejan.Latinovic@imgtec.com> Date: Thu, 5 Mar 2015 16:51:44 -0800 Subject: [PATCH 2/3] add-mips64-support-arch-mips32 Origin: https://git.kernel.org/cgit/libs/klibc/klibc.git/commit/?id=ccd50880175e79fb9bc544c96d72b8971303cc0a Description: Add mips64 support, using existing mips32 code. - using mips32 assembler source files: pipe.S vfork.S syscall.S - sysstub.ph: copied over from klibc/arch/mips --- usr/klibc/arch/mips64/Kbuild | 11 +++++++++++ usr/klibc/arch/mips64/sysstub.ph | 29 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 usr/klibc/arch/mips64/sysstub.ph diff --git a/usr/klibc/arch/mips64/Kbuild b/usr/klibc/arch/mips64/Kbuild index 970c0f8..6fe3b53 100644
a b 1 1 # 2 2 # klibc files for mips64 3 3 # 4 5 klib-y := ../mips/pipe.o ../mips/vfork.o setjmp.o ../mips/syscall.o 6 7 klib-y += ../../libgcc/__clzsi2.o ../../libgcc/__ashldi3.o 8 klib-y += ../../libgcc/__ashrdi3.o ../../libgcc/__lshrdi3.o 9 klib-y += ../../libgcc/__divdi3.o ../../libgcc/__moddi3.o 10 klib-y += ../../libgcc/__udivdi3.o ../../libgcc/__umoddi3.o 11 klib-y += ../../libgcc/__udivmoddi4.o 12 13 always := crt0.o 14 targets := crt0.o -
new file usr/klibc/arch/mips64/sysstub.ph
diff --git a/usr/klibc/arch/mips64/sysstub.ph b/usr/klibc/arch/mips64/sysstub.ph new file mode 100644 index 0000000..e8a0200
- + 1 # -*- perl -*- 2 # 3 # arch/mips64/sysstub.ph 4 # 5 # Script to generate system call stubs 6 # 7 8 # On MIPS, most system calls follow the standard convention, with the 9 # system call number in r0 (v0), return an error value in r19 (a3) as 10 # well as the return value in r0 (v0). 11 12 sub make_sysstub($$$$$@) { 13 my($outputdir, $fname, $type, $sname, $stype, @args) = @_; 14 15 $stype = $stype || 'common'; 16 open(OUT, '>', "${outputdir}/${fname}.S"); 17 print OUT "#include <machine/asm.h>\n"; 18 print OUT "#include <asm/unistd.h>\n"; 19 print OUT "\n"; 20 print OUT "\t.set noreorder\n"; 21 print OUT "\n"; 22 print OUT "LEAF(${fname})\n"; 23 print OUT "\tj\t__syscall_${stype}\n"; 24 print OUT "\t li\tv0, __NR_${sname}\n"; 25 print OUT "\tEND(${fname})\n"; 26 close(OUT); 27 } 28 29 1;
Note: See TracBrowser
for help on using the repository browser.