home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / GCC / CMPDI2.S next >
Encoding:
Text File  |  1993-01-02  |  817 b   |  32 lines

  1. / cmpdi2.s (emx+gcc) -- Copyright (c) 1992-1993 by Eberhard Mattes
  2.  
  3.         .globl  ___cmpdi2
  4.  
  5.         .text
  6.  
  7.         .align  2, 0x90
  8.  
  9. / int __cmpdi2 (long long x, long long y)
  10.  
  11. /define ret_addr   0(%esp)
  12. #define x_lo       4(%esp)
  13. #define x_hi       8(%esp)
  14. #define y_lo      12(%esp)
  15. #define y_hi      16(%esp)
  16.  
  17. ___cmpdi2:
  18.         xorl    %eax, %eax              / 0: x < y
  19.         movl    x_hi, %edx
  20.         cmpl    y_hi, %edx
  21.         jl      9f
  22.         movb    $2, %al                 / 2: x > y
  23.         jg      9f
  24.         movl    x_lo, %edx
  25.         cmpl    y_lo, %edx
  26.         ja      9f                      / 2: x > y
  27.         movb    $0, %al
  28.         jb      9f                      / 0: x < y
  29.         movb    $1, %al                 / 1: x = y
  30.         .align  2, 0x90
  31. 9:      ret
  32.