I am trying to achieve something similar to the following C code:
if(x<0)
{
<code A>
}
else if(x == 0)
{
<code B>
}
else //x > 0
{
<code C>
}
postIf code
So i was wondering if I could do this by doing the following in ARMv8, AArch64 instruction set:
cmp x_r, 0 //x_r macro for x19
b.lt neg
b.gt pos
<code B>
b postIf
neg:
<code A>
b postIf
pos:
<code C>
postIf:
<postIf Code>
Does this work? Do flags stay set (or not set) after checking a conditional branch?