Fish Touching🐟🎣

Condition Code

Apr 3, 2023

CPU Instruction for flow control

# Condition Code (Implicit Setting)

All 1-bit flags, not set directly

# Single Bit Registers

# Condition Codes (Explicit Setting: Compare)

Used for compare two values
cmpq SRC2, SRC1 : Reversed order
cmpq b,a like computing a-b without setting destination

# Condition Codes (Explicit Setting: Test)

testq Src2, Src1
testq b,a like computing a&b without setting destination

Sets condition codes based on value of Src1 & Src2
Useful to have one of the operands be a mask

Use set to access condition code