~ubuntu-branches/ubuntu/karmic/libsdl1.2/karmic

« back to all changes in this revision

Viewing changes to src/hermes/x86_main.asm

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-12-05 20:29:43 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071205202943-ryogi07hodn5cdif
Tags: 1.2.12-1ubuntu1
* Merge with Debian; remaining changes:
  - Remove svgalib support.
  - Prefer libgl1-mesa-dev build-dependency over xlibmesa-gl-dev.
  - Build for lpia as for i386.
* Link using -Wl,-Bsymbolic-functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
%include "common.inc"
15
15
 
16
16
SDL_FUNC _ConvertX86
17
 
SDL_FUNC _x86return
18
 
        
19
 
SDL_FUNC _Hermes_X86_CPU
20
17
 
21
18
SECTION .text
22
19
                
55
52
y_loop: 
56
53
        mov ecx,[ebp+4]
57
54
 
58
 
        jmp [ebp+32]
 
55
        call [ebp+32]
59
56
 
60
 
_x86return:     
61
57
        add esi,[ebp+12]
62
58
        add edi,[ebp+28]
63
59
        
74
70
 
75
71
 
76
72
 
77
 
;; Hermes_X86_CPU returns the CPUID flags in eax
78
 
        
79
 
_Hermes_X86_CPU:
80
 
        pushfd
81
 
        pop eax
82
 
        
83
 
        mov ecx,eax
84
 
        
85
 
        xor eax,040000h
86
 
        push eax
87
 
        
88
 
        popfd
89
 
        pushfd
90
 
 
91
 
        pop eax
92
 
        xor eax,ecx
93
 
        jz .L1                  ; Processor is 386
94
 
 
95
 
        push ecx
96
 
        popfd
97
 
 
98
 
        mov eax,ecx
99
 
        xor eax,200000h
100
 
 
101
 
        push eax
102
 
        popfd
103
 
        pushfd
104
 
 
105
 
        pop eax
106
 
        xor eax,ecx
107
 
        je .L1
108
 
        
109
 
        push ebx
110
 
 
111
 
        mov eax,1
112
 
        cpuid
113
 
        mov eax,edx
114
 
 
115
 
        pop ebx
116
 
 
117
 
.L1:    
118
 
        ret
119
 
 
120
73
%ifidn __OUTPUT_FORMAT__,elf
121
74
section .note.GNU-stack noalloc noexec nowrite progbits
122
75
%endif