~ubuntu-branches/ubuntu/utopic/linux-ti-omap/utopic

« back to all changes in this revision

Viewing changes to arch/um/sys-i386/setjmp.S

  • Committer: Bazaar Package Importer
  • Author(s): Amit Kucheria, Amit Kucheria
  • Date: 2010-03-10 02:28:15 UTC
  • Revision ID: james.westby@ubuntu.com-20100310022815-7sd3gwvn5kenaq33
Tags: 2.6.33-500.1
[ Amit Kucheria ]

* Initial release of a 2.6.33-based OMAP kernel
* UBUNTU: [Upstream] Fix omap 1-wire driver compilation
* UBUNTU: ubuntu: AppArmor -- update to mainline 2010-03-04

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# arch/i386/setjmp.S
 
3
#
 
4
# setjmp/longjmp for the i386 architecture
 
5
#
 
6
 
 
7
#
 
8
# The jmp_buf is assumed to contain the following, in order:
 
9
#       %ebx
 
10
#       %esp
 
11
#       %ebp
 
12
#       %esi
 
13
#       %edi
 
14
#       <return address>
 
15
#
 
16
 
 
17
        .text
 
18
        .align 4
 
19
        .globl setjmp
 
20
        .type setjmp, @function
 
21
setjmp:
 
22
#ifdef _REGPARM
 
23
        movl %eax,%edx
 
24
#else
 
25
        movl 4(%esp),%edx
 
26
#endif
 
27
        popl %ecx                       # Return address, and adjust the stack
 
28
        xorl %eax,%eax                  # Return value
 
29
        movl %ebx,(%edx)
 
30
        movl %esp,4(%edx)               # Post-return %esp!
 
31
        pushl %ecx                      # Make the call/return stack happy
 
32
        movl %ebp,8(%edx)
 
33
        movl %esi,12(%edx)
 
34
        movl %edi,16(%edx)
 
35
        movl %ecx,20(%edx)              # Return address
 
36
        ret
 
37
 
 
38
        .size setjmp,.-setjmp
 
39
 
 
40
        .text
 
41
        .align 4
 
42
        .globl longjmp
 
43
        .type longjmp, @function
 
44
longjmp:
 
45
#ifdef _REGPARM
 
46
        xchgl %eax,%edx
 
47
#else
 
48
        movl 4(%esp),%edx               # jmp_ptr address
 
49
        movl 8(%esp),%eax               # Return value
 
50
#endif
 
51
        movl (%edx),%ebx
 
52
        movl 4(%edx),%esp
 
53
        movl 8(%edx),%ebp
 
54
        movl 12(%edx),%esi
 
55
        movl 16(%edx),%edi
 
56
        jmp *20(%edx)
 
57
 
 
58
        .size longjmp,.-longjmp