xref: /netbsd-src/external/gpl3/binutils/dist/opcodes/ft32-opc.c (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
19573673dSchristos /* ft32-opc.c -- Definitions for ft32 opcodes.
2*cb63e24eSchristos    Copyright (C) 2013-2024 Free Software Foundation, Inc.
39573673dSchristos    Contributed by FTDI (support@ftdichip.com)
49573673dSchristos 
59573673dSchristos    This file is part of the GNU opcodes library.
69573673dSchristos 
79573673dSchristos    This library is free software; you can redistribute it and/or modify
89573673dSchristos    it under the terms of the GNU General Public License as published by
99573673dSchristos    the Free Software Foundation; either version 3, or (at your option)
109573673dSchristos    any later version.
119573673dSchristos 
129573673dSchristos    It is distributed in the hope that it will be useful, but WITHOUT
139573673dSchristos    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
149573673dSchristos    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
159573673dSchristos    License for more details.
169573673dSchristos 
179573673dSchristos    You should have received a copy of the GNU General Public License
189573673dSchristos    along with this file; see the file COPYING.  If not, write to the
199573673dSchristos    Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
209573673dSchristos    MA 02110-1301, USA.  */
219573673dSchristos 
229573673dSchristos #include "sysdep.h"
239573673dSchristos #include "opcode/ft32.h"
249573673dSchristos 
259573673dSchristos const ft32_opc_info_t ft32_opc_info[] =
269573673dSchristos {
279573673dSchristos {       "nop", 0, 0xffffffffU, 0x40004000U, 0},
289573673dSchristos {      "move", 1, 0xf8007fffU, 0x40004000U, FT32_FLD_R_D|FT32_FLD_R_1},
299573673dSchristos {  "streamin", 1, 0xf800000fU, 0xf000000cU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
30fc4f4269Schristos {       "ldi", 1, 0xf8000000U, 0xa8000000U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_K15},
31fc4f4269Schristos {       "exi", 1, 0xf8000000U, 0xe8000000U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_K15},
329573673dSchristos {    "return", 0, 0xfc000000U, 0xa0000000U, 0},
339573673dSchristos {        "or", 1, 0xf800000fU, 0x40000005U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
349573673dSchristos {       "pop", 1, 0xf8000000U, 0x88000000U, FT32_FLD_R_D},
359573673dSchristos {       "sta", 1, 0xf8000000U, 0xb8000000U, FT32_FLD_AA|FT32_FLD_R_D_POST},
369573673dSchristos {       "xor", 1, 0xf800000fU, 0x40000006U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
379573673dSchristos {    "memcpy", 1, 0xf800000fU, 0xf0000005U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
389573673dSchristos {    "strlen", 1, 0xf8007fffU, 0xf0004006U, FT32_FLD_R_D|FT32_FLD_R_1},
399573673dSchristos {       "cmp", 1, 0xf9f0000fU, 0x59e00002U, FT32_FLD_R_1|FT32_FLD_RIMM},
409573673dSchristos {      "btst", 1, 0xf9f0000fU, 0x59e0000cU, FT32_FLD_R_1|FT32_FLD_RIMM},
419573673dSchristos {      "link", 0, 0xfe000000U, 0x94000000U, FT32_FLD_R_D|FT32_FLD_K16},
429573673dSchristos {      "call", 0, 0xfffc0000U, 0x00340000U, FT32_FLD_PA},
43fc4f4269Schristos {     "callc", 0, 0xfe340000U, 0x00240000U, FT32_FLD_CBCRCV|FT32_FLD_PA},
449573673dSchristos {     "callx", 0, 0xf8040000U, 0x00040000U, FT32_FLD_CR|FT32_FLD_CB|FT32_FLD_CV|FT32_FLD_PA},
459573673dSchristos { "streamini", 1, 0xf800000fU, 0xf000000dU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
469573673dSchristos {       "lda", 1, 0xf8000000U, 0xc0000000U, FT32_FLD_R_D|FT32_FLD_AA},
479573673dSchristos {       "exa", 1, 0xf8000000U, 0x38000000U, FT32_FLD_R_D|FT32_FLD_AA},
489573673dSchristos {    "unlink", 0, 0xf8000000U, 0x98000000U, FT32_FLD_R_D},
499573673dSchristos {     "calli", 0, 0xfffc0000U, 0x08340000U, FT32_FLD_R_2},
509573673dSchristos {    "stpcpy", 1, 0xf8007fffU, 0xf000400aU, FT32_FLD_R_D|FT32_FLD_R_1},
519573673dSchristos {       "jmp", 0, 0xfffc0000U, 0x00300000U, FT32_FLD_PA},
529573673dSchristos {    "strcmp", 1, 0xf800000fU, 0xf0000004U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
539573673dSchristos {       "mul", 1, 0xf800000fU, 0xf0000008U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
549573673dSchristos {      "push", 1, 0xf8000000U, 0x80000000U, FT32_FLD_R_1},
55fc4f4269Schristos {       "sti", 1, 0xf8000000U, 0xb0000000U, FT32_FLD_R_D|FT32_FLD_K15|FT32_FLD_R_1_POST},
569573673dSchristos {       "mod", 1, 0xf800000fU, 0xf0000003U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
579573673dSchristos {      "umod", 1, 0xf800000fU, 0xf0000001U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
589573673dSchristos {     "addcc", 1, 0xf9f0000fU, 0x59e00000U, FT32_FLD_R_1|FT32_FLD_RIMM},
599573673dSchristos { "streamout", 1, 0xf800000fU, 0xf000000eU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
60fc4f4269Schristos {      "lpmi", 1, 0xf8000000U, 0xc8000000U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_K15},
619573673dSchristos {      "udiv", 1, 0xf800000fU, 0xf0000000U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
629573673dSchristos {       "sub", 1, 0xf800000fU, 0x40000002U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
639573673dSchristos {      "lshr", 1, 0xf800000fU, 0x40000009U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
649573673dSchristos {       "tst", 1, 0xf9f0000fU, 0x59e00004U, FT32_FLD_R_1|FT32_FLD_RIMM},
659573673dSchristos {      "xnor", 1, 0xf800000fU, 0x40000007U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
669573673dSchristos {     "muluh", 1, 0xf800000fU, 0xf0000009U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
679573673dSchristos {       "and", 1, 0xf800000fU, 0x40000004U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
689573673dSchristos {       "add", 1, 0xf800000fU, 0x40000000U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
699573673dSchristos {       "ror", 1, 0xf800000fU, 0x40000001U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
709573673dSchristos {       "ldl", 1, 0xf800000fU, 0x40000003U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
719573673dSchristos {      "bins", 1, 0xf800000fU, 0x4000000bU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
729573673dSchristos {     "bexts", 1, 0xf800000fU, 0x4000000cU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
739573673dSchristos {     "bextu", 1, 0xf800000fU, 0x4000000dU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
749573673dSchristos {      "flip", 1, 0xf800000fU, 0x4000000eU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
759573673dSchristos {    "memset", 1, 0xf800000fU, 0xf0000007U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
769573673dSchristos {       "div", 1, 0xf800000fU, 0xf0000002U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
779573673dSchristos {       "ldk", 1, 0xf8000000U, 0x60000000U, FT32_FLD_R_D|FT32_FLD_K20},
789573673dSchristos {      "reti", 0, 0xfc000000U, 0xa4000000U, 0},
799573673dSchristos {      "ashr", 1, 0xf800000fU, 0x4000000aU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
809573673dSchristos {      "jmpi", 0, 0xfffc0000U, 0x08300000U, FT32_FLD_R_2},
819573673dSchristos {     "jmpic", 0, 0xf8040000U, 0x08000000U, FT32_FLD_CBCRCV|FT32_FLD_R_2},
82fc4f4269Schristos {     "jmpix", 0, 0xf8040000U, 0x08000000U, FT32_FLD_CR|FT32_FLD_CB|FT32_FLD_CV|FT32_FLD_R_2},
839573673dSchristos {      "ashl", 1, 0xf800000fU, 0x40000008U, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
84fc4f4269Schristos {      "jmpc", 0, 0xfe340000U, 0x00200000U, FT32_FLD_CBCRCV|FT32_FLD_PA},
859573673dSchristos {      "jmpx", 0, 0xf8040000U, 0x00000000U, FT32_FLD_CR|FT32_FLD_CB|FT32_FLD_CV|FT32_FLD_PA},
869573673dSchristos {       "lpm", 1, 0xf8000000U, 0x68000000U, FT32_FLD_R_D|FT32_FLD_PA},
879573673dSchristos {"streamouti", 1, 0xf800000fU, 0xf000000fU, FT32_FLD_R_D|FT32_FLD_R_1|FT32_FLD_RIMM},
88fc4f4269Schristos {      "halt", 0, 0xf8000000U, 0x78000000U, 0},
899573673dSchristos { NULL, 0, 0, 0, 0}
909573673dSchristos };
91