PTX ISA v9.4

9.7.9. Logic and Shift Instructions

The logic and shift instructions are fundamentally untyped, performing bit-wise operations on operands of any type, provided the operands are of the same size. This permits bit-wise operations on floating point values without having to define a union to access the bits. Instructions and, or, xor, and not also operate on predicates.

The logical shift instructions are:

  • and
  • or
  • xor
  • not
  • cnot
  • lop3
  • shf
  • shl
  • shr

Pages

  • and — Bitwise AND.
  • or — Bitwise OR.
  • xor — Bitwise exclusive-OR (inequality).
  • not — Bitwise negation; one's complement.
  • cnot — C/C++ style logical negation.
  • lop3 — Arbitrary logical operation on 3 inputs, selected by an 8-bit look-up table.
  • shf — Funnel shift of a 64-bit value formed from two 32-bit operands.
  • shl — Shift bits left, zero-fill on right.
  • shr — Shift bits right, sign or zero-fill on left.
esc
Type to search across all documentation