OR
Bitwise OR
Combine two scalar inputs and update the logic flags.
| Form | Bits | Requires | Encoding |
|---|---|---|---|
OR r32_dst, r32_src | 32 | x86-64 | 09 /r |
OR r32_dst, imm8 | 32 | x86-64 | 83 /1 ib |
OR r32_dst, imm32 | 32 | x86-64 | 81 /1 iz |
OR r32_dst, m32_src | 32 | x86-64 | 0B /r |
OR m32_dst, r32_src | 32 | x86-64 | 09 /r |
OR r64_dst, r64_src | 64 | x86-64 | REX.W + 09 /r |
OR r64_dst, imm8 | 64 | x86-64 | REX.W + 83 /1 ib |
OR r64_dst, imm32 | 64 | x86-64 | REX.W + 81 /1 iz |
OR r64_dst, m64_src | 64 | x86-64 | REX.W + 0B /r |
OR m64_dst, r64_src | 64 | x86-64 | REX.W + 09 /r |
Operation#
Pseudo-C · selected form
b = src
result = dst OR b
dst = result
update flags as describedExact upstream semantics
Standard variant
let result := src1 or src2;
RFLAGS.OF := 0b0;
RFLAGS.SF := result[operand_size-1];
RFLAGS.ZF := Bit(Is_Zero(result));
RFLAGS.AF := UNSPECIFIED : Bit;
RFLAGS.PF := Bit(Is_Parity_Even(result[0 +: 8]));
RFLAGS.CF := 0b0;Architectural details#
- Flags
- CF and OF are cleared. SF, ZF and PF reflect the result; AF is undefined.
- Destination
- Writes the low 32 bits and clears the corresponding 64-bit register’s upper half. Updates arithmetic flags.
- Encoding
09 /r- Operands
r32_dstread / write · 32 bitsr32_srcread · 32 bits
- Coverage
- Selected 32/64-bit register, immediate and ordinary memory forms in 64-bit execution mode; LOCK and APX forms are outside this selection.
Exception information & execution requirements
#UD
Imported exceptions are checks exposed by this XML form; memory, stack, instruction-fetch and called architectural helpers can introduce additional faults.
Feature availability alone does not guarantee execution: OS state and execution-level controls also apply. Use the linked architecture documentation for the full exception conditions.
Sources & provenance#
Technical fields are imported from pinned upstream files. Explanations and explorer behavior are maintained separately.
Intel · OR-Logical-Inclusive-OR.xml
- Revision
4ebe7f0ac1bd00f46244c49bb72c503ce368def7- SHA-256
b9cc888b14808412ed4ef6e70af8ba27bf1e0faadf2d7561e83788c97b695bb5- Terms
- Intel SDM terms; see License.md