aboutsummaryrefslogtreecommitdiff
path: root/opcodes/aarch64-asm-2.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2014-09-03 14:40:41 +0100
committerJiong Wang <jiong.wang@arm.com>2014-09-03 14:53:53 +0100
commitee804238f097e91088a340c15891170f2748b4fd (patch)
tree22d92253b206d824681e73039fe861f8d20ec8df /opcodes/aarch64-asm-2.c
parent97ea6506c45ab5519483a0221fdc049038496492 (diff)
downloadgdb-ee804238f097e91088a340c15891170f2748b4fd.zip
gdb-ee804238f097e91088a340c15891170f2748b4fd.tar.gz
gdb-ee804238f097e91088a340c15891170f2748b4fd.tar.bz2
[PATCH/AArch64] Implement LSE feature
2014-09-03 Jiong Wang <jiong.wang@arm.com> gas/ * config/tc-aarch64.c (parse_operands): Recognize PAIRREG. (aarch64_features): Add entry for lse extension. include/opcode/ * aarch64.h (AARCH64_FEATURE_LSE): New feature added. (aarch64_opnd): Add AARCH64_OPND_PAIRREG. (aarch64_insn_class): Add lse_atomic. (F_LSE_SZ): New field added. (opcode_has_special_coder): Recognize F_LSE_SZ. opcode/ * aarch64-tbl.h (QL_R4NIL): New qualifiers. (aarch64_feature_lse): New feature added. (LSE): New Added. (aarch64_opcode_table): New LSE instructions added. Improve descriptions for ldarb/ldarh/ldar. (aarch64_opcode_table): Describe PAIRREG. * aarch64-opc.h (aarch64_field_kind): Add FLD_lse_sz. * aarch64-opc.c (fields): Add entry for F_LSE_SZ. (aarch64_print_operand): Recognize PAIRREG. (operand_general_constraint_met_p): Check reg pair constraints for CASP instructions. * aarch64-dis.c (aarch64_ext_regno_pair): New extractor for paired reg. (do_special_decoding): Recognize F_LSE_SZ. * aarch64-asm.c (do_special_encoding): Recognize F_LSE_SZ. gas/testsuite/ * gas/aarch64/lse-atomic.d: New. * gas/aarch64/lse-atomic.s: Likewise. * gas/aarch64/illegal-lse.d: Likewise. * gas/aarch64/illegal-lse.l: Likewise. * gas/aarch64/illegal-lse.s: Likewise. * gas/aarch64/diagnostic.s: Check processor feature detect for lse instruction. * gas/aarch64/diagnostic.l: Likewise.
Diffstat (limited to 'opcodes/aarch64-asm-2.c')
-rw-r--r--opcodes/aarch64-asm-2.c246
1 files changed, 195 insertions, 51 deletions
diff --git a/opcodes/aarch64-asm-2.c b/opcodes/aarch64-asm-2.c
index aa3343f..b5cf12c 100644
--- a/opcodes/aarch64-asm-2.c
+++ b/opcodes/aarch64-asm-2.c
@@ -210,25 +210,169 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
case 774: /* tst */
value = 773; /* --> ands. */
break;
- case 777: /* mov */
- value = 776; /* --> movn. */
- break;
- case 779: /* mov */
- value = 778; /* --> movz. */
- break;
- case 790: /* sevl */
- case 789: /* sev */
- case 788: /* wfi */
- case 787: /* wfe */
- case 786: /* yield */
- case 785: /* nop */
- value = 784; /* --> hint. */
- break;
- case 799: /* tlbi */
- case 798: /* ic */
- case 797: /* dc */
- case 796: /* at */
- value = 795; /* --> sys. */
+ case 900: /* staddb */
+ value = 804; /* --> ldaddb. */
+ break;
+ case 901: /* staddh */
+ value = 805; /* --> ldaddh. */
+ break;
+ case 902: /* stadd */
+ value = 806; /* --> ldadd. */
+ break;
+ case 903: /* staddlb */
+ value = 808; /* --> ldaddlb. */
+ break;
+ case 904: /* staddlh */
+ value = 811; /* --> ldaddlh. */
+ break;
+ case 905: /* staddl */
+ value = 814; /* --> ldaddl. */
+ break;
+ case 906: /* stclrb */
+ value = 816; /* --> ldclrb. */
+ break;
+ case 907: /* stclrh */
+ value = 817; /* --> ldclrh. */
+ break;
+ case 908: /* stclr */
+ value = 818; /* --> ldclr. */
+ break;
+ case 909: /* stclrlb */
+ value = 820; /* --> ldclrlb. */
+ break;
+ case 910: /* stclrlh */
+ value = 823; /* --> ldclrlh. */
+ break;
+ case 911: /* stclrl */
+ value = 826; /* --> ldclrl. */
+ break;
+ case 912: /* steorb */
+ value = 828; /* --> ldeorb. */
+ break;
+ case 913: /* steorh */
+ value = 829; /* --> ldeorh. */
+ break;
+ case 914: /* steor */
+ value = 830; /* --> ldeor. */
+ break;
+ case 915: /* steorlb */
+ value = 832; /* --> ldeorlb. */
+ break;
+ case 916: /* steorlh */
+ value = 835; /* --> ldeorlh. */
+ break;
+ case 917: /* steorl */
+ value = 838; /* --> ldeorl. */
+ break;
+ case 918: /* stsetb */
+ value = 840; /* --> ldsetb. */
+ break;
+ case 919: /* stseth */
+ value = 841; /* --> ldseth. */
+ break;
+ case 920: /* stset */
+ value = 842; /* --> ldset. */
+ break;
+ case 921: /* stsetlb */
+ value = 844; /* --> ldsetlb. */
+ break;
+ case 922: /* stsetlh */
+ value = 847; /* --> ldsetlh. */
+ break;
+ case 923: /* stsetl */
+ value = 850; /* --> ldsetl. */
+ break;
+ case 924: /* stsmaxb */
+ value = 852; /* --> ldsmaxb. */
+ break;
+ case 925: /* stsmaxh */
+ value = 853; /* --> ldsmaxh. */
+ break;
+ case 926: /* stsmax */
+ value = 854; /* --> ldsmax. */
+ break;
+ case 927: /* stsmaxlb */
+ value = 856; /* --> ldsmaxlb. */
+ break;
+ case 928: /* stsmaxlh */
+ value = 859; /* --> ldsmaxlh. */
+ break;
+ case 929: /* stsmaxl */
+ value = 862; /* --> ldsmaxl. */
+ break;
+ case 930: /* stsminb */
+ value = 864; /* --> ldsminb. */
+ break;
+ case 931: /* stsminh */
+ value = 865; /* --> ldsminh. */
+ break;
+ case 932: /* stsmin */
+ value = 866; /* --> ldsmin. */
+ break;
+ case 933: /* stsminlb */
+ value = 868; /* --> ldsminlb. */
+ break;
+ case 934: /* stsminlh */
+ value = 871; /* --> ldsminlh. */
+ break;
+ case 935: /* stsminl */
+ value = 874; /* --> ldsminl. */
+ break;
+ case 936: /* stumaxb */
+ value = 876; /* --> ldumaxb. */
+ break;
+ case 937: /* stumaxh */
+ value = 877; /* --> ldumaxh. */
+ break;
+ case 938: /* stumax */
+ value = 878; /* --> ldumax. */
+ break;
+ case 939: /* stumaxlb */
+ value = 880; /* --> ldumaxlb. */
+ break;
+ case 940: /* stumaxlh */
+ value = 883; /* --> ldumaxlh. */
+ break;
+ case 941: /* stumaxl */
+ value = 886; /* --> ldumaxl. */
+ break;
+ case 942: /* stuminb */
+ value = 888; /* --> lduminb. */
+ break;
+ case 943: /* stuminh */
+ value = 889; /* --> lduminh. */
+ break;
+ case 944: /* stumin */
+ value = 890; /* --> ldumin. */
+ break;
+ case 945: /* stuminlb */
+ value = 892; /* --> lduminlb. */
+ break;
+ case 946: /* stuminlh */
+ value = 895; /* --> lduminlh. */
+ break;
+ case 947: /* stuminl */
+ value = 898; /* --> lduminl. */
+ break;
+ case 949: /* mov */
+ value = 948; /* --> movn. */
+ break;
+ case 951: /* mov */
+ value = 950; /* --> movz. */
+ break;
+ case 962: /* sevl */
+ case 961: /* sev */
+ case 960: /* wfi */
+ case 959: /* wfe */
+ case 958: /* yield */
+ case 957: /* nop */
+ value = 956; /* --> hint. */
+ break;
+ case 971: /* tlbi */
+ case 970: /* ic */
+ case 969: /* dc */
+ case 968: /* at */
+ value = 967; /* --> sys. */
break;
default: return NULL;
}
@@ -255,11 +399,10 @@ aarch64_insert_operand (const aarch64_operand *self,
case 8:
case 9:
case 10:
- case 13:
case 14:
case 15:
case 16:
- case 18:
+ case 17:
case 19:
case 20:
case 21:
@@ -268,29 +411,29 @@ aarch64_insert_operand (const aarch64_operand *self,
case 24:
case 25:
case 26:
- case 34:
+ case 27:
case 35:
+ case 36:
return aarch64_ins_regno (self, info, code, inst);
- case 11:
- return aarch64_ins_reg_extended (self, info, code, inst);
case 12:
+ return aarch64_ins_reg_extended (self, info, code, inst);
+ case 13:
return aarch64_ins_reg_shifted (self, info, code, inst);
- case 17:
+ case 18:
return aarch64_ins_ft (self, info, code, inst);
- case 27:
case 28:
case 29:
- return aarch64_ins_reglane (self, info, code, inst);
case 30:
- return aarch64_ins_reglist (self, info, code, inst);
+ return aarch64_ins_reglane (self, info, code, inst);
case 31:
- return aarch64_ins_ldst_reglist (self, info, code, inst);
+ return aarch64_ins_reglist (self, info, code, inst);
case 32:
- return aarch64_ins_ldst_reglist_r (self, info, code, inst);
+ return aarch64_ins_ldst_reglist (self, info, code, inst);
case 33:
+ return aarch64_ins_ldst_reglist_r (self, info, code, inst);
+ case 34:
return aarch64_ins_ldst_elemlist (self, info, code, inst);
- case 36:
- case 45:
+ case 37:
case 46:
case 47:
case 48:
@@ -303,55 +446,56 @@ aarch64_insert_operand (const aarch64_operand *self,
case 55:
case 56:
case 57:
- case 66:
+ case 58:
case 67:
case 68:
case 69:
+ case 70:
return aarch64_ins_imm (self, info, code, inst);
- case 37:
case 38:
- return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
case 39:
+ return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
case 40:
case 41:
+ case 42:
return aarch64_ins_advsimd_imm_modified (self, info, code, inst);
- case 58:
- return aarch64_ins_limm (self, info, code, inst);
case 59:
- return aarch64_ins_aimm (self, info, code, inst);
+ return aarch64_ins_limm (self, info, code, inst);
case 60:
- return aarch64_ins_imm_half (self, info, code, inst);
+ return aarch64_ins_aimm (self, info, code, inst);
case 61:
+ return aarch64_ins_imm_half (self, info, code, inst);
+ case 62:
return aarch64_ins_fbits (self, info, code, inst);
- case 63:
case 64:
+ case 65:
return aarch64_ins_cond (self, info, code, inst);
- case 70:
- case 76:
- return aarch64_ins_addr_simple (self, info, code, inst);
case 71:
- return aarch64_ins_addr_regoff (self, info, code, inst);
+ case 77:
+ return aarch64_ins_addr_simple (self, info, code, inst);
case 72:
+ return aarch64_ins_addr_regoff (self, info, code, inst);
case 73:
case 74:
- return aarch64_ins_addr_simm (self, info, code, inst);
case 75:
+ return aarch64_ins_addr_simm (self, info, code, inst);
+ case 76:
return aarch64_ins_addr_uimm12 (self, info, code, inst);
- case 77:
- return aarch64_ins_simd_addr_post (self, info, code, inst);
case 78:
- return aarch64_ins_sysreg (self, info, code, inst);
+ return aarch64_ins_simd_addr_post (self, info, code, inst);
case 79:
- return aarch64_ins_pstatefield (self, info, code, inst);
+ return aarch64_ins_sysreg (self, info, code, inst);
case 80:
+ return aarch64_ins_pstatefield (self, info, code, inst);
case 81:
case 82:
case 83:
- return aarch64_ins_sysins_op (self, info, code, inst);
case 84:
+ return aarch64_ins_sysins_op (self, info, code, inst);
case 85:
- return aarch64_ins_barrier (self, info, code, inst);
case 86:
+ return aarch64_ins_barrier (self, info, code, inst);
+ case 87:
return aarch64_ins_prfop (self, info, code, inst);
default: assert (0); abort ();
}