mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
a382f706d9
Summary: It is important to emit HINT instructions instead of BTI ones when BTI is disabled. This allows compatibility with other assemblers (e.g. GAS). Still, developers of assembly code will want to write code that is compatible with both pre- and post-BTI CPUs. They could use HINT mnemonics, but the new mnemonics are a lot more readable (e.g. bti c instead of hint #34), and they will result in the same encodings. So, while LLVM should not *emit* the new mnemonics when BTI is disabled, this patch will at least make LLVM *accept* assembly code that uses them. Reviewers: pbarrio, tamas.petz, ostannard Reviewed By: pbarrio, ostannard Subscribers: ostannard, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81257
34 lines
1.2 KiB
ArmAsm
34 lines
1.2 KiB
ArmAsm
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+bti < %s | FileCheck %s
|
|
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.5a < %s | FileCheck %s
|
|
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-bti < %s | FileCheck %s --check-prefix=NOBTI
|
|
|
|
bti
|
|
bti c
|
|
bti j
|
|
bti jc
|
|
|
|
// CHECK: bti // encoding: [0x1f,0x24,0x03,0xd5]
|
|
// CHECK: bti c // encoding: [0x5f,0x24,0x03,0xd5]
|
|
// CHECK: bti j // encoding: [0x9f,0x24,0x03,0xd5]
|
|
// CHECK: bti jc // encoding: [0xdf,0x24,0x03,0xd5]
|
|
|
|
// NOBTI: hint #32 // encoding: [0x1f,0x24,0x03,0xd5]
|
|
// NOBTI: hint #34 // encoding: [0x5f,0x24,0x03,0xd5]
|
|
// NOBTI: hint #36 // encoding: [0x9f,0x24,0x03,0xd5]
|
|
// NOBTI: hint #38 // encoding: [0xdf,0x24,0x03,0xd5]
|
|
|
|
hint #32
|
|
hint #34
|
|
hint #36
|
|
hint #38
|
|
|
|
// CHECK: bti // encoding: [0x1f,0x24,0x03,0xd5]
|
|
// CHECK: bti c // encoding: [0x5f,0x24,0x03,0xd5]
|
|
// CHECK: bti j // encoding: [0x9f,0x24,0x03,0xd5]
|
|
// CHECK: bti jc // encoding: [0xdf,0x24,0x03,0xd5]
|
|
|
|
// NOBTI: hint #32 // encoding: [0x1f,0x24,0x03,0xd5]
|
|
// NOBTI: hint #34 // encoding: [0x5f,0x24,0x03,0xd5]
|
|
// NOBTI: hint #36 // encoding: [0x9f,0x24,0x03,0xd5]
|
|
// NOBTI: hint #38 // encoding: [0xdf,0x24,0x03,0xd5]
|