~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to setup/SCO_SV/fpsupport.s

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
        .file   "fpsupport_i86pc.c"
 
2
        .text
 
3
.globl oss_fp_check
 
4
        .type   oss_fp_check, @function
 
5
oss_fp_check:
 
6
        pushl   %ebp
 
7
        movl    %esp, %ebp
 
8
        pushl   %ebx
 
9
/APP
 
10
        pushfl ; popl %edx
 
11
/NO_APP
 
12
        andl    $-2097153, %edx
 
13
/APP
 
14
        pushl %edx ; popfl
 
15
        pushfl ; popl %eax
 
16
/NO_APP
 
17
        movl    %eax, %ecx
 
18
        orl     $-1, %edx
 
19
        andl    $2097152, %ecx
 
20
        jne     .L1
 
21
        orl     $2097152, %eax
 
22
/APP
 
23
        pushl %eax ; popfl
 
24
        pushfl ; popl %eax
 
25
/NO_APP
 
26
        movl    $-2, %edx
 
27
        testl   $2097152, %eax
 
28
        je      .L1
 
29
        movl    $1, %eax
 
30
/APP
 
31
        cpuid
 
32
/NO_APP
 
33
        andl    $16777216, %edx
 
34
        cmpl    $1, %edx
 
35
        sbbl    %ecx, %ecx
 
36
        andl    $-4, %ecx
 
37
        leal    1(%ecx), %edx
 
38
.L1:
 
39
        movl    %edx, %eax
 
40
        popl    %ebx
 
41
        popl    %ebp
 
42
        ret
 
43
        .size   oss_fp_check, .-oss_fp_check
 
44
.globl oss_fp_save
 
45
        .type   oss_fp_save, @function
 
46
oss_fp_save:
 
47
        pushl   %ebp
 
48
        movl    %esp, %ebp
 
49
        pushl   %eax
 
50
        pushl   %eax
 
51
        movl    12(%ebp), %ecx
 
52
/APP
 
53
        movl %cr0,%eax
 
54
/NO_APP
 
55
        movl    %eax, (%ecx)
 
56
/APP
 
57
        movl %cr4,%edx
 
58
/NO_APP
 
59
        movl    %edx, 4(%ecx)
 
60
        andl    $-15, %eax
 
61
/APP
 
62
        movl %eax,%cr0
 
63
/NO_APP
 
64
        orb     $6, %dh
 
65
/APP
 
66
        movl %edx,%cr4
 
67
/NO_APP
 
68
        movl    8(%ebp), %edx
 
69
/APP
 
70
        fxsave (%edx)
 
71
        fninit
 
72
        fwait
 
73
/NO_APP
 
74
        movl    $8064, -8(%ebp)
 
75
        movl    $0, -4(%ebp)
 
76
/APP
 
77
        ldmxcsr -8(%ebp)
 
78
        movl %cr0,%edx
 
79
/NO_APP
 
80
        movl    %edx, 8(%ecx)
 
81
        leave
 
82
        ret
 
83
        .size   oss_fp_save, .-oss_fp_save
 
84
.globl oss_fp_restore
 
85
        .type   oss_fp_restore, @function
 
86
oss_fp_restore:
 
87
        pushl   %ebp
 
88
        movl    %esp, %ebp
 
89
        movl    12(%ebp), %edx
 
90
/APP
 
91
        fwait
 
92
/NO_APP
 
93
        movl    8(%ebp), %ecx
 
94
/APP
 
95
        fxrstor (%ecx)
 
96
/NO_APP
 
97
        movl    (%edx), %ecx
 
98
/APP
 
99
        movl %ecx,%cr0
 
100
/NO_APP
 
101
        movl    4(%edx), %ecx
 
102
/APP
 
103
        movl %ecx,%cr4
 
104
/NO_APP
 
105
        popl    %ebp
 
106
        ret
 
107
        .size   oss_fp_restore, .-oss_fp_restore