make LogicalFlagsMOp also copy the dest PRegValue.flags into PRegValue.int_fp
All checks were successful
/ test (pull_request) Successful in 27m15s
All checks were successful
/ test (pull_request) Successful in 27m15s
This commit is contained in:
parent
aa07e24c78
commit
d361a2b578
1 changed files with 22 additions and 12 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue