implement more instructions in unit::alu_branch #14

Merged
programmerjake merged 10 commits from programmerjake/cpu:more-alu-branch into master 2026-05-29 02:23:09 +00:00
5 changed files with 34028 additions and 8 deletions
Showing only changes of commit b25448a275 - Show all commits

View file

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