Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
utopcell
on April 27, 2018
|
parent
|
context
|
favorite
| on:
Ask HN: What are some examples of beautiful x86 as...
The following snippet swaps two values (rax, rcx) only if they are out of order (i.e. rax > rcx). It does so without using any branches.
mov rdx, rax cmp rax, rcx cmovg rax, rcx cmovg rcx, rdx
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: