[PATCH, BINUTILS, AARCH64, 3/9] Add instruction SB for ARMv8.5-A
This patch is part of the patch series to add support for ARMv8.5-A extensions. (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/docs/ddi0596/a/a64-base-instructions-alphabetic-order) This instruction is retrospectively made optional for all versions of the architecture from ARMv8.0 to ARMv8.4 and is mandatory from ARMv8.5. Hence a new command line option of "+sb" is added for older architectures. *** include/ChangeLog *** 2018-10-09 Sudakshina Das <sudi.das@arm.com> * opcode/aarch64.h (AARCH64_FEATURE_SB): New. (AARCH64_ARCH_V8_5): Add AARCH64_FEATURE_SB by default. *** opcodes/ChangeLog *** 2018-10-09 Sudakshina Das <sudi.das@arm.com> * aarch64-tbl.h (aarch64_feature_sb): New. (SB, SB_INSN): New. (aarch64_opcode_table): Add entry for sb. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. *** gas/ChangeLog *** 2018-10-09 Sudakshina Das <sudi.das@arm.com> * config/tc-aarch64.c (aarch64_features): Add new "sb" option for older architectures. * doc/c-aarch64.texi: Document the same. * testsuite/gas/aarch64/sb.s: New. * testsuite/gas/aarch64/sb.d: New.
This commit is contained in:
parent
13c60ad7e1
commit
68dfbb92ef
|
@ -1,3 +1,11 @@
|
|||
2018-10-09 Sudakshina Das <sudi.das@arm.com>
|
||||
|
||||
* config/tc-aarch64.c (aarch64_features): Add new "sb" option
|
||||
for older architectures.
|
||||
* doc/c-aarch64.texi: Document the same.
|
||||
* testsuite/gas/aarch64/sb.s: New.
|
||||
* testsuite/gas/aarch64/sb.d: New.
|
||||
|
||||
2018-10-09 Sudakshina Das <sudi.das@arm.com>
|
||||
|
||||
* testsuite/gas/aarch64/armv8_5-a-dp.s: New.
|
||||
|
|
|
@ -8747,6 +8747,8 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = {
|
|||
AARCH64_ARCH_NONE},
|
||||
{"sha2", AARCH64_FEATURE (AARCH64_FEATURE_SHA2, 0),
|
||||
AARCH64_ARCH_NONE},
|
||||
{"sb", AARCH64_FEATURE (AARCH64_FEATURE_SB, 0),
|
||||
AARCH64_ARCH_NONE},
|
||||
{"aes", AARCH64_FEATURE (AARCH64_FEATURE_AES, 0),
|
||||
AARCH64_ARCH_NONE},
|
||||
{"sm4", AARCH64_FEATURE (AARCH64_FEATURE_SM4, 0),
|
||||
|
|
|
@ -181,6 +181,8 @@ automatically cause those extensions to be disabled.
|
|||
@item @code{fp16fml} @tab ARMv8.2-A @tab ARMv8.4-A or later
|
||||
@tab Enable ARMv8.2 16-bit floating-point multiplication variant support.
|
||||
This implies @code{fp16}.
|
||||
@item @code{sb} @tab ARMv8-A @tab ARMv8.5-A or later
|
||||
@tab Enable the speculation barrier instruction sb.
|
||||
@end multitable
|
||||
|
||||
@node AArch64 Syntax
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// Test file for AArch64 sb.
|
||||
|
||||
.text
|
||||
|
||||
sb
|
||||
SB
|
|
@ -0,0 +1,11 @@
|
|||
#source: sb.s
|
||||
#as: -march=armv8.5-a
|
||||
#objdump: -dr
|
||||
|
||||
.*: file format .*
|
||||
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+ <.*>:
|
||||
.*: d50330ff sb
|
||||
.*: d50330ff sb
|
|
@ -0,0 +1,11 @@
|
|||
#source: sb.s
|
||||
#as: -march=armv8-a+sb
|
||||
#objdump: -dr
|
||||
|
||||
.*: file format .*
|
||||
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+ <.*>:
|
||||
.*: d50330ff sb
|
||||
.*: d50330ff sb
|
|
@ -1,3 +1,8 @@
|
|||
2018-10-09 Sudakshina Das <sudi.das@arm.com>
|
||||
|
||||
* opcode/aarch64.h (AARCH64_FEATURE_SB): New.
|
||||
(AARCH64_ARCH_V8_5): Add AARCH64_FEATURE_SB by default.
|
||||
|
||||
2018-10-09 Sudakshina Das <sudi.das@arm.com>
|
||||
|
||||
* opcode/aarch64.h (AARCH64_FEATURE_FLAGMANIP): New.
|
||||
|
|
|
@ -68,6 +68,8 @@ typedef uint32_t aarch64_insn;
|
|||
#define AARCH64_FEATURE_FLAGMANIP 0x4000000000ULL
|
||||
/* FRINT[32,64][Z,X] insns. */
|
||||
#define AARCH64_FEATURE_FRINTTS 0x8000000000ULL
|
||||
/* SB instruction. */
|
||||
#define AARCH64_FEATURE_SB 0x10000000000ULL
|
||||
|
||||
/* Architectures are the sum of the base and extensions. */
|
||||
#define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \
|
||||
|
@ -94,7 +96,8 @@ typedef uint32_t aarch64_insn;
|
|||
#define AARCH64_ARCH_V8_5 AARCH64_FEATURE (AARCH64_ARCH_V8_4, \
|
||||
AARCH64_FEATURE_V8_5 \
|
||||
| AARCH64_FEATURE_FLAGMANIP \
|
||||
| AARCH64_FEATURE_FRINTTS)
|
||||
| AARCH64_FEATURE_FRINTTS \
|
||||
| AARCH64_FEATURE_SB)
|
||||
|
||||
|
||||
#define AARCH64_ARCH_NONE AARCH64_FEATURE (0, 0)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
2018-10-09 Sudakshina Das <sudi.das@arm.com>
|
||||
|
||||
* aarch64-tbl.h (aarch64_feature_sb): New.
|
||||
(SB, SB_INSN): New.
|
||||
(aarch64_opcode_table): Add entry for sb.
|
||||
* aarch64-asm-2.c: Regenerate.
|
||||
* aarch64-dis-2.c: Regenerate.
|
||||
* aarch64-opc-2.c: Regenerate.
|
||||
|
||||
2018-10-09 Sudakshina Das <sudi.das@arm.com>
|
||||
|
||||
* aarch64-tbl.h (aarch64_feature_flagmanip): New.
|
||||
|
|
|
@ -422,14 +422,14 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
|
|||
case 1162: /* movz */
|
||||
value = 1162; /* --> movz. */
|
||||
break;
|
||||
case 1204: /* autibsp */
|
||||
case 1203: /* autibz */
|
||||
case 1202: /* autiasp */
|
||||
case 1201: /* autiaz */
|
||||
case 1200: /* pacibsp */
|
||||
case 1199: /* pacibz */
|
||||
case 1198: /* paciasp */
|
||||
case 1197: /* paciaz */
|
||||
case 1205: /* autibsp */
|
||||
case 1204: /* autibz */
|
||||
case 1203: /* autiasp */
|
||||
case 1202: /* autiaz */
|
||||
case 1201: /* pacibsp */
|
||||
case 1200: /* pacibz */
|
||||
case 1199: /* paciasp */
|
||||
case 1198: /* paciaz */
|
||||
case 1182: /* psb */
|
||||
case 1181: /* esb */
|
||||
case 1180: /* autib1716 */
|
||||
|
@ -452,132 +452,132 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
|
|||
case 1184: /* dsb */
|
||||
value = 1184; /* --> dsb. */
|
||||
break;
|
||||
case 1193: /* tlbi */
|
||||
case 1192: /* ic */
|
||||
case 1191: /* dc */
|
||||
case 1190: /* at */
|
||||
case 1189: /* sys */
|
||||
value = 1189; /* --> sys. */
|
||||
case 1194: /* tlbi */
|
||||
case 1193: /* ic */
|
||||
case 1192: /* dc */
|
||||
case 1191: /* at */
|
||||
case 1190: /* sys */
|
||||
value = 1190; /* --> sys. */
|
||||
break;
|
||||
case 2002: /* bic */
|
||||
case 1252: /* and */
|
||||
value = 1252; /* --> and. */
|
||||
case 2003: /* bic */
|
||||
case 1253: /* and */
|
||||
value = 1253; /* --> and. */
|
||||
break;
|
||||
case 1235: /* mov */
|
||||
case 1254: /* and */
|
||||
value = 1254; /* --> and. */
|
||||
case 1236: /* mov */
|
||||
case 1255: /* and */
|
||||
value = 1255; /* --> and. */
|
||||
break;
|
||||
case 1239: /* movs */
|
||||
case 1255: /* ands */
|
||||
value = 1255; /* --> ands. */
|
||||
case 1240: /* movs */
|
||||
case 1256: /* ands */
|
||||
value = 1256; /* --> ands. */
|
||||
break;
|
||||
case 2003: /* cmple */
|
||||
case 1290: /* cmpge */
|
||||
value = 1290; /* --> cmpge. */
|
||||
case 2004: /* cmple */
|
||||
case 1291: /* cmpge */
|
||||
value = 1291; /* --> cmpge. */
|
||||
break;
|
||||
case 2006: /* cmplt */
|
||||
case 1293: /* cmpgt */
|
||||
value = 1293; /* --> cmpgt. */
|
||||
case 2007: /* cmplt */
|
||||
case 1294: /* cmpgt */
|
||||
value = 1294; /* --> cmpgt. */
|
||||
break;
|
||||
case 2004: /* cmplo */
|
||||
case 1295: /* cmphi */
|
||||
value = 1295; /* --> cmphi. */
|
||||
case 2005: /* cmplo */
|
||||
case 1296: /* cmphi */
|
||||
value = 1296; /* --> cmphi. */
|
||||
break;
|
||||
case 2005: /* cmpls */
|
||||
case 1298: /* cmphs */
|
||||
value = 1298; /* --> cmphs. */
|
||||
case 2006: /* cmpls */
|
||||
case 1299: /* cmphs */
|
||||
value = 1299; /* --> cmphs. */
|
||||
break;
|
||||
case 1232: /* mov */
|
||||
case 1320: /* cpy */
|
||||
value = 1320; /* --> cpy. */
|
||||
break;
|
||||
case 1234: /* mov */
|
||||
case 1233: /* mov */
|
||||
case 1321: /* cpy */
|
||||
value = 1321; /* --> cpy. */
|
||||
break;
|
||||
case 2013: /* fmov */
|
||||
case 1237: /* mov */
|
||||
case 1235: /* mov */
|
||||
case 1322: /* cpy */
|
||||
value = 1322; /* --> cpy. */
|
||||
break;
|
||||
case 1227: /* mov */
|
||||
case 1334: /* dup */
|
||||
value = 1334; /* --> dup. */
|
||||
case 2014: /* fmov */
|
||||
case 1238: /* mov */
|
||||
case 1323: /* cpy */
|
||||
value = 1323; /* --> cpy. */
|
||||
break;
|
||||
case 1229: /* mov */
|
||||
case 1226: /* mov */
|
||||
case 1228: /* mov */
|
||||
case 1335: /* dup */
|
||||
value = 1335; /* --> dup. */
|
||||
break;
|
||||
case 2012: /* fmov */
|
||||
case 1231: /* mov */
|
||||
case 1230: /* mov */
|
||||
case 1227: /* mov */
|
||||
case 1336: /* dup */
|
||||
value = 1336; /* --> dup. */
|
||||
break;
|
||||
case 1230: /* mov */
|
||||
case 1337: /* dupm */
|
||||
value = 1337; /* --> dupm. */
|
||||
case 2013: /* fmov */
|
||||
case 1232: /* mov */
|
||||
case 1337: /* dup */
|
||||
value = 1337; /* --> dup. */
|
||||
break;
|
||||
case 2007: /* eon */
|
||||
case 1339: /* eor */
|
||||
value = 1339; /* --> eor. */
|
||||
case 1231: /* mov */
|
||||
case 1338: /* dupm */
|
||||
value = 1338; /* --> dupm. */
|
||||
break;
|
||||
case 1240: /* not */
|
||||
case 1341: /* eor */
|
||||
value = 1341; /* --> eor. */
|
||||
case 2008: /* eon */
|
||||
case 1340: /* eor */
|
||||
value = 1340; /* --> eor. */
|
||||
break;
|
||||
case 1241: /* nots */
|
||||
case 1342: /* eors */
|
||||
value = 1342; /* --> eors. */
|
||||
case 1241: /* not */
|
||||
case 1342: /* eor */
|
||||
value = 1342; /* --> eor. */
|
||||
break;
|
||||
case 2008: /* facle */
|
||||
case 1347: /* facge */
|
||||
value = 1347; /* --> facge. */
|
||||
case 1242: /* nots */
|
||||
case 1343: /* eors */
|
||||
value = 1343; /* --> eors. */
|
||||
break;
|
||||
case 2009: /* faclt */
|
||||
case 1348: /* facgt */
|
||||
value = 1348; /* --> facgt. */
|
||||
case 2009: /* facle */
|
||||
case 1348: /* facge */
|
||||
value = 1348; /* --> facge. */
|
||||
break;
|
||||
case 2010: /* fcmle */
|
||||
case 1361: /* fcmge */
|
||||
value = 1361; /* --> fcmge. */
|
||||
case 2010: /* faclt */
|
||||
case 1349: /* facgt */
|
||||
value = 1349; /* --> facgt. */
|
||||
break;
|
||||
case 2011: /* fcmlt */
|
||||
case 1363: /* fcmgt */
|
||||
value = 1363; /* --> fcmgt. */
|
||||
case 2011: /* fcmle */
|
||||
case 1362: /* fcmge */
|
||||
value = 1362; /* --> fcmge. */
|
||||
break;
|
||||
case 2012: /* fcmlt */
|
||||
case 1364: /* fcmgt */
|
||||
value = 1364; /* --> fcmgt. */
|
||||
break;
|
||||
case 1225: /* fmov */
|
||||
case 1370: /* fcpy */
|
||||
value = 1370; /* --> fcpy. */
|
||||
break;
|
||||
case 1224: /* fmov */
|
||||
case 1369: /* fcpy */
|
||||
value = 1369; /* --> fcpy. */
|
||||
case 1393: /* fdup */
|
||||
value = 1393; /* --> fdup. */
|
||||
break;
|
||||
case 1223: /* fmov */
|
||||
case 1392: /* fdup */
|
||||
value = 1392; /* --> fdup. */
|
||||
break;
|
||||
case 1225: /* mov */
|
||||
case 1723: /* orr */
|
||||
value = 1723; /* --> orr. */
|
||||
break;
|
||||
case 2014: /* orn */
|
||||
case 1226: /* mov */
|
||||
case 1724: /* orr */
|
||||
value = 1724; /* --> orr. */
|
||||
break;
|
||||
case 1228: /* mov */
|
||||
case 1726: /* orr */
|
||||
value = 1726; /* --> orr. */
|
||||
case 2015: /* orn */
|
||||
case 1725: /* orr */
|
||||
value = 1725; /* --> orr. */
|
||||
break;
|
||||
case 1238: /* movs */
|
||||
case 1727: /* orrs */
|
||||
value = 1727; /* --> orrs. */
|
||||
case 1229: /* mov */
|
||||
case 1727: /* orr */
|
||||
value = 1727; /* --> orr. */
|
||||
break;
|
||||
case 1233: /* mov */
|
||||
case 1789: /* sel */
|
||||
value = 1789; /* --> sel. */
|
||||
case 1239: /* movs */
|
||||
case 1728: /* orrs */
|
||||
value = 1728; /* --> orrs. */
|
||||
break;
|
||||
case 1236: /* mov */
|
||||
case 1234: /* mov */
|
||||
case 1790: /* sel */
|
||||
value = 1790; /* --> sel. */
|
||||
break;
|
||||
case 1237: /* mov */
|
||||
case 1791: /* sel */
|
||||
value = 1791; /* --> sel. */
|
||||
break;
|
||||
default: return NULL;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -294,17 +294,17 @@ static const unsigned op_enum_table [] =
|
|||
389,
|
||||
411,
|
||||
413,
|
||||
1228,
|
||||
1233,
|
||||
1226,
|
||||
1225,
|
||||
1229,
|
||||
1236,
|
||||
1238,
|
||||
1234,
|
||||
1227,
|
||||
1226,
|
||||
1230,
|
||||
1237,
|
||||
1239,
|
||||
1235,
|
||||
1241,
|
||||
1240,
|
||||
1236,
|
||||
1242,
|
||||
1241,
|
||||
129,
|
||||
};
|
||||
|
||||
|
|
|
@ -2165,6 +2165,8 @@ static const aarch64_feature_set aarch64_feature_flagmanip =
|
|||
AARCH64_FEATURE (AARCH64_FEATURE_FLAGMANIP, 0);
|
||||
static const aarch64_feature_set aarch64_feature_frintts =
|
||||
AARCH64_FEATURE (AARCH64_FEATURE_FRINTTS, 0);
|
||||
static const aarch64_feature_set aarch64_feature_sb =
|
||||
AARCH64_FEATURE (AARCH64_FEATURE_SB, 0);
|
||||
|
||||
|
||||
#define CORE &aarch64_feature_v8
|
||||
|
@ -2196,6 +2198,7 @@ static const aarch64_feature_set aarch64_feature_frintts =
|
|||
#define ARMV8_5 &aarch64_feature_v8_5
|
||||
#define FLAGMANIP &aarch64_feature_flagmanip
|
||||
#define FRINTTS &aarch64_feature_frintts
|
||||
#define SB &aarch64_feature_sb
|
||||
|
||||
#define CORE_INSN(NAME,OPCODE,MASK,CLASS,OP,OPS,QUALS,FLAGS) \
|
||||
{ NAME, OPCODE, MASK, CLASS, OP, CORE, OPS, QUALS, FLAGS, 0, 0, NULL }
|
||||
|
@ -2253,6 +2256,8 @@ static const aarch64_feature_set aarch64_feature_frintts =
|
|||
{ NAME, OPCODE, MASK, CLASS, 0, FLAGMANIP, OPS, QUALS, FLAGS, 0, 0, NULL }
|
||||
#define FRINTTS_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS,FLAGS) \
|
||||
{ NAME, OPCODE, MASK, CLASS, 0, FRINTTS, OPS, QUALS, FLAGS, 0, 0, NULL }
|
||||
#define SB_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS,FLAGS) \
|
||||
{ NAME, OPCODE, MASK, CLASS, 0, SB, OPS, QUALS, FLAGS, 0, 0, NULL }
|
||||
|
||||
struct aarch64_opcode aarch64_opcode_table[] =
|
||||
{
|
||||
|
@ -3518,6 +3523,7 @@ struct aarch64_opcode aarch64_opcode_table[] =
|
|||
CORE_INSN ("pssbb", 0xd503349f, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
|
||||
CORE_INSN ("dmb", 0xd50330bf, 0xfffff0ff, ic_system, 0, OP1 (BARRIER), {}, 0),
|
||||
CORE_INSN ("isb", 0xd50330df, 0xfffff0ff, ic_system, 0, OP1 (BARRIER_ISB), {}, F_OPD0_OPT | F_DEFAULT (0xF)),
|
||||
SB_INSN ("sb", 0xd50330ff, 0xffffffff, ic_system, OP0 (), {}, 0),
|
||||
CORE_INSN ("sys", 0xd5080000, 0xfff80000, ic_system, 0, OP5 (UIMM3_OP1, CRn, CRm, UIMM3_OP2, Rt), QL_SYS, F_HAS_ALIAS | F_OPD4_OPT | F_DEFAULT (0x1F)),
|
||||
CORE_INSN ("at", 0xd5080000, 0xfff80000, ic_system, 0, OP2 (SYSREG_AT, Rt), QL_SRC_X, F_ALIAS),
|
||||
CORE_INSN ("dc", 0xd5080000, 0xfff80000, ic_system, 0, OP2 (SYSREG_DC, Rt), QL_SRC_X, F_ALIAS),
|
||||
|
|
Loading…
Reference in New Issue