This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/2][ARM][binutils] Add support for ARMv8.1 PAN extension
- From: Matthew Wahab <matthew dot wahab at arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 21 May 2015 10:06:46 +0100
- Subject: [PATCH 1/2][ARM][binutils] Add support for ARMv8.1 PAN extension
- Authentication-results: sourceware.org; auth=none
The ARMv8.1 architecture introduces the Aarch32 Privileged Access Never
extension. This adds a new instruction SETPAN, with ARM and Thumb encodings to
write to a new CPSR.PAN bit.
This patch adds support to binutils for the PAN extension and the SETPAN
instructions. A following patch adds support to gas.
Tested for arm-none-linux-gnueabihf with check-binutils and check-gas.
Ok for trunk?
Matthew
include/opcode/
2015-05-21 Matthew Wahab <matthew.wahab@arm.com>
* arm.h (ARM_EXT2_PAN): New.
(ARM_FEATURE_CORE_HIGH): New.
opcodes/
2015-05-21 Matthew Wahab <matthew.wahab@arm.com>
* arm-dis.c (arm_opcodes): Add "setpan".
(thumb_opcodes): Add "setpan".
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index cbe9e7d..9736943 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -57,6 +57,8 @@
state. */
#define ARM_EXT_VIRT 0x80000000 /* Virtualization extensions. */
+#define ARM_EXT2_PAN 0x00000001 /* PAN extension. */
+
/* Co-processor space extensions. */
#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */
#define ARM_CEXT_MAVERICK 0x00000002 /* Use Cirrus/DSP coprocessor. */
@@ -321,5 +323,6 @@ typedef struct
#define ARM_FEATURE_LOW(core, coproc) {{(core), 0}, (coproc)}
#define ARM_FEATURE_CORE_LOW(core) {{(core), 0}, 0}
+#define ARM_FEATURE_CORE_HIGH(core) {{0, (core)}, 0}
#define ARM_FEATURE_COPROC(coproc) {{0, 0}, (coproc)}
#define ARM_FEATURE(core1, core2, coproc) {{(core1), (core2)}, (coproc)}
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 9c2665d..3e1315f 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -1602,6 +1602,10 @@ static const struct opcode32 arm_opcodes[] =
{ARM_FEATURE_COPROC (CRC_EXT_ARMV8),
0xe1400240, 0xfff00ff0, "crc32cw\t%12-15R, %16-19R, %0-3R"},
+ /* Privileged Access Never extension instructions. */
+ {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN),
+ 0xf1100000, 0xfffffdff, "setpan\t#%9-9d"},
+
/* Virtualization Extension instructions. */
{ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x0160006e, 0x0fffffff, "eret%c"},
{ARM_FEATURE_CORE_LOW (ARM_EXT_VIRT), 0x01400070, 0x0ff000f0, "hvc%c\t%e"},
@@ -2293,6 +2297,7 @@ static const struct opcode16 thumb_opcodes[] =
/* ARM V8 instructions. */
{ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xbf50, 0xffff, "sevl%c"},
{ARM_FEATURE_CORE_LOW (ARM_EXT_V8), 0xba80, 0xffc0, "hlt\t%0-5x"},
+ {ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN), 0xb610, 0xfff7, "setpan\t#%3-3d"},
/* ARM V6K no-argument instructions. */
{ARM_FEATURE_CORE_LOW (ARM_EXT_V6K), 0xbf00, 0xffff, "nop%c"},