[AArch64] Support for ARMv8.1a Limited Ordering Regions extension

2015-06-02  Matthew Wahab  <matthew.wahab@arm.com>
include/
  * aarch64.h (AARCH64_FEATURE_LOR): New.

opcodes/
  * aarch64-tbl.h (aarch64_feature_lor): New.
  (LOR): New.
  (aarch64_opdocde_table): Add "ldlar", "ldlarb", "ldlarh", "stllr",
  "stllrb", "stllrh".
  * aarch64-asm-2.c: Regenerate.
  * aarch64-dis-2.c: Regenerate.
  * aarch64-opc-2.c: Regenerate.

gas/
  * config/tc-aarch64.c (aarch64_features): Add "lor".
  * doc/c-aarch64.c (Aarch64 Extensions): Add "lor" to list of
  architecture extensions.

gas/testsuite/
  * lor-directive.d: New.
  * lor.d: New.
  * lor.s: New.
This commit is contained in:
Matthew Wahab 2015-06-02 11:29:15 +01:00 committed by Jiong Wang
parent 8d683210f1
commit 290806fd94
14 changed files with 589 additions and 401 deletions

View file

@ -1,3 +1,9 @@
2015-06-02 Matthew Wahab <matthew.wahab@arm.com>
* config/tc-aarch64.c (aarch64_features): Add "lor".
* doc/c-aarch64.c (Aarch64 Extensions): Add "lor" to list of
architecture extensions.
2015-06-01 Matthew Wahab <matthew.wahab@arm.com>
* config/tc-aarch64.c (parse_sys_reg): New parameter. Check target

View file

@ -7400,6 +7400,7 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = {
{"lse", AARCH64_FEATURE (AARCH64_FEATURE_LSE, 0)},
{"simd", AARCH64_FEATURE (AARCH64_FEATURE_SIMD, 0)},
{"pan", AARCH64_FEATURE (AARCH64_FEATURE_PAN, 0)},
{"lor", AARCH64_FEATURE (AARCH64_FEATURE_LOR, 0)},
{NULL, AARCH64_ARCH_NONE}
};

View file

@ -135,6 +135,8 @@ automatically cause those extensions to be disabled.
@tab Enable Advanced SIMD extensions. This implies @code{fp}.
@item @code{pan} @tab ARMv8-A @tab ARMv8-A or later
@tab Enable Privileged Access Never support.
@item @code{lor} @tab ARMv8-A @tab ARMv8-A or later
@tab Enable Limited Ordering Regions extensions.
@end multitable
@node AArch64 Syntax

View file

@ -1,3 +1,9 @@
2015-06-02 Matthew Wahab <matthew.wahab@arm.com>
* lor-directive.d: New.
* lor.d: New.
* lor.s: New
2015-06-01 Matthew Wahab <matthew.wahab@arm.com>
* pan-directive.d: New.

View file

@ -0,0 +1,25 @@
#objdump: -dr
#as: --defsym DIRECTIVE=1
#source: lor.s
.*: file format .*
Disassembly of section \.text:
0000000000000000 <.text>:
0: 889f7c00 stllr w0, \[x0\]
4: c89f7c00 stllr x0, \[x0\]
8: 889f7c01 stllr w1, \[x0\]
c: c89f7c22 stllr x2, \[x1\]
10: 489f7c43 stllrh w3, \[x2\]
14: 089f7c64 stllrb w4, \[x3\]
18: 089f7fe5 stllrb w5, \[sp\]
1c: 88df7c00 ldlar w0, \[x0\]
20: c8df7c00 ldlar x0, \[x0\]
24: 88df7c01 ldlar w1, \[x0\]
28: c8df7c22 ldlar x2, \[x1\]
2c: 08df7c43 ldlarb w3, \[x2\]
30: 48df7c64 ldlarh w4, \[x3\]
34: 88df7fe5 ldlar w5, \[sp\]

View file

@ -0,0 +1,23 @@
#objdump: -dr
#as: -march=armv8-a+lor
.*: file format .*
Disassembly of section \.text:
0000000000000000 <.text>:
0: 889f7c00 stllr w0, \[x0\]
4: c89f7c00 stllr x0, \[x0\]
8: 889f7c01 stllr w1, \[x0\]
c: c89f7c22 stllr x2, \[x1\]
10: 489f7c43 stllrh w3, \[x2\]
14: 089f7c64 stllrb w4, \[x3\]
18: 089f7fe5 stllrb w5, \[sp\]
1c: 88df7c00 ldlar w0, \[x0\]
20: c8df7c00 ldlar x0, \[x0\]
24: 88df7c01 ldlar w1, \[x0\]
28: c8df7c22 ldlar x2, \[x1\]
2c: 08df7c43 ldlarb w3, \[x2\]
30: 48df7c64 ldlarh w4, \[x3\]
34: 88df7fe5 ldlar w5, \[sp\]

View file

@ -0,0 +1,43 @@
/* lor.s Test file for AArch64 LOR extension instructions.
Copyright (C) 2015 Free Software Foundation, Inc. Contributed by ARM Ltd.
This file is part of GAS.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the license, or
(at your option) any later version.
GAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING3. If not,
see <http://www.gnu.org/licenses/>. */
.text
.ifdef DIRECTIVE
.arch_extension lor
.endif
stllr w0, [x0]
stllr x0, [x0]
stllr w1, [x0]
stllr x2, [x1]
stllrh w3, [x2]
stllrb w4, [x3]
stllrb w5, [sp]
ldlar w0, [x0]
ldlar x0, [x0]
ldlar w1, [x0]
ldlar x2, [x1]
ldlarb w3, [x2]
ldlarh w4, [x3]
ldlar w5, [sp]

View file

@ -1,3 +1,7 @@
2015-06-02 Matthew Wahab <matthew.wahab@arm.com>
* aarch64.h (AARCH64_FEATURE_LOR): New.
2015-06-01 Matthew Wahab <matthew.wahab@arm.com>
* aarch64.h (AARCH64_FEATURE_PAN): New.

View file

@ -40,6 +40,7 @@ typedef uint32_t aarch64_insn;
#define AARCH64_FEATURE_CRC 0x00080000 /* CRC instructions. */
#define AARCH64_FEATURE_LSE 0x00100000 /* LSE instructions. */
#define AARCH64_FEATURE_PAN 0x00200000 /* PAN instructions. */
#define AARCH64_FEATURE_LOR 0x00400000 /* LOR instructions. */
/* Architectures are the sum of the base and extensions. */
#define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \

View file

@ -1,3 +1,13 @@
2015-06-02 Matthew Wahab <matthew.wahab@arm.com>
* aarch64-tbl.h (aarch64_feature_lor): New.
(LOR): New.
(aarch64_opdocde_table): Add "ldlar", "ldlarb", "ldlarh", "stllr",
"stllrb", "stllrh".
* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-opc-2.c: Regenerate.
2015-06-01 Matthew Wahab <matthew.wahab@arm.com>
* aarch64-opc.c (F_ARCHEXT): New.

View file

@ -155,188 +155,188 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
case 595: /* ror */
value = 594; /* --> extr. */
break;
case 746: /* bic */
value = 745; /* --> and. */
case 752: /* bic */
value = 751; /* --> and. */
break;
case 748: /* mov */
value = 747; /* --> orr. */
case 754: /* mov */
value = 753; /* --> orr. */
break;
case 751: /* tst */
value = 750; /* --> ands. */
case 757: /* tst */
value = 756; /* --> ands. */
break;
case 756: /* uxtw */
case 755: /* mov */
value = 754; /* --> orr. */
case 762: /* uxtw */
case 761: /* mov */
value = 760; /* --> orr. */
break;
case 758: /* mvn */
value = 757; /* --> orn. */
case 764: /* mvn */
value = 763; /* --> orn. */
break;
case 762: /* tst */
value = 761; /* --> ands. */
case 768: /* tst */
value = 767; /* --> ands. */
break;
case 888: /* staddb */
value = 792; /* --> ldaddb. */
case 894: /* staddb */
value = 798; /* --> ldaddb. */
break;
case 889: /* staddh */
value = 793; /* --> ldaddh. */
case 895: /* staddh */
value = 799; /* --> ldaddh. */
break;
case 890: /* stadd */
value = 794; /* --> ldadd. */
case 896: /* stadd */
value = 800; /* --> ldadd. */
break;
case 891: /* staddlb */
value = 796; /* --> ldaddlb. */
case 897: /* staddlb */
value = 802; /* --> ldaddlb. */
break;
case 892: /* staddlh */
value = 799; /* --> ldaddlh. */
case 898: /* staddlh */
value = 805; /* --> ldaddlh. */
break;
case 893: /* staddl */
value = 802; /* --> ldaddl. */
case 899: /* staddl */
value = 808; /* --> ldaddl. */
break;
case 894: /* stclrb */
value = 804; /* --> ldclrb. */
case 900: /* stclrb */
value = 810; /* --> ldclrb. */
break;
case 895: /* stclrh */
value = 805; /* --> ldclrh. */
case 901: /* stclrh */
value = 811; /* --> ldclrh. */
break;
case 896: /* stclr */
value = 806; /* --> ldclr. */
case 902: /* stclr */
value = 812; /* --> ldclr. */
break;
case 897: /* stclrlb */
value = 808; /* --> ldclrlb. */
case 903: /* stclrlb */
value = 814; /* --> ldclrlb. */
break;
case 898: /* stclrlh */
value = 811; /* --> ldclrlh. */
case 904: /* stclrlh */
value = 817; /* --> ldclrlh. */
break;
case 899: /* stclrl */
value = 814; /* --> ldclrl. */
case 905: /* stclrl */
value = 820; /* --> ldclrl. */
break;
case 900: /* steorb */
value = 816; /* --> ldeorb. */
case 906: /* steorb */
value = 822; /* --> ldeorb. */
break;
case 901: /* steorh */
value = 817; /* --> ldeorh. */
case 907: /* steorh */
value = 823; /* --> ldeorh. */
break;
case 902: /* steor */
value = 818; /* --> ldeor. */
case 908: /* steor */
value = 824; /* --> ldeor. */
break;
case 903: /* steorlb */
value = 820; /* --> ldeorlb. */
case 909: /* steorlb */
value = 826; /* --> ldeorlb. */
break;
case 904: /* steorlh */
value = 823; /* --> ldeorlh. */
case 910: /* steorlh */
value = 829; /* --> ldeorlh. */
break;
case 905: /* steorl */
value = 826; /* --> ldeorl. */
case 911: /* steorl */
value = 832; /* --> ldeorl. */
break;
case 906: /* stsetb */
value = 828; /* --> ldsetb. */
case 912: /* stsetb */
value = 834; /* --> ldsetb. */
break;
case 907: /* stseth */
value = 829; /* --> ldseth. */
case 913: /* stseth */
value = 835; /* --> ldseth. */
break;
case 908: /* stset */
value = 830; /* --> ldset. */
case 914: /* stset */
value = 836; /* --> ldset. */
break;
case 909: /* stsetlb */
value = 832; /* --> ldsetlb. */
case 915: /* stsetlb */
value = 838; /* --> ldsetlb. */
break;
case 910: /* stsetlh */
value = 835; /* --> ldsetlh. */
case 916: /* stsetlh */
value = 841; /* --> ldsetlh. */
break;
case 911: /* stsetl */
value = 838; /* --> ldsetl. */
case 917: /* stsetl */
value = 844; /* --> ldsetl. */
break;
case 912: /* stsmaxb */
value = 840; /* --> ldsmaxb. */
case 918: /* stsmaxb */
value = 846; /* --> ldsmaxb. */
break;
case 913: /* stsmaxh */
value = 841; /* --> ldsmaxh. */
case 919: /* stsmaxh */
value = 847; /* --> ldsmaxh. */
break;
case 914: /* stsmax */
value = 842; /* --> ldsmax. */
case 920: /* stsmax */
value = 848; /* --> ldsmax. */
break;
case 915: /* stsmaxlb */
value = 844; /* --> ldsmaxlb. */
case 921: /* stsmaxlb */
value = 850; /* --> ldsmaxlb. */
break;
case 916: /* stsmaxlh */
value = 847; /* --> ldsmaxlh. */
case 922: /* stsmaxlh */
value = 853; /* --> ldsmaxlh. */
break;
case 917: /* stsmaxl */
value = 850; /* --> ldsmaxl. */
case 923: /* stsmaxl */
value = 856; /* --> ldsmaxl. */
break;
case 918: /* stsminb */
value = 852; /* --> ldsminb. */
case 924: /* stsminb */
value = 858; /* --> ldsminb. */
break;
case 919: /* stsminh */
value = 853; /* --> ldsminh. */
case 925: /* stsminh */
value = 859; /* --> ldsminh. */
break;
case 920: /* stsmin */
value = 854; /* --> ldsmin. */
case 926: /* stsmin */
value = 860; /* --> ldsmin. */
break;
case 921: /* stsminlb */
value = 856; /* --> ldsminlb. */
case 927: /* stsminlb */
value = 862; /* --> ldsminlb. */
break;
case 922: /* stsminlh */
value = 859; /* --> ldsminlh. */
case 928: /* stsminlh */
value = 865; /* --> ldsminlh. */
break;
case 923: /* stsminl */
value = 862; /* --> ldsminl. */
case 929: /* stsminl */
value = 868; /* --> ldsminl. */
break;
case 924: /* stumaxb */
value = 864; /* --> ldumaxb. */
case 930: /* stumaxb */
value = 870; /* --> ldumaxb. */
break;
case 925: /* stumaxh */
value = 865; /* --> ldumaxh. */
case 931: /* stumaxh */
value = 871; /* --> ldumaxh. */
break;
case 926: /* stumax */
value = 866; /* --> ldumax. */
case 932: /* stumax */
value = 872; /* --> ldumax. */
break;
case 927: /* stumaxlb */
value = 868; /* --> ldumaxlb. */
case 933: /* stumaxlb */
value = 874; /* --> ldumaxlb. */
break;
case 928: /* stumaxlh */
value = 871; /* --> ldumaxlh. */
case 934: /* stumaxlh */
value = 877; /* --> ldumaxlh. */
break;
case 929: /* stumaxl */
value = 874; /* --> ldumaxl. */
case 935: /* stumaxl */
value = 880; /* --> ldumaxl. */
break;
case 930: /* stuminb */
value = 876; /* --> lduminb. */
case 936: /* stuminb */
value = 882; /* --> lduminb. */
break;
case 931: /* stuminh */
value = 877; /* --> lduminh. */
case 937: /* stuminh */
value = 883; /* --> lduminh. */
break;
case 932: /* stumin */
value = 878; /* --> ldumin. */
case 938: /* stumin */
value = 884; /* --> ldumin. */
break;
case 933: /* stuminlb */
value = 880; /* --> lduminlb. */
case 939: /* stuminlb */
value = 886; /* --> lduminlb. */
break;
case 934: /* stuminlh */
value = 883; /* --> lduminlh. */
case 940: /* stuminlh */
value = 889; /* --> lduminlh. */
break;
case 935: /* stuminl */
value = 886; /* --> lduminl. */
case 941: /* stuminl */
value = 892; /* --> lduminl. */
break;
case 937: /* mov */
value = 936; /* --> movn. */
case 943: /* mov */
value = 942; /* --> movn. */
break;
case 939: /* mov */
value = 938; /* --> movz. */
case 945: /* mov */
value = 944; /* --> movz. */
break;
case 950: /* sevl */
case 949: /* sev */
case 948: /* wfi */
case 947: /* wfe */
case 946: /* yield */
case 945: /* nop */
value = 944; /* --> hint. */
case 956: /* sevl */
case 955: /* sev */
case 954: /* wfi */
case 953: /* wfe */
case 952: /* yield */
case 951: /* nop */
value = 950; /* --> hint. */
break;
case 959: /* tlbi */
case 958: /* ic */
case 957: /* dc */
case 956: /* at */
value = 955; /* --> sys. */
case 965: /* tlbi */
case 964: /* ic */
case 963: /* dc */
case 962: /* at */
value = 961; /* --> sys. */
break;
default: return NULL;
}

File diff suppressed because it is too large Load diff

View file

@ -145,24 +145,24 @@ static const unsigned op_enum_table [] =
697,
703,
704,
741,
742,
743,
744,
747,
748,
749,
750,
12,
510,
511,
936,
938,
940,
748,
939,
937,
942,
944,
946,
754,
945,
943,
259,
499,
509,
508,
746,
752,
505,
502,
495,
@ -171,7 +171,7 @@ static const unsigned op_enum_table [] =
504,
506,
507,
756,
762,
526,
529,
532,

View file

@ -1222,6 +1222,8 @@ static const aarch64_feature_set aarch64_feature_crc =
AARCH64_FEATURE (AARCH64_FEATURE_CRC, 0);
static const aarch64_feature_set aarch64_feature_lse =
AARCH64_FEATURE (AARCH64_FEATURE_LSE, 0);
static const aarch64_feature_set aarch64_feature_lor =
AARCH64_FEATURE (AARCH64_FEATURE_LOR, 0);
#define CORE &aarch64_feature_v8
#define FP &aarch64_feature_fp
@ -1229,6 +1231,7 @@ static const aarch64_feature_set aarch64_feature_lse =
#define CRYPTO &aarch64_feature_crypto
#define CRC &aarch64_feature_crc
#define LSE &aarch64_feature_lse
#define LOR &aarch64_feature_lor
struct aarch64_opcode aarch64_opcode_table[] =
{
@ -2017,6 +2020,13 @@ struct aarch64_opcode aarch64_opcode_table[] =
{"ldaxp", 0x887f8000, 0xbfe08000, ldstexcl, 0, CORE, OP3 (Rt, Rt2, ADDR_SIMPLE), QL_R2NIL, F_GPRSIZE_IN_Q},
{"stlr", 0x889ffc00, 0xbfe08000, ldstexcl, 0, CORE, OP2 (Rt, ADDR_SIMPLE), QL_R1NIL, F_GPRSIZE_IN_Q},
{"ldar", 0x88dffc00, 0xbfeffc00, ldstexcl, 0, CORE, OP2 (Rt, ADDR_SIMPLE), QL_R1NIL, F_GPRSIZE_IN_Q},
/* Limited Ordering Regions load/store instructions. */
{"ldlar", 0x88df7c00, 0xbfe08000, ldstexcl, 0, LOR, OP2 (Rt, ADDR_SIMPLE), QL_R1NIL, F_GPRSIZE_IN_Q},
{"ldlarb", 0x08df7c00, 0xffe08000, ldstexcl, 0, LOR, OP2 (Rt, ADDR_SIMPLE), QL_W1_LDST_EXC, 0},
{"ldlarh", 0x48df7c00, 0xffe08000, ldstexcl, 0, LOR, OP2 (Rt, ADDR_SIMPLE), QL_W1_LDST_EXC, 0},
{"stllr", 0x889f7c00, 0xbfe08000, ldstexcl, 0, LOR, OP2 (Rt, ADDR_SIMPLE), QL_R1NIL, F_GPRSIZE_IN_Q},
{"stllrb", 0x089f7c00, 0xffe08000, ldstexcl, 0, LOR, OP2 (Rt, ADDR_SIMPLE), QL_W1_LDST_EXC, 0},
{"stllrh", 0x489f7c00, 0xbfe08000, ldstexcl, 0, LOR, OP2 (Rt, ADDR_SIMPLE), QL_W1_LDST_EXC, 0},
/* Load/store no-allocate pair (offset). */
{"stnp", 0x28000000, 0x7fc00000, ldstnapair_offs, 0, CORE, OP3 (Rt, Rt2, ADDR_SIMM7), QL_LDST_PAIR_R, F_SF},
{"ldnp", 0x28400000, 0x7fc00000, ldstnapair_offs, 0, CORE, OP3 (Rt, Rt2, ADDR_SIMM7), QL_LDST_PAIR_R, F_SF},