b195470dd2
ARMv8.2 adds 16-bit floating point operations as an optional extension to the floating point and Adv.SIMD support. This patch adds FP16 instructions to the group Adv.SIMD Scalar Pairwise, making them available when +simd+fp16 is enabled. The instructions added are: FMAXNMP, FADDP, FMAXP, FMINNMP and FMINP The general form for these instructions is <OP> <Hd>, <V>.<T> where T is 4h or 8h. gas/testsuite/ 2015-12-14 Matthew Wahab <matthew.wahab@arm.com> * gas/aarch64/advsimd-fp16.d: Update expected output. * gas/aarch64/advsimd-fp16.s: Add tests for Adv.SIMD Scalar Pairwise instructions. opcodes/ 2015-12-14 Matthew Wahab <matthew.wahab@arm.com> * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. * aarch64-tbl.h (QL_SISD_PAIR_H): New. (aarch64_opcode_table): Add fp16 versions of fmaxnmp, faddp, fmaxp, fminnmp, fminp to the Adv.SIMD scalar pairwise group. Change-Id: I19937ede3441b66dd0f940269ece895b17d3c345
570 lines
14 KiB
C
570 lines
14 KiB
C
/* This file is automatically generated by aarch64-gen. Do not edit! */
|
|
/* Copyright (C) 2012-2015 Free Software Foundation, Inc.
|
|
Contributed by ARM Ltd.
|
|
|
|
This file is part of the GNU opcodes library.
|
|
|
|
This library 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, or (at your option)
|
|
any later version.
|
|
|
|
It 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/>. */
|
|
|
|
#include "sysdep.h"
|
|
#include "aarch64-asm.h"
|
|
|
|
|
|
const aarch64_opcode *
|
|
aarch64_find_real_opcode (const aarch64_opcode *opcode)
|
|
{
|
|
/* Use the index as the key to locate the real opcode. */
|
|
int key = opcode - aarch64_opcode_table;
|
|
int value;
|
|
switch (key)
|
|
{
|
|
case 3: /* ngc */
|
|
case 2: /* sbc */
|
|
value = 2; /* --> sbc. */
|
|
break;
|
|
case 5: /* ngcs */
|
|
case 4: /* sbcs */
|
|
value = 4; /* --> sbcs. */
|
|
break;
|
|
case 8: /* cmn */
|
|
case 7: /* adds */
|
|
value = 7; /* --> adds. */
|
|
break;
|
|
case 11: /* cmp */
|
|
case 10: /* subs */
|
|
value = 10; /* --> subs. */
|
|
break;
|
|
case 13: /* mov */
|
|
case 12: /* add */
|
|
value = 12; /* --> add. */
|
|
break;
|
|
case 15: /* cmn */
|
|
case 14: /* adds */
|
|
value = 14; /* --> adds. */
|
|
break;
|
|
case 18: /* cmp */
|
|
case 17: /* subs */
|
|
value = 17; /* --> subs. */
|
|
break;
|
|
case 21: /* cmn */
|
|
case 20: /* adds */
|
|
value = 20; /* --> adds. */
|
|
break;
|
|
case 23: /* neg */
|
|
case 22: /* sub */
|
|
value = 22; /* --> sub. */
|
|
break;
|
|
case 26: /* negs */
|
|
case 25: /* cmp */
|
|
case 24: /* subs */
|
|
value = 24; /* --> subs. */
|
|
break;
|
|
case 150: /* mov */
|
|
case 149: /* umov */
|
|
value = 149; /* --> umov. */
|
|
break;
|
|
case 152: /* mov */
|
|
case 151: /* ins */
|
|
value = 151; /* --> ins. */
|
|
break;
|
|
case 154: /* mov */
|
|
case 153: /* ins */
|
|
value = 153; /* --> ins. */
|
|
break;
|
|
case 236: /* mvn */
|
|
case 235: /* not */
|
|
value = 235; /* --> not. */
|
|
break;
|
|
case 311: /* mov */
|
|
case 310: /* orr */
|
|
value = 310; /* --> orr. */
|
|
break;
|
|
case 380: /* sxtl */
|
|
case 379: /* sshll */
|
|
value = 379; /* --> sshll. */
|
|
break;
|
|
case 382: /* sxtl2 */
|
|
case 381: /* sshll2 */
|
|
value = 381; /* --> sshll2. */
|
|
break;
|
|
case 402: /* uxtl */
|
|
case 401: /* ushll */
|
|
value = 401; /* --> ushll. */
|
|
break;
|
|
case 404: /* uxtl2 */
|
|
case 403: /* ushll2 */
|
|
value = 403; /* --> ushll2. */
|
|
break;
|
|
case 523: /* mov */
|
|
case 522: /* dup */
|
|
value = 522; /* --> dup. */
|
|
break;
|
|
case 606: /* sxtw */
|
|
case 605: /* sxth */
|
|
case 604: /* sxtb */
|
|
case 607: /* asr */
|
|
case 603: /* sbfx */
|
|
case 602: /* sbfiz */
|
|
case 601: /* sbfm */
|
|
value = 601; /* --> sbfm. */
|
|
break;
|
|
case 610: /* bfc */
|
|
case 611: /* bfxil */
|
|
case 609: /* bfi */
|
|
case 608: /* bfm */
|
|
value = 608; /* --> bfm. */
|
|
break;
|
|
case 616: /* uxth */
|
|
case 615: /* uxtb */
|
|
case 618: /* lsr */
|
|
case 617: /* lsl */
|
|
case 614: /* ubfx */
|
|
case 613: /* ubfiz */
|
|
case 612: /* ubfm */
|
|
value = 612; /* --> ubfm. */
|
|
break;
|
|
case 636: /* cset */
|
|
case 635: /* cinc */
|
|
case 634: /* csinc */
|
|
value = 634; /* --> csinc. */
|
|
break;
|
|
case 639: /* csetm */
|
|
case 638: /* cinv */
|
|
case 637: /* csinv */
|
|
value = 637; /* --> csinv. */
|
|
break;
|
|
case 641: /* cneg */
|
|
case 640: /* csneg */
|
|
value = 640; /* --> csneg. */
|
|
break;
|
|
case 659: /* rev */
|
|
case 660: /* rev64 */
|
|
value = 659; /* --> rev. */
|
|
break;
|
|
case 667: /* lsl */
|
|
case 666: /* lslv */
|
|
value = 666; /* --> lslv. */
|
|
break;
|
|
case 669: /* lsr */
|
|
case 668: /* lsrv */
|
|
value = 668; /* --> lsrv. */
|
|
break;
|
|
case 671: /* asr */
|
|
case 670: /* asrv */
|
|
value = 670; /* --> asrv. */
|
|
break;
|
|
case 673: /* ror */
|
|
case 672: /* rorv */
|
|
value = 672; /* --> rorv. */
|
|
break;
|
|
case 683: /* mul */
|
|
case 682: /* madd */
|
|
value = 682; /* --> madd. */
|
|
break;
|
|
case 685: /* mneg */
|
|
case 684: /* msub */
|
|
value = 684; /* --> msub. */
|
|
break;
|
|
case 687: /* smull */
|
|
case 686: /* smaddl */
|
|
value = 686; /* --> smaddl. */
|
|
break;
|
|
case 689: /* smnegl */
|
|
case 688: /* smsubl */
|
|
value = 688; /* --> smsubl. */
|
|
break;
|
|
case 692: /* umull */
|
|
case 691: /* umaddl */
|
|
value = 691; /* --> umaddl. */
|
|
break;
|
|
case 694: /* umnegl */
|
|
case 693: /* umsubl */
|
|
value = 693; /* --> umsubl. */
|
|
break;
|
|
case 705: /* ror */
|
|
case 704: /* extr */
|
|
value = 704; /* --> extr. */
|
|
break;
|
|
case 912: /* bic */
|
|
case 911: /* and */
|
|
value = 911; /* --> and. */
|
|
break;
|
|
case 914: /* mov */
|
|
case 913: /* orr */
|
|
value = 913; /* --> orr. */
|
|
break;
|
|
case 917: /* tst */
|
|
case 916: /* ands */
|
|
value = 916; /* --> ands. */
|
|
break;
|
|
case 922: /* uxtw */
|
|
case 921: /* mov */
|
|
case 920: /* orr */
|
|
value = 920; /* --> orr. */
|
|
break;
|
|
case 924: /* mvn */
|
|
case 923: /* orn */
|
|
value = 923; /* --> orn. */
|
|
break;
|
|
case 928: /* tst */
|
|
case 927: /* ands */
|
|
value = 927; /* --> ands. */
|
|
break;
|
|
case 1054: /* staddb */
|
|
case 958: /* ldaddb */
|
|
value = 958; /* --> ldaddb. */
|
|
break;
|
|
case 1055: /* staddh */
|
|
case 959: /* ldaddh */
|
|
value = 959; /* --> ldaddh. */
|
|
break;
|
|
case 1056: /* stadd */
|
|
case 960: /* ldadd */
|
|
value = 960; /* --> ldadd. */
|
|
break;
|
|
case 1057: /* staddlb */
|
|
case 962: /* ldaddlb */
|
|
value = 962; /* --> ldaddlb. */
|
|
break;
|
|
case 1058: /* staddlh */
|
|
case 965: /* ldaddlh */
|
|
value = 965; /* --> ldaddlh. */
|
|
break;
|
|
case 1059: /* staddl */
|
|
case 968: /* ldaddl */
|
|
value = 968; /* --> ldaddl. */
|
|
break;
|
|
case 1060: /* stclrb */
|
|
case 970: /* ldclrb */
|
|
value = 970; /* --> ldclrb. */
|
|
break;
|
|
case 1061: /* stclrh */
|
|
case 971: /* ldclrh */
|
|
value = 971; /* --> ldclrh. */
|
|
break;
|
|
case 1062: /* stclr */
|
|
case 972: /* ldclr */
|
|
value = 972; /* --> ldclr. */
|
|
break;
|
|
case 1063: /* stclrlb */
|
|
case 974: /* ldclrlb */
|
|
value = 974; /* --> ldclrlb. */
|
|
break;
|
|
case 1064: /* stclrlh */
|
|
case 977: /* ldclrlh */
|
|
value = 977; /* --> ldclrlh. */
|
|
break;
|
|
case 1065: /* stclrl */
|
|
case 980: /* ldclrl */
|
|
value = 980; /* --> ldclrl. */
|
|
break;
|
|
case 1066: /* steorb */
|
|
case 982: /* ldeorb */
|
|
value = 982; /* --> ldeorb. */
|
|
break;
|
|
case 1067: /* steorh */
|
|
case 983: /* ldeorh */
|
|
value = 983; /* --> ldeorh. */
|
|
break;
|
|
case 1068: /* steor */
|
|
case 984: /* ldeor */
|
|
value = 984; /* --> ldeor. */
|
|
break;
|
|
case 1069: /* steorlb */
|
|
case 986: /* ldeorlb */
|
|
value = 986; /* --> ldeorlb. */
|
|
break;
|
|
case 1070: /* steorlh */
|
|
case 989: /* ldeorlh */
|
|
value = 989; /* --> ldeorlh. */
|
|
break;
|
|
case 1071: /* steorl */
|
|
case 992: /* ldeorl */
|
|
value = 992; /* --> ldeorl. */
|
|
break;
|
|
case 1072: /* stsetb */
|
|
case 994: /* ldsetb */
|
|
value = 994; /* --> ldsetb. */
|
|
break;
|
|
case 1073: /* stseth */
|
|
case 995: /* ldseth */
|
|
value = 995; /* --> ldseth. */
|
|
break;
|
|
case 1074: /* stset */
|
|
case 996: /* ldset */
|
|
value = 996; /* --> ldset. */
|
|
break;
|
|
case 1075: /* stsetlb */
|
|
case 998: /* ldsetlb */
|
|
value = 998; /* --> ldsetlb. */
|
|
break;
|
|
case 1076: /* stsetlh */
|
|
case 1001: /* ldsetlh */
|
|
value = 1001; /* --> ldsetlh. */
|
|
break;
|
|
case 1077: /* stsetl */
|
|
case 1004: /* ldsetl */
|
|
value = 1004; /* --> ldsetl. */
|
|
break;
|
|
case 1078: /* stsmaxb */
|
|
case 1006: /* ldsmaxb */
|
|
value = 1006; /* --> ldsmaxb. */
|
|
break;
|
|
case 1079: /* stsmaxh */
|
|
case 1007: /* ldsmaxh */
|
|
value = 1007; /* --> ldsmaxh. */
|
|
break;
|
|
case 1080: /* stsmax */
|
|
case 1008: /* ldsmax */
|
|
value = 1008; /* --> ldsmax. */
|
|
break;
|
|
case 1081: /* stsmaxlb */
|
|
case 1010: /* ldsmaxlb */
|
|
value = 1010; /* --> ldsmaxlb. */
|
|
break;
|
|
case 1082: /* stsmaxlh */
|
|
case 1013: /* ldsmaxlh */
|
|
value = 1013; /* --> ldsmaxlh. */
|
|
break;
|
|
case 1083: /* stsmaxl */
|
|
case 1016: /* ldsmaxl */
|
|
value = 1016; /* --> ldsmaxl. */
|
|
break;
|
|
case 1084: /* stsminb */
|
|
case 1018: /* ldsminb */
|
|
value = 1018; /* --> ldsminb. */
|
|
break;
|
|
case 1085: /* stsminh */
|
|
case 1019: /* ldsminh */
|
|
value = 1019; /* --> ldsminh. */
|
|
break;
|
|
case 1086: /* stsmin */
|
|
case 1020: /* ldsmin */
|
|
value = 1020; /* --> ldsmin. */
|
|
break;
|
|
case 1087: /* stsminlb */
|
|
case 1022: /* ldsminlb */
|
|
value = 1022; /* --> ldsminlb. */
|
|
break;
|
|
case 1088: /* stsminlh */
|
|
case 1025: /* ldsminlh */
|
|
value = 1025; /* --> ldsminlh. */
|
|
break;
|
|
case 1089: /* stsminl */
|
|
case 1028: /* ldsminl */
|
|
value = 1028; /* --> ldsminl. */
|
|
break;
|
|
case 1090: /* stumaxb */
|
|
case 1030: /* ldumaxb */
|
|
value = 1030; /* --> ldumaxb. */
|
|
break;
|
|
case 1091: /* stumaxh */
|
|
case 1031: /* ldumaxh */
|
|
value = 1031; /* --> ldumaxh. */
|
|
break;
|
|
case 1092: /* stumax */
|
|
case 1032: /* ldumax */
|
|
value = 1032; /* --> ldumax. */
|
|
break;
|
|
case 1093: /* stumaxlb */
|
|
case 1034: /* ldumaxlb */
|
|
value = 1034; /* --> ldumaxlb. */
|
|
break;
|
|
case 1094: /* stumaxlh */
|
|
case 1037: /* ldumaxlh */
|
|
value = 1037; /* --> ldumaxlh. */
|
|
break;
|
|
case 1095: /* stumaxl */
|
|
case 1040: /* ldumaxl */
|
|
value = 1040; /* --> ldumaxl. */
|
|
break;
|
|
case 1096: /* stuminb */
|
|
case 1042: /* lduminb */
|
|
value = 1042; /* --> lduminb. */
|
|
break;
|
|
case 1097: /* stuminh */
|
|
case 1043: /* lduminh */
|
|
value = 1043; /* --> lduminh. */
|
|
break;
|
|
case 1098: /* stumin */
|
|
case 1044: /* ldumin */
|
|
value = 1044; /* --> ldumin. */
|
|
break;
|
|
case 1099: /* stuminlb */
|
|
case 1046: /* lduminlb */
|
|
value = 1046; /* --> lduminlb. */
|
|
break;
|
|
case 1100: /* stuminlh */
|
|
case 1049: /* lduminlh */
|
|
value = 1049; /* --> lduminlh. */
|
|
break;
|
|
case 1101: /* stuminl */
|
|
case 1052: /* lduminl */
|
|
value = 1052; /* --> lduminl. */
|
|
break;
|
|
case 1103: /* mov */
|
|
case 1102: /* movn */
|
|
value = 1102; /* --> movn. */
|
|
break;
|
|
case 1105: /* mov */
|
|
case 1104: /* movz */
|
|
value = 1104; /* --> movz. */
|
|
break;
|
|
case 1118: /* psb */
|
|
case 1117: /* esb */
|
|
case 1116: /* sevl */
|
|
case 1115: /* sev */
|
|
case 1114: /* wfi */
|
|
case 1113: /* wfe */
|
|
case 1112: /* yield */
|
|
case 1111: /* nop */
|
|
case 1110: /* hint */
|
|
value = 1110; /* --> hint. */
|
|
break;
|
|
case 1127: /* tlbi */
|
|
case 1126: /* ic */
|
|
case 1125: /* dc */
|
|
case 1124: /* at */
|
|
case 1123: /* sys */
|
|
value = 1123; /* --> sys. */
|
|
break;
|
|
default: return NULL;
|
|
}
|
|
|
|
return aarch64_opcode_table + value;
|
|
}
|
|
|
|
const char*
|
|
aarch64_insert_operand (const aarch64_operand *self,
|
|
const aarch64_opnd_info *info,
|
|
aarch64_insn *code, const aarch64_inst *inst)
|
|
{
|
|
/* Use the index as the key. */
|
|
int key = self - aarch64_operands;
|
|
switch (key)
|
|
{
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
case 6:
|
|
case 7:
|
|
case 8:
|
|
case 9:
|
|
case 10:
|
|
case 14:
|
|
case 15:
|
|
case 16:
|
|
case 17:
|
|
case 19:
|
|
case 20:
|
|
case 21:
|
|
case 22:
|
|
case 23:
|
|
case 24:
|
|
case 25:
|
|
case 26:
|
|
case 27:
|
|
case 35:
|
|
case 36:
|
|
return aarch64_ins_regno (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 18:
|
|
return aarch64_ins_ft (self, info, code, inst);
|
|
case 28:
|
|
case 29:
|
|
case 30:
|
|
return aarch64_ins_reglane (self, info, code, inst);
|
|
case 31:
|
|
return aarch64_ins_reglist (self, info, code, inst);
|
|
case 32:
|
|
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 37:
|
|
case 46:
|
|
case 47:
|
|
case 48:
|
|
case 49:
|
|
case 50:
|
|
case 51:
|
|
case 52:
|
|
case 53:
|
|
case 54:
|
|
case 55:
|
|
case 56:
|
|
case 57:
|
|
case 58:
|
|
case 67:
|
|
case 68:
|
|
case 69:
|
|
case 70:
|
|
return aarch64_ins_imm (self, info, code, inst);
|
|
case 38:
|
|
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 59:
|
|
return aarch64_ins_limm (self, info, code, inst);
|
|
case 60:
|
|
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 64:
|
|
case 65:
|
|
return aarch64_ins_cond (self, info, code, inst);
|
|
case 71:
|
|
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:
|
|
case 75:
|
|
return aarch64_ins_addr_simm (self, info, code, inst);
|
|
case 76:
|
|
return aarch64_ins_addr_uimm12 (self, info, code, inst);
|
|
case 78:
|
|
return aarch64_ins_simd_addr_post (self, info, code, inst);
|
|
case 79:
|
|
return aarch64_ins_sysreg (self, info, code, inst);
|
|
case 80:
|
|
return aarch64_ins_pstatefield (self, info, code, inst);
|
|
case 81:
|
|
case 82:
|
|
case 83:
|
|
case 84:
|
|
return aarch64_ins_sysins_op (self, info, code, inst);
|
|
case 85:
|
|
case 86:
|
|
return aarch64_ins_barrier (self, info, code, inst);
|
|
case 87:
|
|
return aarch64_ins_prfop (self, info, code, inst);
|
|
case 88:
|
|
return aarch64_ins_hint (self, info, code, inst);
|
|
default: assert (0); abort ();
|
|
}
|
|
}
|