Compare commits

...

2 commits

2 changed files with 24 additions and 14 deletions

View file

@ -1473,14 +1473,19 @@ impl<DestReg: Type, SrcRegWidth: Size> LogicalFlagsMOp<DestReg, SrcRegWidth> {
src: impl ToExpr<Type = Array<PRegValue, 3>>,
) -> Expr<PRegValue> {
let this = this.to_expr();
let flags = LogicalFlagsMOpImm::flags_operation(
Self::imm(this),
this.lut,
src.to_expr().map(|v| v.flags),
);
#[hdl]
PRegValue {
int_fp: 0u64,
flags: LogicalFlagsMOpImm::flags_operation(
Self::imm(this),
this.lut,
src.to_expr().map(|v| v.flags),
),
int_fp: PRegFlags::fields(flags)
.iter()
.as_slice()
.cast_to_bits()
.cast_to_static::<UInt<64>>(),
flags,
}
}
#[hdl]
@ -1489,14 +1494,19 @@ impl<DestReg: Type, SrcRegWidth: Size> LogicalFlagsMOp<DestReg, SrcRegWidth> {
src: impl ToSimValue<Type = Array<PRegValue, 3>>,
) -> SimValue<PRegValue> {
let this = this.into_sim_value();
let flags = LogicalFlagsMOpImm::flags_operation_sim(
Self::imm(&this),
SimValue::into_value(this).lut,
SimValue::into_value(src.into_sim_value()).map(|v| SimValue::into_value(v).flags),
);
#[hdl(sim)]
PRegValue {
int_fp: 0u64,
flags: LogicalFlagsMOpImm::flags_operation_sim(
Self::imm(&this),
SimValue::into_value(this).lut,
SimValue::into_value(src.into_sim_value()).map(|v| SimValue::into_value(v).flags),
),
int_fp: PRegFlags::fields_sim_ref(&flags)
.iter()
.as_slice()
.cast_to_bits()
.cast_to_static::<UInt<64>>(),
flags,
}
}
#[hdl]

View file

@ -46,7 +46,7 @@ function main()
*/LICENSE.md|*/Notices.txt)
# copyright file
;;
/crates/cpu/tests/expected/*.vcd|/crates/cpu/tests/expected/*.txt)
/crates/cpu/tests*/expected/*.vcd|/crates/cpu/tests*/expected/*.txt)
# file that can't contain copyright header
;;
/.forgejo/workflows/*.yml|*/.gitignore|*/.gitattributes|*.toml)
@ -71,4 +71,4 @@ function main()
done
}
main
main