Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .type max2, @function
- .global max2
- #rdi rsi
- max2:
- MOVL %esi, %edx
- ADDL %edi, %edx #a+b
- MOVL %edi, %ecx
- SUBL %esi, %ecx #a-b
- MULL %edi, %esi #a*b
- CMP %edx, %ecx
- JG sub
- add:
- MOV %edx, %eax
- CMP %eax, %esi
- JG mult
- RET
- sub:
- MOV %ecx, %eax
- JMP add
- mult:
- MOV %esi, %eax
- RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement