unit::alu_branch: implement for LogicalFlagsMOp

This commit is contained in:
Jacob Lifshay 2026-05-25 23:23:39 -07:00
parent 99c019431b
commit b25448a275
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
5 changed files with 34028 additions and 8 deletions

View file

@ -245,14 +245,12 @@ fn add_sub<C: PhantomConstCpuConfig, SrcCount: KnownSize>(
#[hdl] #[hdl]
fn logical_flags<C: PhantomConstCpuConfig>( fn logical_flags<C: PhantomConstCpuConfig>(
global_state: Expr<GlobalState>, global_state: Expr<GlobalState>,
pc: Expr<UInt<64>>,
mop: Expr<LogicalFlagsMOp<PRegNum<C>, PRegNum<C>>>, mop: Expr<LogicalFlagsMOp<PRegNum<C>, PRegNum<C>>>,
src_values: Expr<Array<TraceAsString<PRegValue>, { COMMON_MOP_SRC_LEN }>>, src_values: Expr<Array<TraceAsString<PRegValue>, { COMMON_MOP_SRC_LEN }>>,
) -> Expr<TraceAsString<PRegValue>> { ) -> Expr<TraceAsString<PRegValue>> {
#[hdl] #[hdl]
let GlobalState { flags_mode } = global_state; let GlobalState { flags_mode: _ } = global_state;
// TODO: finish LogicalFlagsMOp::operation(mop, src_values.map(|v| *v)).to_trace_as_string()
PRegValue::zeroed().to_trace_as_string()
} }
#[hdl] #[hdl]
@ -896,10 +894,7 @@ pub fn alu_branch(config: PhantomConst<CpuConfig>, unit_index: usize) {
); );
} }
AluBranchMOp::<_, _>::LogicalFlags(mop) => { AluBranchMOp::<_, _>::LogicalFlags(mop) => {
connect( connect(dest_value, logical_flags(global_state, mop, src_values));
dest_value,
logical_flags(global_state, mop_instance.pc, mop, src_values),
);
} }
AluBranchMOp::<_, _>::Logical(mop) => { AluBranchMOp::<_, _>::Logical(mop) => {
connect( connect(

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff