OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [x86_64/] [setjmp.S] - Blame information for rev 262

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * ====================================================
3
 * Copyright (C) 2007 by Ellips BV. All rights reserved.
4
 *
5
 * Permission to use, copy, modify, and distribute this
6
 * software is freely granted, provided that this notice
7
 * is preserved.
8
 * ====================================================
9
 */
10
 
11
 /*
12
 **  jmp_buf:
13
 **   rbx rbp r12 r13 r14 r15 rsp rip
14
 **   0   8   16  24  32  40  48  56
15
 */
16
 
17
  #include "x86_64mach.h"
18
 
19
  .global SYM (setjmp)
20
  .global SYM (longjmp)
21
  SOTYPE_FUNCTION(setjmp)
22
  SOTYPE_FUNCTION(longjmp)
23
 
24
SYM (setjmp):
25
  movq    rbx,  0 (rdi)
26
  movq    rbp,  8 (rdi)
27
  movq    r12, 16 (rdi)
28
  movq    r13, 24 (rdi)
29
  movq    r14, 32 (rdi)
30
  movq    r15, 40 (rdi)
31
  leaq    8 (rsp), rax
32
  movq    rax, 48 (rdi)
33
  movq    (rsp), rax
34
  movq    rax, 56 (rdi)
35
  movq    $0, rax
36
  ret
37
 
38
SYM (longjmp):
39
  movq    rsi, rax        /* Return value */
40
 
41
  movq     8 (rdi), rbp
42
 
43
  __CLI
44
  movq    48 (rdi), rsp
45
  pushq   56 (rdi)
46
  movq     0 (rdi), rbx
47
  movq    16 (rdi), r12
48
  movq    24 (rdi), r13
49
  movq    32 (rdi), r14
50
  movq    40 (rdi), r15
51
  __STI
52
 
53
  ret

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.