
Software Optimization Guide for AMD64 Processors | 25112 Rev. 3.06 September 2005 |
To improve performance and substantially reduce code size, the following procedure performs the same
;64bitalu_64x64(int *a, int *b, int *c);
;TO ASSEMBLE INTO *.obj DO THE FOLLOWING:
;ml64.exe
;
_TEXT SEGMENT
64bitalu_64x64 PROC NEAR ;==============================================================================
;Parameters passed into routine:
;rcx =
;rdx =
;r8 =
mov rax, [rcx] | ; RAX = | [a0] |
|
| |||
mul [rdx] | ; Multiply | [a0] | by [b0] | such that | |||
|
| ; | RDX:RAX | = [c1]:[c0]. |
| ||
mov | [r8], rax | ; | Store | product | of a and b. | ||
mov | [r8+8], rdx |
|
|
|
|
|
|
;============================================================================== ret
64bitalu_64x64 ENDP END
66 | General | Chapter 3 |