mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 10:19:09 +08:00
d4a2788652
* configure.host: Added support for x86_64. * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for x86_64. * libc/include/machine/setjmp.h: Define _JBTYPE and _JBLEN for x86_64. * libc/machine/x86_64/aclocal.m4: Generated. * libc/machine/x86_64/configure.in: New. * libc/machine/x86_64/configure: Generated. * libc/machine/x86_64/Makefile.am: New. * libc/machine/x86_64/Makefile.in: Generated. * libc/machine/x86_64/setjmp.S: New. * libc/machine/x86_64/memcpy.S: New. * libc/machine/x86_64/memset.S: New. * libc/machine/configure.in: Added support for x86_64. * libc/machine/configure: Regenerated.
54 lines
1.1 KiB
ArmAsm
54 lines
1.1 KiB
ArmAsm
/*
|
|
* ====================================================
|
|
* Copyright (C) 2007 by Ellips BV. All rights reserved.
|
|
*
|
|
* Permission to use, copy, modify, and distribute this
|
|
* software is freely granted, provided that this notice
|
|
* is preserved.
|
|
* ====================================================
|
|
*/
|
|
|
|
/*
|
|
** jmp_buf:
|
|
** rbx rbp r12 r13 r14 r15 rsp rip
|
|
** 0 8 16 24 32 40 48 56
|
|
*/
|
|
|
|
#include "x86_64mach.h"
|
|
|
|
.global SYM (setjmp)
|
|
.global SYM (longjmp)
|
|
SOTYPE_FUNCTION(setjmp)
|
|
SOTYPE_FUNCTION(longjmp)
|
|
|
|
SYM (setjmp):
|
|
movq rbx, 0 (rdi)
|
|
movq rbp, 8 (rdi)
|
|
movq r12, 16 (rdi)
|
|
movq r13, 24 (rdi)
|
|
movq r14, 32 (rdi)
|
|
movq r15, 40 (rdi)
|
|
leaq 8 (rsp), rax
|
|
movq rax, 48 (rdi)
|
|
movq (rsp), rax
|
|
movq rax, 56 (rdi)
|
|
movq $0, rax
|
|
ret
|
|
|
|
SYM (longjmp):
|
|
movq rsi, rax /* Return value */
|
|
|
|
movq 8 (rdi), rbp
|
|
|
|
__CLI
|
|
movq 48 (rdi), rsp
|
|
pushq 56 (rdi)
|
|
movq 0 (rdi), rbx
|
|
movq 16 (rdi), r12
|
|
movq 24 (rdi), r13
|
|
movq 32 (rdi), r14
|
|
movq 40 (rdi), r15
|
|
__STI
|
|
|
|
ret
|