[binutils-gdb] PATCH [8/10] arm: add 'autg' instruction for Armv8.1-M pacbti extension

Andrea Corallo akrl@sourceware.org
Mon Jul 26 12:29:53 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=be05908c0c043bac81134da8beb3415996ae2416

commit be05908c0c043bac81134da8beb3415996ae2416
Author: Andrea Corallo <andrea.corallo@arm.com>
Date:   Tue Jun 8 15:22:12 2021 +0200

    PATCH [8/10] arm: add 'autg' instruction for Armv8.1-M pacbti extension
    
    gas/
    2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>
    
            * config/tc-arm.c (T16_32_TAB): Add '_autg'.
            (insns): Define 'autg' insn.
            * testsuite/gas/arm/armv8_1-m-pacbti.d: Add autg test.
            * testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.
    
    opcodes/
    2021-06-11  Andrea Corallo  <andrea.corallo@arm.com>
    
            * arm-dis.c (thumb32_opcodes): Add 'autg'.

Diff:
---
 gas/config/tc-arm.c                      | 2 ++
 gas/testsuite/gas/arm/armv8_1-m-pacbti.d | 1 +
 gas/testsuite/gas/arm/armv8_1-m-pacbti.s | 1 +
 opcodes/arm-dis.c                        | 2 ++
 4 files changed, 6 insertions(+)

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 30ef1991249..cd65b25601e 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -11454,6 +11454,7 @@ encode_thumb32_addr_mode (int i, bool is_t, bool is_d)
   X(_asr,   1000, fa40f000),			\
   X(_asrs,  1000, fa50f000),			\
   X(_aut,   0000, f3af802d),			\
+  X(_autg,   0000, fb500f00),			\
   X(_b,     e000, f000b000),			\
   X(_bcond, d000, f0008000),			\
   X(_bf,    0000, f040e001),			\
@@ -26345,6 +26346,7 @@ static const struct asm_opcode insns[] =
 #undef  THUMB_VARIANT
 #define THUMB_VARIANT & arm_ext_v8_1m_main
  toU("aut",   _aut, 3, (R12, LR, SP), t_pacbti),
+ toU("autg",  _autg, 3, (RR, RR, RR), t_pacbti_nonop),
  ToU("bti",   f3af800f, 0, (), noargs),
  toU("bxaut", _bxaut, 3, (RR, RR, RR), t_pacbti_nonop),
  toU("pac",   _pac,   3, (R12, LR, SP), t_pacbti),
diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti.d b/gas/testsuite/gas/arm/armv8_1-m-pacbti.d
index 411454a5fd1..6ddf218c9f9 100644
--- a/gas/testsuite/gas/arm/armv8_1-m-pacbti.d
+++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti.d
@@ -11,4 +11,5 @@ Disassembly of section .text:
 0[0-9a-f]+ <[^>]+> f3af 802d 	aut	r12, lr, sp
 0[0-9a-f]+ <[^>]+> f3af 801d 	pac	r12, lr, sp
 0[0-9a-f]+ <[^>]+> fb54 3f15 	bxaut	r3, r4, r5
+0[0-9a-f]+ <[^>]+> fb54 3f05 	autg	r3, r4, r5
 #...
diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti.s b/gas/testsuite/gas/arm/armv8_1-m-pacbti.s
index 22da2cefb4e..eccd5797ed7 100644
--- a/gas/testsuite/gas/arm/armv8_1-m-pacbti.s
+++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti.s
@@ -7,3 +7,4 @@
 	aut	r12, lr, sp
 	pac	r12, lr, sp
 	bxaut	r3, r4, r5
+	autg	r3, r4, r5
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 1d183605030..d54cfa8fe84 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -4656,6 +4656,8 @@ static const struct opcode32 thumb32_opcodes[] =
      Identification Extension.  */
   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    0xf3af802d, 0xffffffff, "aut\tr12, lr, sp"},
+  {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),
+   0xfb500f00, 0xfff00ff0, "autg%c\t%12-15r, %16-19r, %0-3r"},
   {ARM_FEATURE_CORE_HIGH (ARM_EXT2_V8_1M_MAIN),
    0xf3af800f, 0xffffffff, "bti"},
   {ARM_FEATURE_CORE_HIGH_HIGH (ARM_EXT3_PACBTI),


More information about the Binutils-cvs mailing list