source: npl/system/klibc/patches/0001-add-mips64-support-headers.patch @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c 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: 5.0 KB
  • usr/include/arch/mips64/klibc/archconfig.h

    From: Dejan Latinovic <Dejan.Latinovic@imgtec.com>
    Date: Thu, 5 Mar 2015 16:51:44 -0800
    Subject: [PATCH 1/3] add-mips64-support-headers
    Origin: https://git.kernel.org/cgit/libs/klibc/klibc.git/commit/?id=493f9a99220aed4eb7c6e3dd9018c037d45b13e2
    
    Description: Added header files for mips64.
    Modeled on mips 32 header files and adapted for 64 bit ABI.
     - archsetjmp.h: do not save floating-point state
     - asm.h:        Symbolic register names for 64 bit ABI
    ---
     usr/include/arch/mips64/klibc/archconfig.h |  5 ++
     usr/include/arch/mips64/klibc/archsetjmp.h | 26 ++++++++++
     usr/include/arch/mips64/machine/asm.h      | 82 ++++++++++++++++++++++++++++++
     usr/include/fcntl.h                        |  2 +-
     4 files changed, 114 insertions(+), 1 deletion(-)
     create mode 100644 usr/include/arch/mips64/klibc/archsetjmp.h
     create mode 100644 usr/include/arch/mips64/machine/asm.h
    
    diff --git a/usr/include/arch/mips64/klibc/archconfig.h b/usr/include/arch/mips64/klibc/archconfig.h
    index 4d856a5..df3cf1c 100644
    a b  
    1212/* MIPS has nonstandard socket definitions */
    1313#define _KLIBC_HAS_ARCHSOCKET_H 1
    1414
     15#define _KLIBC_STATFS_F_TYPE_64 1
     16
    1517/* We can use RT signals on MIPS */
    1618#define _KLIBC_USE_RT_SIG 1
    1719
     20/* MIPS has architecture-specific code for vfork() */
     21#define _KLIBC_REAL_VFORK 1
     22
    1823#endif                          /* _KLIBC_ARCHCONFIG_H */
  • new file usr/include/arch/mips64/klibc/archsetjmp.h

    diff --git a/usr/include/arch/mips64/klibc/archsetjmp.h b/usr/include/arch/mips64/klibc/archsetjmp.h
    new file mode 100644
    index 0000000..c4587dc
    - +  
     1/*
     2 * arch/mips64/include/klibc/archsetjmp.h
     3 */
     4
     5#ifndef _KLIBC_ARCHSETJMP_H
     6#define _KLIBC_ARCHSETJMP_H
     7
     8struct __jmp_buf {
     9        unsigned long __s0;
     10        unsigned long __s1;
     11        unsigned long __s2;
     12        unsigned long __s3;
     13        unsigned long __s4;
     14        unsigned long __s5;
     15        unsigned long __s6;
     16        unsigned long __s7;
     17        unsigned long __gp;
     18        unsigned long __sp;
     19        unsigned long __s8;
     20        unsigned long __ra;
     21        unsigned long __unused;
     22} __attribute__ ((aligned(8)));
     23
     24typedef struct __jmp_buf jmp_buf[1];
     25
     26#endif                          /* _KLIBC_ARCHSETJMP_H */
  • new file usr/include/arch/mips64/machine/asm.h

    diff --git a/usr/include/arch/mips64/machine/asm.h b/usr/include/arch/mips64/machine/asm.h
    new file mode 100644
    index 0000000..42dcaa4
    - +  
     1/*
     2 * arch/mips64/include/machine/asm.h
     3 */
     4
     5#ifndef _MACHINE_ASM_H
     6#define _MACHINE_ASM_H
     7
     8/*
     9 * Symbolic register names for 64 bit ABI
     10 */
     11
     12
     13#define zero    $0      /* wired zero */
     14#define AT      $at     /* assembler temp - uppercase because of ".set at" */
     15#define v0      $2      /* return value - caller saved */
     16#define v1      $3
     17#define a0      $4      /* argument registers */
     18#define a1      $5
     19#define a2      $6
     20#define a3      $7
     21#define a4      $8      /* arg reg 64 bit; caller saved in 32 bit */
     22#define ta0     $8
     23#define a5      $9
     24#define ta1     $9
     25#define a6      $10
     26#define ta2     $10
     27#define a7      $11
     28#define ta3     $11
     29#define t4      $12     /* caller saved */
     30#define t5      $13
     31#define t6      $14
     32#define t7      $15
     33#define s0      $16     /* callee saved */
     34#define s1      $17
     35#define s2      $18
     36#define s3      $19
     37#define s4      $20
     38#define s5      $21
     39#define s6      $22
     40#define s7      $23
     41#define t8      $24     /* caller saved */
     42#define t9      $25     /* callee address for PIC/temp */
     43#define jp      $25     /* PIC jump register */
     44#define k0      $26     /* kernel temporary */
     45#define k1      $27
     46#define gp      $28     /* global pointer - caller saved for PIC */
     47#define sp      $29     /* stack pointer */
     48#define fp      $30     /* frame pointer */
     49#define s8      $30     /* callee saved */
     50#define ra      $31     /* return address */
     51
     52
     53/*
     54 * LEAF - declare leaf routine
     55 */
     56#define LEAF(symbol)                                    \
     57                .globl  symbol;                         \
     58                .align  2;                              \
     59                .type   symbol,@function;               \
     60                .ent    symbol,0;                       \
     61symbol:         .frame  sp,0,ra
     62
     63
     64/*
     65 * NESTED - declare nested routine entry point
     66 */
     67#define NESTED(symbol, framesize, rpc)                  \
     68                .globl  symbol;                         \
     69                .align  2;                              \
     70                .type   symbol,@function;               \
     71                .ent    symbol,0;                       \
     72symbol:         .frame  sp, framesize, rpc
     73
     74/*
     75 * END - mark end of function
     76 */
     77#define END(function)                                   \
     78                .end    function;                       \
     79                .size   function,.-function
     80
     81
     82#endif                          /* _MACHINE_ASM_H */
  • usr/include/fcntl.h

    diff --git a/usr/include/fcntl.h b/usr/include/fcntl.h
    index bbd6917..16128f8 100644
    a b  
    99#include <klibc/compiler.h>
    1010#include <klibc/seek.h>
    1111#include <sys/types.h>
    12 #if defined(__mips__) && !defined(__mips64__)
     12#if defined(__mips__) && ! defined(__mips64)
    1313# include <klibc/archfcntl.h>
    1414#endif
    1515#include <linux/fcntl.h>
Note: See TracBrowser for help on using the repository browser.