Cranelift AArch64: Use an allocated encoding for Udf (#4281)

Preserve the current behaviour when code is generated for SpiderMonkey.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Anton Kirilov
2022-06-22 15:03:28 +01:00
committed by GitHub
parent 2f9d96cd00
commit 25a588c35f
11 changed files with 87 additions and 30 deletions

View File

@@ -2564,7 +2564,16 @@ impl Inst {
format!("br {}", rn)
}
&Inst::Brk => "brk #0".to_string(),
&Inst::Udf { .. } => "udf".to_string(),
&Inst::Udf {
use_allocated_encoding,
..
} => {
if use_allocated_encoding {
"udf #0xc11f".to_string()
} else {
"udf".to_string()
}
}
&Inst::TrapIf { ref kind, .. } => match kind {
&CondBrKind::Zero(reg) => {
let reg = pretty_print_reg(reg, allocs);