17 Apr
2014
17 Apr
'14
10:01 a.m.
"WDS" == Warren D Smith <warren.wds@gmail.com> writes:
WDS> If x and y both are unsigned integers, and we want to tell whether WDS> (x>0 and y>0), WDS> then how can we do it? In a language with a logical AND, x AND y is true iff both are > 0. In amd64 assembly, this seems best: xor %eax,%eax test %rsi,%rdi setne %al retq In arm assembly, that looks like: tst r0, r1 moveq r0, #0 movne r0, #1 bx lr -JimC -- James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6