Slide 30
Slide 30 text
@alblue
©2020 Alex Blewitt
Comparisons
• {f,d}cmpg – compare two floats/doubles, pushes 1 on NaN
• {f,d}cmpl – compares two floads/dobules, pushes -1 on NaN
• lcmp – compares two longs, pushes 1 or -1
• if{eq,ne,gt,ge,lt,le} <±jump> – branch if =, ≠, >, ≥, <, ≤ 0
• if_icmp{eq,ne,gt,ge,lt,le} <±jump> – branch if =, ≠, >, ≥, <, ≤ other number
• if_acmp{eq,ne} <±jump> – branch if references are equal or not equal
• if{,non}null <±jump> – branch if (non) null
IEEE754 floating point spec
uses 'Not a Number' to
represent conditions such as
divide-by-zero or sqrt(-1)