Contents Prev Next Up
3.9 Logical Instructions
ishl
Integer shift left
Stack: ..., value1, value2 => ..., result
value1 and value2 must be integers. value1 is shifted left by the amount indicated by the low five bits of value2. The integer result replaces both values on the stack.
ishr
Integer arithmetic shift right
Stack: ..., value1, value2 => ..., result
value1 and value2 must be integers. value1 is shifted right arithmetically (with sign extension) by the amount indicated by the low five bits of value2. The integer result replaces both values on the stack.
iushr
Integer logical shift right
Stack: ..., value1, value2 => ..., result
value1 and value2 must be integers. value1 is shifted right logically (with no sign extension) by the amount indicated by the low five bits of value2. The integer result replaces both values on the stack.
lshl
Long integer shift left
Stack: ..., value1-word1, value1-word2, value2 => ..., result-word1, result-word2
value1 must be a long integer and value2 must be an integer. value1 is shifted left by the amount indicated by the low six bits of value2. The long integer result replaces both values on the stack.
lshr
Long integer arithmetic shift right
Stack: ..., value1-word1, value1-word2, value2 => ..., result-word1, result-word2
value1 must be a long integer and value2 must be an integer. value1 is shifted right arithmetically (with sign extension) by the amount indicated by the low six bits of value2. The long integer result replaces both values on the stack.
lushr
Long integer logical shift right
Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2
value1 must be a long integer and value2 must be an integer. value1 is shifted right logically (with no sign extension) by the amount indicated by the low six bits of value2. The long integer result replaces both values on the stack.
iand
Integer boolean AND
Stack: ..., value1, value2 => ..., result
value1 and value2 must both be integers. They are replaced on the stack by their bitwise logical and (conjunction).
land
Long integer boolean AND
Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2
value1 and value2 must both be long integers. They are replaced on the stack by their bitwise logical and (conjunction).
ior
Integer boolean OR
Stack: ..., value1, value2 => ..., result
value1 and value2 must both be integers. They are replaced on the stack by their bitwise logical or (disjunction).
lor
Long integer boolean OR
Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2
value1 and value2 must both be long integers. They are replaced on the stack by their bitwise logical or (disjunction).
ixor
Integer boolean XOR
Stack: ..., value1, value2 => ..., result
value1 and value2 must both be integers. They are replaced on the stack by their bitwise exclusive or (exclusive disjunction).
lxor
Long integer boolean XOR
Stack: ..., value1-word1, value1-word2, value2-word1, value2-word2 => ..., result-word1, result-word2
value1 and value2 must both be long integers. They are replaced on the stack by their bitwise exclusive or (exclusive disjunction).
Contents Prev Next Up