1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! ALU logical and comparison operations.
//!
//! Implements bitwise OR, AND, XOR, and set-less-than (signed and unsigned)
//! for both RV64 and RV32 variants.
//!
//! For 32-bit comparisons (`Slt`/`Sltu` with `is32`), only the lower 32 bits
//! of each operand are considered. The result is always 0 or 1.
use crateAluOp;
/// Executes a logical or comparison operation.
///
/// # Arguments
///
/// * `op` - The ALU operation to perform (must be a logic/comparison variant).
/// * `a` - First operand (64-bit value).
/// * `b` - Second operand (64-bit value).
/// * `is32` - If true, perform the 32-bit comparison variant for Slt/Sltu.
///
/// # Returns
///
/// The 64-bit result. Bitwise operations always use the full 64 bits
/// regardless of `is32`. Returns `0` for non-logic opcodes.
pub const