Rizin
unix-like reverse engineering framework and cli tools
xtensa-isa.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2003-2015 Free Software Foundation, Inc.
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 /* Interface definition for configurable Xtensa ISA support.
5  Copyright (C) 2003-2015 Free Software Foundation, Inc.
6 
7  This file is part of BFD, the Binary File Descriptor library.
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
22  USA. */
23 
24 #ifndef XTENSA_LIBISA_H
25 #define XTENSA_LIBISA_H
26 
27 #include "rz_types.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /* Version number: This is intended to help support code that works with
34  versions of this library from multiple Xtensa releases. */
35 
36 #define XTENSA_ISA_VERSION 7000
37 
38 #ifndef uint32
39 #define uint32 unsigned int
40 #endif
41 
42 /* This file defines the interface to the Xtensa ISA library. This
43  library contains most of the ISA-specific information for a
44  particular Xtensa processor. For example, the set of valid
45  instructions, their opcode encodings and operand fields are all
46  included here.
47 
48  This interface basically defines a number of abstract data types.
49 
50  . an instruction buffer - for holding the raw instruction bits
51  . ISA info - information about the ISA as a whole
52  . instruction formats - instruction size and slot structure
53  . opcodes - information about individual instructions
54  . operands - information about register and immediate instruction operands
55  . stateOperands - information about processor state instruction operands
56  . interfaceOperands - information about interface instruction operands
57  . register files - register file information
58  . processor states - internal processor state information
59  . system registers - "special registers" and "user registers"
60  . interfaces - TIE interfaces that are external to the processor
61  . functional units - TIE shared functions
62 
63  The interface defines a set of functions to access each data type.
64  With the exception of the instruction buffer, the internal
65  representations of the data structures are hidden. All accesses must
66  be made through the functions defined here. */
67 
68 typedef struct xtensa_isa_opaque {
69  int unused;
71 
72 #if defined(_MSC_VER)
73 __declspec(dllexport)
74 #endif
76 
77 /* Most of the Xtensa ISA entities (e.g., opcodes, regfiles, etc.) are
78  represented here using sequential integers beginning with 0. The
79  specific values are only fixed for a particular instantiation of an
80  xtensa_isa structure, so these values should only be used
81  internally. */
82 
83 typedef int xtensa_opcode;
84 typedef int xtensa_format;
85 typedef int xtensa_regfile;
86 typedef int xtensa_state;
87 typedef int xtensa_sysreg;
88 typedef int xtensa_interface;
89 typedef int xtensa_funcUnit;
90 
91 /* Define a unique value for undefined items. */
92 
93 #define XTENSA_UNDEFINED -1
94 
95 /* Overview of using this interface to decode/encode instructions:
96 
97  Each Xtensa instruction is associated with a particular instruction
98  format, where the format defines a fixed number of slots for
99  operations. The formats for the core Xtensa ISA have only one slot,
100  but FLIX instructions may have multiple slots. Within each slot,
101  there is a single opcode and some number of associated operands.
102 
103  The encoding and decoding functions operate on instruction buffers,
104  not on the raw bytes of the instructions. The same instruction
105  buffer data structure is used for both entire instructions and
106  individual slots in those instructions -- the contents of a slot need
107  to be extracted from or inserted into the buffer for the instruction
108  as a whole.
109 
110  Decoding an instruction involves first finding the format, which
111  identifies the number of slots, and then decoding each slot
112  separately. A slot is decoded by finding the opcode and then using
113  the opcode to determine how many operands there are. For example:
114 
115  xtensa_insnbuf_from_chars
116  xtensa_format_decode
117  for each slot {
118  xtensa_format_get_slot
119  xtensa_opcode_decode
120  for each operand {
121  xtensa_operand_get_field
122  xtensa_operand_decode
123  }
124  }
125 
126  Encoding an instruction is roughly the same procedure in reverse:
127 
128  xtensa_format_encode
129  for each slot {
130  xtensa_opcode_encode
131  for each operand {
132  xtensa_operand_encode
133  xtensa_operand_set_field
134  }
135  xtensa_format_set_slot
136  }
137  xtensa_insnbuf_to_chars
138 */
139 
140 /* Error handling. */
141 
142 /* Error codes. The code for the most recent error condition can be
143  retrieved with the "errno" function. For any result other than
144  xtensa_isa_ok, an error message containing additional information
145  about the problem can be retrieved using the "error_msg" function.
146  The error messages are stored in an internal buffer, which should
147  not be freed and may be overwritten by subsequent operations. */
148 
169 
170 extern xtensa_isa_status
172 
173 extern char *
175 
176 /* Instruction buffers. */
177 
180 
181 /* Get the size in "insnbuf_words" of the xtensa_insnbuf array. */
182 
183 extern int
185 
186 /* Allocate an xtensa_insnbuf of the right size. */
187 
188 extern xtensa_insnbuf
190 
191 /* Release an xtensa_insnbuf. */
192 
193 extern void
195 
196 /* Conversion between raw memory (char arrays) and our internal
197  instruction representation. This is complicated by the Xtensa ISA's
198  variable instruction lengths. When converting to chars, the buffer
199  must contain a valid instruction so we know how many bytes to copy;
200  thus, the "to_chars" function returns the number of bytes copied or
201  XTENSA_UNDEFINED on error. The "from_chars" function first reads the
202  minimal number of bytes required to decode the instruction length and
203  then proceeds to copy the entire instruction into the buffer; if the
204  memory does not contain a valid instruction, it copies the maximum
205  number of bytes required for the longest Xtensa instruction. The
206  "num_chars" argument may be used to limit the number of bytes that
207  can be read or written. Otherwise, if "num_chars" is zero, the
208  functions may read or write past the end of the code. */
209 
210 extern int
212  unsigned char *cp, int num_chars);
213 
214 extern void
216  const unsigned char *cp, int num_chars);
217 
218 /* ISA information. */
219 
220 /* Initialize the ISA information. */
221 
222 extern xtensa_isa
223 xtensa_isa_init(xtensa_isa_status *errno_p, char **error_msg_p);
224 
225 /* Deallocate an xtensa_isa structure. */
226 
227 extern void
229 
230 /* Get the maximum instruction size in bytes. */
231 
232 extern int
234 
235 /* Decode the length in bytes of an instruction in raw memory (not an
236  insnbuf). This function reads only the minimal number of bytes
237  required to decode the instruction length. Returns
238  XTENSA_UNDEFINED on error. */
239 
240 extern int
241 xtensa_isa_length_from_chars(xtensa_isa isa, const unsigned char *cp);
242 
243 /* Get the number of stages in the processor's pipeline. The pipeline
244  stage values returned by other functions in this library will range
245  from 0 to N-1, where N is the value returned by this function.
246  Note that the stage numbers used here may not correspond to the
247  actual processor hardware, e.g., the hardware may have additional
248  stages before stage 0. Returns XTENSA_UNDEFINED on error. */
249 
250 extern int
252 
253 /* Get the number of various entities that are defined for this processor. */
254 
255 extern int
257 
258 extern int
260 
261 extern int
263 
264 extern int
266 
267 extern int
269 
270 extern int
272 
273 extern int
275 
276 /* Instruction formats. */
277 
278 /* Get the name of a format. Returns null on error. */
279 
280 extern const char *
282 
283 /* Given a format name, return the format number. Returns
284  XTENSA_UNDEFINED if the name is not a valid format. */
285 
286 extern xtensa_format
287 xtensa_format_lookup(xtensa_isa isa, const char *fmtname);
288 
289 /* Decode the instruction format from a binary instruction buffer.
290  Returns XTENSA_UNDEFINED if the format is not recognized. */
291 
292 extern xtensa_format
294 
295 /* Set the instruction format field(s) in a binary instruction buffer.
296  All the other fields are set to zero. Returns non-zero on error. */
297 
298 extern int
300 
301 /* Find the length (in bytes) of an instruction. Returns
302  XTENSA_UNDEFINED on error. */
303 
304 extern int
306 
307 /* Get the number of slots in an instruction. Returns XTENSA_UNDEFINED
308  on error. */
309 
310 extern int
312 
313 /* Get the opcode for a no-op in a particular slot.
314  Returns XTENSA_UNDEFINED on error. */
315 
316 extern xtensa_opcode
318 
319 /* Get the bits for a specified slot out of an insnbuf for the
320  instruction as a whole and put them into an insnbuf for that one
321  slot, and do the opposite to set a slot. Return non-zero on error. */
322 
323 extern int
325  const xtensa_insnbuf insn, xtensa_insnbuf slotbuf);
326 
327 extern int
329  xtensa_insnbuf insn, const xtensa_insnbuf slotbuf);
330 
331 /* Opcode information. */
332 
333 /* Translate a mnemonic name to an opcode. Returns XTENSA_UNDEFINED if
334  the name is not a valid opcode mnemonic. */
335 
336 extern xtensa_opcode
337 xtensa_opcode_lookup(xtensa_isa isa, const char *opname);
338 
339 /* Decode the opcode for one instruction slot from a binary instruction
340  buffer. Returns the opcode or XTENSA_UNDEFINED if the opcode is
341  illegal. */
342 
343 extern xtensa_opcode
345  const xtensa_insnbuf slotbuf);
346 
347 /* Set the opcode field(s) for an instruction slot. All other fields
348  in the slot are set to zero. Returns non-zero if the opcode cannot
349  be encoded. */
350 
351 extern int
353  xtensa_insnbuf slotbuf, xtensa_opcode opc);
354 
355 /* Get the mnemonic name for an opcode. Returns null on error. */
356 
357 extern const char *
359 
360 /* Check various properties of opcodes. These functions return 0 if
361  the condition is false, 1 if the condition is true, and
362  XTENSA_UNDEFINED on error. The instructions are classified as
363  follows:
364 
365  branch: conditional branch; may fall through to next instruction (B*)
366  jump: unconditional branch (J, JX, RET*, RF*)
367  loop: zero-overhead loop (LOOP*)
368  call: unconditional call; control returns to next instruction (CALL*)
369 
370  For the opcodes that affect control flow in some way, the branch
371  target may be specified by an immediate operand or it may be an
372  address stored in a register. You can distinguish these by
373  checking if the instruction has a PC-relative immediate
374  operand. */
375 
376 extern int
378 
379 extern int
381 
382 extern int
384 
385 extern int
387 
388 /* Find the number of ordinary operands, state operands, and interface
389  operands for an instruction. These return XTENSA_UNDEFINED on
390  error. */
391 
392 extern int
394 
395 extern int
397 
398 extern int
400 
401 /* Get functional unit usage requirements for an opcode. Each "use"
402  is identified by a <functional unit, pipeline stage> pair. The
403  "num_funcUnit_uses" function returns the number of these "uses" or
404  XTENSA_UNDEFINED on error. The "funcUnit_use" function returns
405  a pointer to a "use" pair or null on error. */
406 
409  int stage;
411 
412 extern int
414 
415 extern xtensa_funcUnit_use *
417 
418 /* Operand information. */
419 
420 /* Get the name of an operand. Returns null on error. */
421 
422 extern const char *
424 
425 /* Some operands are "invisible", i.e., not explicitly specified in
426  assembly language. When assembling an instruction, you need not set
427  the values of invisible operands, since they are either hardwired or
428  derived from other field values. The values of invisible operands
429  can be examined in the same way as other operands, but remember that
430  an invisible operand may get its value from another visible one, so
431  the entire instruction must be available before examining the
432  invisible operand values. This function returns 1 if an operand is
433  visible, 0 if it is invisible, or XTENSA_UNDEFINED on error. Note
434  that whether an operand is visible is orthogonal to whether it is
435  "implicit", i.e., whether it is encoded in a field in the
436  instruction. */
437 
438 extern int
440 
441 /* Check if an operand is an input ('i'), output ('o'), or inout ('m')
442  operand. Note: The output operand of a conditional assignment
443  (e.g., movnez) appears here as an inout ('m') even if it is declared
444  in the TIE code as an output ('o'); this allows the compiler to
445  properly handle register allocation for conditional assignments.
446  Returns 0 on error. */
447 
448 extern char
450 
451 /* Get and set the raw (encoded) value of the field for the specified
452  operand. The "set" function does not check if the value fits in the
453  field; that is done by the "encode" function below. Both of these
454  functions return non-zero on error, e.g., if the field is not defined
455  for the specified slot. */
456 
457 extern int
459  xtensa_format fmt, int slot,
460  const xtensa_insnbuf slotbuf, uint32 *valp);
461 
462 extern int
464  xtensa_format fmt, int slot,
465  xtensa_insnbuf slotbuf, uint32 val);
466 
467 /* Encode and decode operands. The raw bits in the operand field may
468  be encoded in a variety of different ways. These functions hide
469  the details of that encoding. The result values are returned through
470  the argument pointer. The return value is non-zero on error. */
471 
472 extern int
474  uint32 *valp);
475 
476 extern int
478  uint32 *valp);
479 
480 /* An operand may be either a register operand or an immediate of some
481  sort (e.g., PC-relative or not). The "is_register" function returns
482  0 if the operand is an immediate, 1 if it is a register, and
483  XTENSA_UNDEFINED on error. The "regfile" function returns the
484  regfile for a register operand, or XTENSA_UNDEFINED on error. */
485 
486 extern int
488 
489 extern xtensa_regfile
491 
492 /* Register operands may span multiple consecutive registers, e.g., a
493  64-bit data type may occupy two 32-bit registers. Only the first
494  register is encoded in the operand field. This function specifies
495  the number of consecutive registers occupied by this operand. For
496  non-register operands, the return value is undefined. Returns
497  XTENSA_UNDEFINED on error. */
498 
499 extern int
501 
502 /* Some register operands do not completely identify the register being
503  accessed. For example, the operand value may be added to an internal
504  state value. By definition, this implies that the corresponding
505  regfile is not allocatable. Unknown registers should generally be
506  treated with worst-case assumptions. The function returns 0 if the
507  register value is unknown, 1 if known, and XTENSA_UNDEFINED on
508  error. */
509 
510 extern int
512 
513 /* Check if an immediate operand is PC-relative. Returns 0 for register
514  operands and non-PC-relative immediates, 1 for PC-relative
515  immediates, and XTENSA_UNDEFINED on error. */
516 
517 extern int
519 
520 /* For PC-relative offset operands, the interpretation of the offset may
521  vary between opcodes, e.g., is it relative to the current PC or that
522  of the next instruction? The following functions are defined to
523  perform PC-relative relocations and to undo them (as in the
524  disassembler). The "do_reloc" function takes the desired address
525  value and the PC of the current instruction and sets the value to the
526  corresponding PC-relative offset (which can then be encoded and
527  stored into the operand field). The "undo_reloc" function takes the
528  unencoded offset value and the current PC and sets the value to the
529  appropriate address. The return values are non-zero on error. Note
530  that these functions do not replace the encode/decode functions; the
531  operands must be encoded/decoded separately and the encode functions
532  are responsible for detecting invalid operand values. */
533 
534 extern int
536  uint32 *valp, uint32 pc);
537 
538 extern int
540  uint32 *valp, uint32 pc);
541 
542 /* State Operands. */
543 
544 /* Get the state accessed by a state operand. Returns XTENSA_UNDEFINED
545  on error. */
546 
547 extern xtensa_state
549 
550 /* Check if a state operand is an input ('i'), output ('o'), or inout
551  ('m') operand. Returns 0 on error. */
552 
553 extern char
555 
556 /* Interface Operands. */
557 
558 /* Get the external interface accessed by an interface operand.
559  Returns XTENSA_UNDEFINED on error. */
560 
561 extern xtensa_interface
563  int ifOp);
564 
565 /* Register Files. */
566 
567 /* Regfiles include both "real" regfiles and "views", where a view
568  allows a group of adjacent registers in a real "parent" regfile to be
569  viewed as a single register. A regfile view has all the same
570  properties as its parent except for its (long) name, bit width, number
571  of entries, and default ctype. You can use the parent function to
572  distinguish these two classes. */
573 
574 /* Look up a regfile by either its name or its abbreviated "short name".
575  Returns XTENSA_UNDEFINED on error. The "lookup_shortname" function
576  ignores "view" regfiles since they always have the same shortname as
577  their parents. */
578 
579 extern xtensa_regfile
580 xtensa_regfile_lookup(xtensa_isa isa, const char *name);
581 
582 extern xtensa_regfile
583 xtensa_regfile_lookup_shortname(xtensa_isa isa, const char *shortname);
584 
585 /* Get the name or abbreviated "short name" of a regfile.
586  Returns null on error. */
587 
588 extern const char *
590 
591 extern const char *
593 
594 /* Get the parent regfile of a "view" regfile. If the regfile is not a
595  view, the result is the same as the input parameter. Returns
596  XTENSA_UNDEFINED on error. */
597 
598 extern xtensa_regfile
600 
601 /* Get the bit width of a regfile or regfile view.
602  Returns XTENSA_UNDEFINED on error. */
603 
604 extern int
606 
607 /* Get the number of regfile entries. Returns XTENSA_UNDEFINED on
608  error. */
609 
610 extern int
612 
613 /* Processor States. */
614 
615 /* Look up a state by name. Returns XTENSA_UNDEFINED on error. */
616 
617 extern xtensa_state
618 xtensa_state_lookup(xtensa_isa isa, const char *name);
619 
620 /* Get the name for a processor state. Returns null on error. */
621 
622 extern const char *
624 
625 /* Get the bit width for a processor state.
626  Returns XTENSA_UNDEFINED on error. */
627 
628 extern int
630 
631 /* Check if a state is exported from the processor core. Returns 0 if
632  the condition is false, 1 if the condition is true, and
633  XTENSA_UNDEFINED on error. */
634 
635 extern int
637 
638 /* Check for a "shared_or" state. Returns 0 if the condition is false,
639  1 if the condition is true, and XTENSA_UNDEFINED on error. */
640 
641 extern int
643 
644 /* Sysregs ("special registers" and "user registers"). */
645 
646 /* Look up a register by its number and whether it is a "user register"
647  or a "special register". Returns XTENSA_UNDEFINED if the sysreg does
648  not exist. */
649 
650 extern xtensa_sysreg
651 xtensa_sysreg_lookup(xtensa_isa isa, int num, int is_user);
652 
653 /* Check if there exists a sysreg with a given name.
654  If not, this function returns XTENSA_UNDEFINED. */
655 
656 extern xtensa_sysreg
657 xtensa_sysreg_lookup_name(xtensa_isa isa, const char *name);
658 
659 /* Get the name of a sysreg. Returns null on error. */
660 
661 extern const char *
663 
664 /* Get the register number. Returns XTENSA_UNDEFINED on error. */
665 
666 extern int
668 
669 /* Check if a sysreg is a "special register" or a "user register".
670  Returns 0 for special registers, 1 for user registers and
671  XTENSA_UNDEFINED on error. */
672 
673 extern int
675 
676 /* Interfaces. */
677 
678 /* Find an interface by name. The return value is XTENSA_UNDEFINED if
679  the specified interface is not found. */
680 
681 extern xtensa_interface
682 xtensa_interface_lookup(xtensa_isa isa, const char *ifname);
683 
684 /* Get the name of an interface. Returns null on error. */
685 
686 extern const char *
688 
689 /* Get the bit width for an interface.
690  Returns XTENSA_UNDEFINED on error. */
691 
692 extern int
694 
695 /* Check if an interface is an input ('i') or output ('o') with respect
696  to the Xtensa processor core. Returns 0 on error. */
697 
698 extern char
700 
701 /* Check if accessing an interface has potential side effects.
702  Currently "data" interfaces have side effects and "control"
703  interfaces do not. Returns 1 if there are side effects, 0 if not,
704  and XTENSA_UNDEFINED on error. */
705 
706 extern int
708 
709 /* Some interfaces may be related such that accessing one interface
710  has side effects on a set of related interfaces. The interfaces
711  are partitioned into equivalence classes of related interfaces, and
712  each class is assigned a unique identifier number. This function
713  returns the class identifier for an interface, or XTENSA_UNDEFINED
714  on error. These identifiers can be compared to determine if two
715  interfaces are related; the specific values of the identifiers have
716  no particular meaning otherwise. */
717 
718 extern int
720 
721 /* Functional Units. */
722 
723 /* Find a functional unit by name. The return value is XTENSA_UNDEFINED if
724  the specified unit is not found. */
725 
726 extern xtensa_funcUnit
727 xtensa_funcUnit_lookup(xtensa_isa isa, const char *fname);
728 
729 /* Get the name of a functional unit. Returns null on error. */
730 
731 extern const char *
733 
734 /* Functional units may be replicated. See how many instances of a
735  particular function unit exist. Returns XTENSA_UNDEFINED on error. */
736 
737 extern int
739 
740 #ifdef __cplusplus
741 }
742 #endif
743 #endif /* XTENSA_LIBISA_H */
ut16 val
Definition: armass64_const.h:6
static ut64 opc
Definition: desil.c:33
voidpf void * buf
Definition: ioapi.h:138
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
Definition: sflib.h:126
Definition: z80asm.h:102
xtensa_funcUnit unit
Definition: xtensa-isa.h:408
__declspec(noreturn) void uv_fatal_error(const int errorno
const char * xtensa_regfile_shortname(xtensa_isa isa, xtensa_regfile rf)
Definition: xtensa-isa.c:1474
int xtensa_opcode_num_funcUnit_uses(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:852
int xtensa_operand_is_PCrelative(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:1221
int xtensa_isa_num_opcodes(xtensa_isa isa)
Definition: xtensa-isa.c:461
enum xtensa_isa_status_enum xtensa_isa_status
xtensa_isa_status_enum
Definition: xtensa-isa.h:149
@ xtensa_isa_internal_error
Definition: xtensa-isa.h:166
@ xtensa_isa_out_of_memory
Definition: xtensa-isa.h:164
@ xtensa_isa_bad_state
Definition: xtensa-isa.h:159
@ xtensa_isa_bad_iclass
Definition: xtensa-isa.h:156
@ xtensa_isa_wrong_slot
Definition: xtensa-isa.h:162
@ xtensa_isa_bad_opcode
Definition: xtensa-isa.h:153
@ xtensa_isa_bad_funcUnit
Definition: xtensa-isa.h:161
@ xtensa_isa_bad_field
Definition: xtensa-isa.h:155
@ xtensa_isa_bad_interface
Definition: xtensa-isa.h:160
@ xtensa_isa_bad_value
Definition: xtensa-isa.h:167
@ xtensa_isa_bad_regfile
Definition: xtensa-isa.h:157
@ xtensa_isa_bad_sysreg
Definition: xtensa-isa.h:158
@ xtensa_isa_bad_slot
Definition: xtensa-isa.h:152
@ xtensa_isa_no_field
Definition: xtensa-isa.h:163
@ xtensa_isa_bad_operand
Definition: xtensa-isa.h:154
@ xtensa_isa_ok
Definition: xtensa-isa.h:150
@ xtensa_isa_bad_format
Definition: xtensa-isa.h:151
@ xtensa_isa_buffer_overflow
Definition: xtensa-isa.h:165
void xtensa_isa_free(xtensa_isa isa)
Definition: xtensa-isa.c:344
int xtensa_format_get_slot(xtensa_isa isa, xtensa_format fmt, int slot, const xtensa_insnbuf insn, xtensa_insnbuf slotbuf)
Definition: xtensa-isa.c:629
int xtensa_opcode_is_loop(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:792
int xtensa_operand_encode(xtensa_isa isa, xtensa_opcode opc, int opnd, uint32 *valp)
Definition: xtensa-isa.c:1053
int xtensa_opcode
Definition: xtensa-isa.h:83
const char * xtensa_format_name(xtensa_isa isa, xtensa_format fmt)
Definition: xtensa-isa.c:535
struct xtensa_funcUnit_use_struct xtensa_funcUnit_use
int xtensa_format
Definition: xtensa-isa.h:84
int xtensa_operand_do_reloc(xtensa_isa isa, xtensa_opcode opc, int opnd, uint32 *valp, uint32 pc)
Definition: xtensa-isa.c:1239
int xtensa_format_num_slots(xtensa_isa isa, xtensa_format fmt)
Definition: xtensa-isa.c:606
int xtensa_opcode_is_branch(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:768
int xtensa_operand_undo_reloc(xtensa_isa isa, xtensa_opcode opc, int opnd, uint32 *valp, uint32 pc)
Definition: xtensa-isa.c:1274
int xtensa_opcode_is_jump(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:780
int xtensa_format_set_slot(xtensa_isa isa, xtensa_format fmt, int slot, xtensa_insnbuf insn, const xtensa_insnbuf slotbuf)
Definition: xtensa-isa.c:645
char * xtensa_isa_error_msg(xtensa_isa isa)
int xtensa_opcode_is_call(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:804
const char * xtensa_regfile_name(xtensa_isa isa, xtensa_regfile rf)
Definition: xtensa-isa.c:1465
int xtensa_operand_set_field(xtensa_isa isa, xtensa_opcode opc, int opnd, xtensa_format fmt, int slot, xtensa_insnbuf slotbuf, uint32 val)
Definition: xtensa-isa.c:1014
xtensa_sysreg xtensa_sysreg_lookup(xtensa_isa isa, int num, int is_user)
Definition: xtensa-isa.c:1613
char xtensa_operand_inout(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:952
int xtensa_operand_num_regs(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:1188
int xtensa_operand_is_register(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:1155
xtensa_interface xtensa_interface_lookup(xtensa_isa isa, const char *ifname)
Definition: xtensa-isa.c:1711
xtensa_regfile xtensa_regfile_view_parent(xtensa_isa isa, xtensa_regfile rf)
Definition: xtensa-isa.c:1483
xtensa_state xtensa_state_lookup(xtensa_isa isa, const char *name)
Definition: xtensa-isa.c:1525
uint32 xtensa_insnbuf_word
Definition: xtensa-isa.h:178
int xtensa_regfile
Definition: xtensa-isa.h:85
int xtensa_isa_num_funcUnits(xtensa_isa isa)
Definition: xtensa-isa.c:501
int xtensa_isa_num_formats(xtensa_isa isa)
Definition: xtensa-isa.c:453
int xtensa_interface_class_id(xtensa_isa isa, xtensa_interface intf)
Definition: xtensa-isa.c:1782
int xtensa_isa_num_sysregs(xtensa_isa isa)
Definition: xtensa-isa.c:485
int xtensa_state_is_shared_or(xtensa_isa isa, xtensa_state st)
Definition: xtensa-isa.c:1586
struct xtensa_isa_opaque * xtensa_isa
int xtensa_isa_num_regfiles(xtensa_isa isa)
Definition: xtensa-isa.c:469
xtensa_opcode xtensa_opcode_decode(xtensa_isa isa, xtensa_format fmt, int slot, const xtensa_insnbuf slotbuf)
Definition: xtensa-isa.c:708
const char * xtensa_operand_name(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:910
int xtensa_opcode_num_operands(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:816
xtensa_insnbuf_word * xtensa_insnbuf
Definition: xtensa-isa.h:179
int xtensa_insnbuf_size(xtensa_isa isa)
Definition: xtensa-isa.c:80
xtensa_regfile xtensa_operand_regfile(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:1173
int xtensa_format_encode(xtensa_isa isa, xtensa_format fmt, xtensa_insnbuf insn)
Definition: xtensa-isa.c:587
const char * xtensa_funcUnit_name(xtensa_isa isa, xtensa_funcUnit fun)
Definition: xtensa-isa.c:1839
int xtensa_operand_get_field(xtensa_isa isa, xtensa_opcode opc, int opnd, xtensa_format fmt, int slot, const xtensa_insnbuf slotbuf, uint32 *valp)
Definition: xtensa-isa.c:975
int xtensa_sysreg_is_user(xtensa_isa isa, xtensa_sysreg sysreg)
Definition: xtensa-isa.c:1684
int xtensa_sysreg
Definition: xtensa-isa.h:87
int xtensa_regfile_num_entries(xtensa_isa isa, xtensa_regfile rf)
Definition: xtensa-isa.c:1501
int xtensa_operand_decode(xtensa_isa isa, xtensa_opcode opc, int opnd, uint32 *valp)
Definition: xtensa-isa.c:1128
xtensa_state xtensa_stateOperand_state(xtensa_isa isa, xtensa_opcode opc, int stOp)
Definition: xtensa-isa.c:1326
int xtensa_format_length(xtensa_isa isa, xtensa_format fmt)
Definition: xtensa-isa.c:597
const char * xtensa_state_name(xtensa_isa isa, xtensa_state st)
Definition: xtensa-isa.c:1556
int xtensa_insnbuf_to_chars(xtensa_isa isa, const xtensa_insnbuf insn, unsigned char *cp, int num_chars)
Definition: xtensa-isa.c:133
int xtensa_isa_num_states(xtensa_isa isa)
Definition: xtensa-isa.c:477
#define uint32
Definition: xtensa-isa.h:39
int xtensa_interface_num_bits(xtensa_isa isa, xtensa_interface intf)
Definition: xtensa-isa.c:1752
int xtensa_interface_has_side_effect(xtensa_isa isa, xtensa_interface intf)
Definition: xtensa-isa.c:1770
int xtensa_opcode_num_interfaceOperands(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:840
xtensa_interface xtensa_interfaceOperand_interface(xtensa_isa isa, xtensa_opcode opc, int ifOp)
Definition: xtensa-isa.c:1374
int xtensa_sysreg_number(xtensa_isa isa, xtensa_sysreg sysreg)
Definition: xtensa-isa.c:1675
xtensa_regfile xtensa_regfile_lookup(xtensa_isa isa, const char *name)
Definition: xtensa-isa.c:1405
int xtensa_interface
Definition: xtensa-isa.h:88
int xtensa_state_is_exported(xtensa_isa isa, xtensa_state st)
Definition: xtensa-isa.c:1574
xtensa_format xtensa_format_decode(xtensa_isa isa, const xtensa_insnbuf insn)
Definition: xtensa-isa.c:570
void xtensa_insnbuf_from_chars(xtensa_isa isa, xtensa_insnbuf insn, const unsigned char *cp, int num_chars)
Definition: xtensa-isa.c:196
xtensa_isa xtensa_isa_init(xtensa_isa_status *errno_p, char **error_msg_p)
Definition: xtensa-isa.c:248
xtensa_funcUnit_use * xtensa_opcode_funcUnit_use(xtensa_isa isa, xtensa_opcode opc, int u)
Definition: xtensa-isa.c:861
int xtensa_state
Definition: xtensa-isa.h:86
const char * xtensa_interface_name(xtensa_isa isa, xtensa_interface intf)
Definition: xtensa-isa.c:1743
int xtensa_regfile_num_bits(xtensa_isa isa, xtensa_regfile rf)
Definition: xtensa-isa.c:1492
char xtensa_stateOperand_inout(xtensa_isa isa, xtensa_opcode opc, int stOp)
Definition: xtensa-isa.c:1341
int xtensa_operand_is_visible(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:924
xtensa_opcode xtensa_opcode_lookup(xtensa_isa isa, const char *opname)
Definition: xtensa-isa.c:676
void xtensa_insnbuf_free(xtensa_isa isa, xtensa_insnbuf buf)
xtensa_isa xtensa_default_isa
Definition: elf32-xtensa.c:147
xtensa_regfile xtensa_regfile_lookup_shortname(xtensa_isa isa, const char *shortname)
Definition: xtensa-isa.c:1432
char xtensa_interface_inout(xtensa_isa isa, xtensa_interface intf)
Definition: xtensa-isa.c:1761
xtensa_format xtensa_format_lookup(xtensa_isa isa, const char *fmtname)
Definition: xtensa-isa.c:544
int xtensa_opcode_encode(xtensa_isa isa, xtensa_format fmt, int slot, xtensa_insnbuf slotbuf, xtensa_opcode opc)
Definition: xtensa-isa.c:732
int xtensa_state_num_bits(xtensa_isa isa, xtensa_state st)
Definition: xtensa-isa.c:1565
int xtensa_isa_length_from_chars(xtensa_isa isa, const unsigned char *cp)
Definition: xtensa-isa.c:413
int xtensa_funcUnit
Definition: xtensa-isa.h:89
int xtensa_opcode_num_stateOperands(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:828
int xtensa_operand_is_known_reg(xtensa_isa isa, xtensa_opcode opc, int opnd)
Definition: xtensa-isa.c:1203
xtensa_funcUnit xtensa_funcUnit_lookup(xtensa_isa isa, const char *fname)
Definition: xtensa-isa.c:1806
xtensa_opcode xtensa_format_slot_nop_opcode(xtensa_isa isa, xtensa_format fmt, int slot)
Definition: xtensa-isa.c:615
int xtensa_isa_num_pipe_stages(xtensa_isa isa)
Definition: xtensa-isa.c:421
int xtensa_isa_num_interfaces(xtensa_isa isa)
Definition: xtensa-isa.c:493
const char * xtensa_sysreg_name(xtensa_isa isa, xtensa_sysreg sysreg)
Definition: xtensa-isa.c:1666
xtensa_sysreg xtensa_sysreg_lookup_name(xtensa_isa isa, const char *name)
Definition: xtensa-isa.c:1634
int xtensa_isa_maxlength(xtensa_isa isa)
Definition: xtensa-isa.c:405
const char * xtensa_opcode_name(xtensa_isa isa, xtensa_opcode opc)
Definition: xtensa-isa.c:759
int xtensa_funcUnit_num_copies(xtensa_isa isa, xtensa_funcUnit fun)
Definition: xtensa-isa.c:1848
xtensa_insnbuf xtensa_insnbuf_alloc(xtensa_isa isa)
Definition: xtensa-isa.c:88
xtensa_isa_status xtensa_isa_errno(xtensa_isa isa)
int FAR intf
Definition: zconf.h:403