source: npl/system/klibc/patches/0002-add-mips64-support-arch-mips32.patch @ 439f083

Last change on this file since 439f083 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
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  
    11#
    22# klibc files for mips64
    33#
     4
     5klib-y := ../mips/pipe.o ../mips/vfork.o setjmp.o ../mips/syscall.o
     6
     7klib-y += ../../libgcc/__clzsi2.o     ../../libgcc/__ashldi3.o
     8klib-y += ../../libgcc/__ashrdi3.o    ../../libgcc/__lshrdi3.o
     9klib-y += ../../libgcc/__divdi3.o     ../../libgcc/__moddi3.o
     10klib-y += ../../libgcc/__udivdi3.o    ../../libgcc/__umoddi3.o
     11klib-y += ../../libgcc/__udivmoddi4.o
     12
     13always  := crt0.o
     14targets := 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
     12sub 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
     291;
Note: See TracBrowser for help on using the repository browser.