Port flag-based ops to ISLE (AArch64) (#4942)
Ported the existing implementations of the following opcodes for AArch64 to ISLE: - `Trueif` - `Trueff` - `Trapif` - `Trapff` - `Select` - `Selectif` - `SelectifSpectreGuard` Copyright (c) 2022 Arm Limited
This commit is contained in:
@@ -942,15 +942,17 @@ where
|
||||
Opcode::Nearest => assign(Value::nearest(arg(0)?)?),
|
||||
Opcode::IsNull => unimplemented!("IsNull"),
|
||||
Opcode::IsInvalid => unimplemented!("IsInvalid"),
|
||||
// `ctrl_ty` is `INVALID` for `Trueif` and `Trueff`, but both should
|
||||
// return a 1-bit boolean value.
|
||||
Opcode::Trueif => choose(
|
||||
state.has_iflag(inst.cond_code().unwrap()),
|
||||
Value::bool(true, ctrl_ty)?,
|
||||
Value::bool(false, ctrl_ty)?,
|
||||
Value::bool(true, types::B1)?,
|
||||
Value::bool(false, types::B1)?,
|
||||
),
|
||||
Opcode::Trueff => choose(
|
||||
state.has_fflag(inst.fp_cond_code().unwrap()),
|
||||
Value::bool(true, ctrl_ty)?,
|
||||
Value::bool(false, ctrl_ty)?,
|
||||
Value::bool(true, types::B1)?,
|
||||
Value::bool(false, types::B1)?,
|
||||
),
|
||||
Opcode::Bitcast
|
||||
| Opcode::RawBitcast
|
||||
|
||||
Reference in New Issue
Block a user