home *** CD-ROM | disk | FTP | other *** search
- / cmpdi2.s (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes
-
- .globl ___cmpdi2
-
- .text
-
- .align 2, 0x90
-
- / int __cmpdi2 (long long x, long long y)
-
- /define ret_addr 0(%esp)
- #define x_lo 4(%esp)
- #define x_hi 8(%esp)
- #define y_lo 12(%esp)
- #define y_hi 16(%esp)
-
- ___cmpdi2:
- xorl %eax, %eax / 0: x < y
- movl x_hi, %edx
- cmpl y_hi, %edx
- jl 9f
- movb $2, %al / 2: x > y
- jg 9f
- movl x_lo, %edx
- cmpl y_lo, %edx
- ja 9f / 2: x > y
- movb $0, %al
- jb 9f / 0: x < y
- movb $1, %al / 1: x = y
- .align 2, 0x90
- 9: ret
-