|
| | ALU ()=default |
| | ~ALU ()=default |
| | ALU (const ALU &)=default |
| ALU & | operator= (const ALU &)=default |
| | ALU (ALU &&) noexcept=default |
| ALU & | operator= (ALU &&) noexcept=default |
| Result< RegisterValue > | add (RegisterValue a, RegisterValue b) const noexcept |
| | Addition: a + b.
|
| Result< RegisterValue > | sub (RegisterValue a, RegisterValue b) const noexcept |
| | Subtraction: a - b.
|
| Result< RegisterValue > | mul (RegisterValue a, RegisterValue b) const noexcept |
| | Multiplication: a * b.
|
| Result< RegisterValue > | div (RegisterValue a, RegisterValue b) const noexcept |
| | Division: a / b.
|
| Result< RegisterValue > | bitwiseAnd (RegisterValue a, RegisterValue b) const noexcept |
| | Bitwise AND: a & b.
|
| Result< RegisterValue > | bitwiseOr (RegisterValue a, RegisterValue b) const noexcept |
| | Bitwise OR: a | b.
|
| Result< RegisterValue > | bitwiseXor (RegisterValue a, RegisterValue b) const noexcept |
| | Bitwise XOR: a ^ b.
|
| Result< RegisterValue > | shiftLeft (RegisterValue a, RegisterValue b) const noexcept |
| | Left shift: a << b.
|
| Result< RegisterValue > | shiftRight (RegisterValue a, RegisterValue b) const noexcept |
| | Right shift: a >> b (arithmetic shift).
|
| RegisterValue | compare (RegisterValue a, RegisterValue b) const noexcept |
| | Compares two values and returns a flags word.
|
Arithmetic Logic Unit — performs all computational operations.
The ALU is owned by the CPU and invoked during the execute phase of the fetch-decode-execute cycle. All methods are pure functions: they take operands and return results without side effects.
Definition at line 20 of file alu.h.