linux/arch/metag/lib/ucmpdi2.S
<<
>>
Prefs
   1! Copyright (C) 2012 by Imagination Technologies Ltd.
   2!
   3! 64-bit unsigned compare routine.
   4!
   5
   6        .text
   7        .global ___ucmpdi2
   8        .type   ___ucmpdi2,function
   9
  10!         low    high
  11! u64 a  (D0Ar2, D1Ar1)
  12! u64 b  (D0Ar4, D1Ar3)
  13___ucmpdi2:
  14        ! start at 1 (equal) and conditionally increment or decrement
  15        MOV     D0Re0,#1
  16
  17        ! high words
  18        CMP     D1Ar1,D1Ar3
  19        ! or if equal, low words
  20        CMPEQ   D0Ar2,D0Ar4
  21
  22        ! unsigned compare
  23        SUBLO   D0Re0,D0Re0,#1
  24        ADDHI   D0Re0,D0Re0,#1
  25
  26        MOV     PC,D1RtP
  27        .size ___ucmpdi2,.-___ucmpdi2
  28