|
Packit Service |
82fcde |
/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
Contributed by Brendan Kehoe (brendan@zen.org).
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License as published by the Free Software Foundation; either
|
|
Packit Service |
82fcde |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License along with the GNU C Library. If not, see
|
|
Packit Service |
82fcde |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include <sgidefs.h>
|
|
Packit Service |
82fcde |
#include <sysdeps/unix/sysdep.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifndef __mips_isa_rev
|
|
Packit Service |
82fcde |
# define __mips_isa_rev 0
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifdef __ASSEMBLER__
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include <regdef.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define ENTRY(name) \
|
|
Packit Service |
82fcde |
.globl name; \
|
|
Packit Service |
82fcde |
.align 2; \
|
|
Packit Service |
82fcde |
.ent name,0; \
|
|
Packit Service |
82fcde |
name##: \
|
|
Packit Service |
82fcde |
cfi_startproc;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#undef END
|
|
Packit Service |
82fcde |
#define END(function) \
|
|
Packit Service |
82fcde |
cfi_endproc; \
|
|
Packit Service |
82fcde |
.end function; \
|
|
Packit Service |
82fcde |
.size function,.-function
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define ret j ra ; nop
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#undef PSEUDO_END
|
|
Packit Service |
82fcde |
#define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define PSEUDO_NOERRNO(name, syscall_name, args) \
|
|
Packit Service |
82fcde |
.align 2; \
|
|
Packit Service |
82fcde |
ENTRY(name) \
|
|
Packit Service |
82fcde |
.set nomips16; \
|
|
Packit Service |
82fcde |
.set noreorder; \
|
|
Packit Service |
82fcde |
li v0, SYS_ify(syscall_name); \
|
|
Packit Service |
82fcde |
syscall
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#undef PSEUDO_END_NOERRNO
|
|
Packit Service |
82fcde |
#define PSEUDO_END_NOERRNO(sym) cfi_endproc; .end sym; .size sym,.-sym
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define ret_NOERRNO ret
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define PSEUDO_ERRVAL(name, syscall_name, args) \
|
|
Packit Service |
82fcde |
.align 2; \
|
|
Packit Service |
82fcde |
ENTRY(name) \
|
|
Packit Service |
82fcde |
.set nomips16; \
|
|
Packit Service |
82fcde |
.set noreorder; \
|
|
Packit Service |
82fcde |
li v0, SYS_ify(syscall_name); \
|
|
Packit Service |
82fcde |
syscall
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#undef PSEUDO_END_ERRVAL
|
|
Packit Service |
82fcde |
#define PSEUDO_END_ERRVAL(sym) cfi_endproc; .end sym; .size sym,.-sym
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define ret_ERRVAL ret
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#define r0 v0
|
|
Packit Service |
82fcde |
#define r1 v1
|
|
Packit Service |
82fcde |
/* The mips move insn is d,s. */
|
|
Packit Service |
82fcde |
#define MOVE(x,y) move y , x
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if _MIPS_SIM == _ABIO32
|
|
Packit Service |
82fcde |
# define L(label) $L ## label
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
# define L(label) .L ## label
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#endif
|