Software Optimization Guide for AMD64 Processors

25112 Rev. 3.06 September 2005

sr_makesign:

 

xor eax, esi

; If (remainder < 0),

xor edx, esi

; compute 1's complement of result.

sub eax, esi

; If (remainder < 0),

sbb edx, esi

; compute 2's complement of result.

pop edi

; Restore EDI as per calling convention.

pop esi

; Restore ESI as per calling convention.

pop ebx

; Restore EBX as per calling convention.

ret

; Done, return to caller.

178

Integer Optimizations

Chapter 8

Page 194
Image 194
AMD 250 manual 178