1 /* Instruction building/extraction support for frv. -*- C -*-
3 THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
4 - the resultant file is machine generated, cgen-ibld.in isn't
6 Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
8 This file is part of the GNU Binutils and GDB, the GNU debugger.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software Foundation, Inc.,
22 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
36 #include "safe-ctype.h"
39 #define min(a,b) ((a) < (b) ? (a) : (b))
41 #define max(a,b) ((a) > (b) ? (a) : (b))
43 /* Used by the ifield rtx function. */
44 #define FLD(f) (fields->f)
46 static const char * insert_normal
47 (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
48 unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
49 static const char * insert_insn_normal
50 (CGEN_CPU_DESC, const CGEN_INSN *,
51 CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
52 static int extract_normal
53 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
54 unsigned int, unsigned int, unsigned int, unsigned int,
55 unsigned int, unsigned int, bfd_vma, long *);
56 static int extract_insn_normal
57 (CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
58 CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
60 static void put_insn_int_value
61 (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
64 static CGEN_INLINE void insert_1
65 (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
66 static CGEN_INLINE int fill_cache
67 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
68 static CGEN_INLINE long extract_1
69 (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
72 /* Operand insertion. */
76 /* Subroutine of insert_normal. */
78 static CGEN_INLINE void
79 insert_1 (CGEN_CPU_DESC cd,
89 x = cgen_get_insn_value (cd, bufp, word_length);
91 /* Written this way to avoid undefined behaviour. */
92 mask = (((1L << (length - 1)) - 1) << 1) | 1;
94 shift = (start + 1) - length;
96 shift = (word_length - (start + length));
97 x = (x & ~(mask << shift)) | ((value & mask) << shift);
99 cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
102 #endif /* ! CGEN_INT_INSN_P */
104 /* Default insertion routine.
106 ATTRS is a mask of the boolean attributes.
107 WORD_OFFSET is the offset in bits from the start of the insn of the value.
108 WORD_LENGTH is the length of the word in bits in which the value resides.
109 START is the starting bit number in the word, architecture origin.
110 LENGTH is the length of VALUE in bits.
111 TOTAL_LENGTH is the total length of the insn in bits.
113 The result is an error message or NULL if success. */
115 /* ??? This duplicates functionality with bfd's howto table and
116 bfd_install_relocation. */
117 /* ??? This doesn't handle bfd_vma's. Create another function when
121 insert_normal (CGEN_CPU_DESC cd,
124 unsigned int word_offset,
127 unsigned int word_length,
128 unsigned int total_length,
129 CGEN_INSN_BYTES_PTR buffer)
131 static char errbuf[100];
132 /* Written this way to avoid undefined behaviour. */
133 unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
135 /* If LENGTH is zero, this operand doesn't contribute to the value. */
145 if (word_length > 32)
148 /* For architectures with insns smaller than the base-insn-bitsize,
149 word_length may be too big. */
150 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
153 && word_length > total_length)
154 word_length = total_length;
157 /* Ensure VALUE will fit. */
158 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
160 long minval = - (1L << (length - 1));
161 unsigned long maxval = mask;
163 if ((value > 0 && (unsigned long) value > maxval)
166 /* xgettext:c-format */
168 _("operand out of range (%ld not between %ld and %lu)"),
169 value, minval, maxval);
173 else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
175 unsigned long maxval = mask;
177 if ((unsigned long) value > maxval)
179 /* xgettext:c-format */
181 _("operand out of range (%lu not between 0 and %lu)"),
188 if (! cgen_signed_overflow_ok_p (cd))
190 long minval = - (1L << (length - 1));
191 long maxval = (1L << (length - 1)) - 1;
193 if (value < minval || value > maxval)
196 /* xgettext:c-format */
197 (errbuf, _("operand out of range (%ld not between %ld and %ld)"),
198 value, minval, maxval);
209 if (CGEN_INSN_LSB0_P)
210 shift = (word_offset + start + 1) - length;
212 shift = total_length - (word_offset + start + length);
213 *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
216 #else /* ! CGEN_INT_INSN_P */
219 unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
221 insert_1 (cd, value, start, length, word_length, bufp);
224 #endif /* ! CGEN_INT_INSN_P */
229 /* Default insn builder (insert handler).
230 The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
231 that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
232 recorded in host byte order, otherwise BUFFER is an array of bytes
233 and the value is recorded in target byte order).
234 The result is an error message or NULL if success. */
237 insert_insn_normal (CGEN_CPU_DESC cd,
238 const CGEN_INSN * insn,
239 CGEN_FIELDS * fields,
240 CGEN_INSN_BYTES_PTR buffer,
243 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
245 const CGEN_SYNTAX_CHAR_TYPE * syn;
247 CGEN_INIT_INSERT (cd);
248 value = CGEN_INSN_BASE_VALUE (insn);
250 /* If we're recording insns as numbers (rather than a string of bytes),
251 target byte order handling is deferred until later. */
255 put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
256 CGEN_FIELDS_BITSIZE (fields), value);
260 cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
261 (unsigned) CGEN_FIELDS_BITSIZE (fields)),
264 #endif /* ! CGEN_INT_INSN_P */
266 /* ??? It would be better to scan the format's fields.
267 Still need to be able to insert a value based on the operand though;
268 e.g. storing a branch displacement that got resolved later.
269 Needs more thought first. */
271 for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
275 if (CGEN_SYNTAX_CHAR_P (* syn))
278 errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
288 /* Cover function to store an insn value into an integral insn. Must go here
289 because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
292 put_insn_int_value (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
293 CGEN_INSN_BYTES_PTR buf,
298 /* For architectures with insns smaller than the base-insn-bitsize,
299 length may be too big. */
300 if (length > insn_length)
304 int shift = insn_length - length;
305 /* Written this way to avoid undefined behaviour. */
306 CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
307 *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
312 /* Operand extraction. */
314 #if ! CGEN_INT_INSN_P
316 /* Subroutine of extract_normal.
317 Ensure sufficient bytes are cached in EX_INFO.
318 OFFSET is the offset in bytes from the start of the insn of the value.
319 BYTES is the length of the needed value.
320 Returns 1 for success, 0 for failure. */
322 static CGEN_INLINE int
323 fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
324 CGEN_EXTRACT_INFO *ex_info,
329 /* It's doubtful that the middle part has already been fetched so
330 we don't optimize that case. kiss. */
332 disassemble_info *info = (disassemble_info *) ex_info->dis_info;
334 /* First do a quick check. */
335 mask = (1 << bytes) - 1;
336 if (((ex_info->valid >> offset) & mask) == mask)
339 /* Search for the first byte we need to read. */
340 for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
341 if (! (mask & ex_info->valid))
349 status = (*info->read_memory_func)
350 (pc, ex_info->insn_bytes + offset, bytes, info);
354 (*info->memory_error_func) (status, pc, info);
358 ex_info->valid |= ((1 << bytes) - 1) << offset;
364 /* Subroutine of extract_normal. */
366 static CGEN_INLINE long
367 extract_1 (CGEN_CPU_DESC cd,
368 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
373 bfd_vma pc ATTRIBUTE_UNUSED)
378 int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG;
380 x = cgen_get_insn_value (cd, bufp, word_length);
382 if (CGEN_INSN_LSB0_P)
383 shift = (start + 1) - length;
385 shift = (word_length - (start + length));
389 #endif /* ! CGEN_INT_INSN_P */
391 /* Default extraction routine.
393 INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
394 or sometimes less for cases like the m32r where the base insn size is 32
395 but some insns are 16 bits.
396 ATTRS is a mask of the boolean attributes. We only need `SIGNED',
397 but for generality we take a bitmask of all of them.
398 WORD_OFFSET is the offset in bits from the start of the insn of the value.
399 WORD_LENGTH is the length of the word in bits in which the value resides.
400 START is the starting bit number in the word, architecture origin.
401 LENGTH is the length of VALUE in bits.
402 TOTAL_LENGTH is the total length of the insn in bits.
404 Returns 1 for success, 0 for failure. */
406 /* ??? The return code isn't properly used. wip. */
408 /* ??? This doesn't handle bfd_vma's. Create another function when
412 extract_normal (CGEN_CPU_DESC cd,
413 #if ! CGEN_INT_INSN_P
414 CGEN_EXTRACT_INFO *ex_info,
416 CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
418 CGEN_INSN_INT insn_value,
420 unsigned int word_offset,
423 unsigned int word_length,
424 unsigned int total_length,
425 #if ! CGEN_INT_INSN_P
428 bfd_vma pc ATTRIBUTE_UNUSED,
434 /* If LENGTH is zero, this operand doesn't contribute to the value
435 so give it a standard value of zero. */
448 if (word_length > 32)
451 /* For architectures with insns smaller than the insn-base-bitsize,
452 word_length may be too big. */
453 if (cd->min_insn_bitsize < cd->base_insn_bitsize)
456 && word_length > total_length)
457 word_length = total_length;
460 /* Does the value reside in INSN_VALUE, and at the right alignment? */
462 if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
464 if (CGEN_INSN_LSB0_P)
465 value = insn_value >> ((word_offset + start + 1) - length);
467 value = insn_value >> (total_length - ( word_offset + start + length));
470 #if ! CGEN_INT_INSN_P
474 unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
476 if (word_length > 32)
479 if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
482 value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
485 #endif /* ! CGEN_INT_INSN_P */
487 /* Written this way to avoid undefined behaviour. */
488 mask = (((1L << (length - 1)) - 1) << 1) | 1;
492 if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
493 && (value & (1L << (length - 1))))
501 /* Default insn extractor.
503 INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
504 The extracted fields are stored in FIELDS.
505 EX_INFO is used to handle reading variable length insns.
506 Return the length of the insn in bits, or 0 if no match,
507 or -1 if an error occurs fetching data (memory_error_func will have
511 extract_insn_normal (CGEN_CPU_DESC cd,
512 const CGEN_INSN *insn,
513 CGEN_EXTRACT_INFO *ex_info,
514 CGEN_INSN_INT insn_value,
518 const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
519 const CGEN_SYNTAX_CHAR_TYPE *syn;
521 CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
523 CGEN_INIT_EXTRACT (cd);
525 for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
529 if (CGEN_SYNTAX_CHAR_P (*syn))
532 length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
533 ex_info, insn_value, fields, pc);
538 /* We recognized and successfully extracted this insn. */
539 return CGEN_INSN_BITSIZE (insn);
542 /* machine generated code added here */
544 const char * frv_cgen_insert_operand
545 PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
547 /* Main entry point for operand insertion.
549 This function is basically just a big switch statement. Earlier versions
550 used tables to look up the function to use, but
551 - if the table contains both assembler and disassembler functions then
552 the disassembler contains much of the assembler and vice-versa,
553 - there's a lot of inlining possibilities as things grow,
554 - using a switch statement avoids the function call overhead.
556 This function could be moved into `parse_insn_normal', but keeping it
557 separate makes clear the interface between `parse_insn_normal' and each of
558 the handlers. It's also needed by GAS to insert operands that couldn't be
559 resolved during parsing. */
562 frv_cgen_insert_operand (cd, opindex, fields, buffer, pc)
565 CGEN_FIELDS * fields;
566 CGEN_INSN_BYTES_PTR buffer;
567 bfd_vma pc ATTRIBUTE_UNUSED;
569 const char * errmsg = NULL;
570 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
574 case FRV_OPERAND_A0 :
575 errmsg = insert_normal (cd, fields->f_A, 0, 0, 17, 1, 32, total_length, buffer);
577 case FRV_OPERAND_A1 :
578 errmsg = insert_normal (cd, fields->f_A, 0, 0, 17, 1, 32, total_length, buffer);
580 case FRV_OPERAND_ACC40SI :
581 errmsg = insert_normal (cd, fields->f_ACC40Si, 0, 0, 17, 6, 32, total_length, buffer);
583 case FRV_OPERAND_ACC40SK :
584 errmsg = insert_normal (cd, fields->f_ACC40Sk, 0, 0, 30, 6, 32, total_length, buffer);
586 case FRV_OPERAND_ACC40UI :
587 errmsg = insert_normal (cd, fields->f_ACC40Ui, 0, 0, 17, 6, 32, total_length, buffer);
589 case FRV_OPERAND_ACC40UK :
590 errmsg = insert_normal (cd, fields->f_ACC40Uk, 0, 0, 30, 6, 32, total_length, buffer);
592 case FRV_OPERAND_ACCGI :
593 errmsg = insert_normal (cd, fields->f_ACCGi, 0, 0, 17, 6, 32, total_length, buffer);
595 case FRV_OPERAND_ACCGK :
596 errmsg = insert_normal (cd, fields->f_ACCGk, 0, 0, 30, 6, 32, total_length, buffer);
598 case FRV_OPERAND_CCI :
599 errmsg = insert_normal (cd, fields->f_CCi, 0, 0, 11, 3, 32, total_length, buffer);
601 case FRV_OPERAND_CPRDOUBLEK :
602 errmsg = insert_normal (cd, fields->f_CPRk, 0, 0, 30, 6, 32, total_length, buffer);
604 case FRV_OPERAND_CPRI :
605 errmsg = insert_normal (cd, fields->f_CPRi, 0, 0, 17, 6, 32, total_length, buffer);
607 case FRV_OPERAND_CPRJ :
608 errmsg = insert_normal (cd, fields->f_CPRj, 0, 0, 5, 6, 32, total_length, buffer);
610 case FRV_OPERAND_CPRK :
611 errmsg = insert_normal (cd, fields->f_CPRk, 0, 0, 30, 6, 32, total_length, buffer);
613 case FRV_OPERAND_CRI :
614 errmsg = insert_normal (cd, fields->f_CRi, 0, 0, 14, 3, 32, total_length, buffer);
616 case FRV_OPERAND_CRJ :
617 errmsg = insert_normal (cd, fields->f_CRj, 0, 0, 2, 3, 32, total_length, buffer);
619 case FRV_OPERAND_CRJ_FLOAT :
620 errmsg = insert_normal (cd, fields->f_CRj_float, 0, 0, 26, 2, 32, total_length, buffer);
622 case FRV_OPERAND_CRJ_INT :
624 long value = fields->f_CRj_int;
625 value = ((value) - (4));
626 errmsg = insert_normal (cd, value, 0, 0, 26, 2, 32, total_length, buffer);
629 case FRV_OPERAND_CRK :
630 errmsg = insert_normal (cd, fields->f_CRk, 0, 0, 27, 3, 32, total_length, buffer);
632 case FRV_OPERAND_FCCI_1 :
633 errmsg = insert_normal (cd, fields->f_FCCi_1, 0, 0, 11, 2, 32, total_length, buffer);
635 case FRV_OPERAND_FCCI_2 :
636 errmsg = insert_normal (cd, fields->f_FCCi_2, 0, 0, 26, 2, 32, total_length, buffer);
638 case FRV_OPERAND_FCCI_3 :
639 errmsg = insert_normal (cd, fields->f_FCCi_3, 0, 0, 1, 2, 32, total_length, buffer);
641 case FRV_OPERAND_FCCK :
642 errmsg = insert_normal (cd, fields->f_FCCk, 0, 0, 26, 2, 32, total_length, buffer);
644 case FRV_OPERAND_FRDOUBLEI :
645 errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
647 case FRV_OPERAND_FRDOUBLEJ :
648 errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
650 case FRV_OPERAND_FRDOUBLEK :
651 errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
653 case FRV_OPERAND_FRI :
654 errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
656 case FRV_OPERAND_FRINTI :
657 errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
659 case FRV_OPERAND_FRINTIEVEN :
660 errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
662 case FRV_OPERAND_FRINTJ :
663 errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
665 case FRV_OPERAND_FRINTJEVEN :
666 errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
668 case FRV_OPERAND_FRINTK :
669 errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
671 case FRV_OPERAND_FRINTKEVEN :
672 errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
674 case FRV_OPERAND_FRJ :
675 errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
677 case FRV_OPERAND_FRK :
678 errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
680 case FRV_OPERAND_FRKHI :
681 errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
683 case FRV_OPERAND_FRKLO :
684 errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
686 case FRV_OPERAND_GRDOUBLEK :
687 errmsg = insert_normal (cd, fields->f_GRk, 0, 0, 30, 6, 32, total_length, buffer);
689 case FRV_OPERAND_GRI :
690 errmsg = insert_normal (cd, fields->f_GRi, 0, 0, 17, 6, 32, total_length, buffer);
692 case FRV_OPERAND_GRJ :
693 errmsg = insert_normal (cd, fields->f_GRj, 0, 0, 5, 6, 32, total_length, buffer);
695 case FRV_OPERAND_GRK :
696 errmsg = insert_normal (cd, fields->f_GRk, 0, 0, 30, 6, 32, total_length, buffer);
698 case FRV_OPERAND_GRKHI :
699 errmsg = insert_normal (cd, fields->f_GRk, 0, 0, 30, 6, 32, total_length, buffer);
701 case FRV_OPERAND_GRKLO :
702 errmsg = insert_normal (cd, fields->f_GRk, 0, 0, 30, 6, 32, total_length, buffer);
704 case FRV_OPERAND_ICCI_1 :
705 errmsg = insert_normal (cd, fields->f_ICCi_1, 0, 0, 11, 2, 32, total_length, buffer);
707 case FRV_OPERAND_ICCI_2 :
708 errmsg = insert_normal (cd, fields->f_ICCi_2, 0, 0, 26, 2, 32, total_length, buffer);
710 case FRV_OPERAND_ICCI_3 :
711 errmsg = insert_normal (cd, fields->f_ICCi_3, 0, 0, 1, 2, 32, total_length, buffer);
713 case FRV_OPERAND_LI :
714 errmsg = insert_normal (cd, fields->f_LI, 0, 0, 25, 1, 32, total_length, buffer);
716 case FRV_OPERAND_AE :
717 errmsg = insert_normal (cd, fields->f_ae, 0, 0, 25, 1, 32, total_length, buffer);
719 case FRV_OPERAND_CCOND :
720 errmsg = insert_normal (cd, fields->f_ccond, 0, 0, 12, 1, 32, total_length, buffer);
722 case FRV_OPERAND_COND :
723 errmsg = insert_normal (cd, fields->f_cond, 0, 0, 8, 1, 32, total_length, buffer);
725 case FRV_OPERAND_D12 :
726 errmsg = insert_normal (cd, fields->f_d12, 0|(1<<CGEN_IFLD_SIGNED), 0, 11, 12, 32, total_length, buffer);
728 case FRV_OPERAND_DEBUG :
729 errmsg = insert_normal (cd, fields->f_debug, 0, 0, 25, 1, 32, total_length, buffer);
731 case FRV_OPERAND_EIR :
732 errmsg = insert_normal (cd, fields->f_eir, 0, 0, 17, 6, 32, total_length, buffer);
734 case FRV_OPERAND_HINT :
735 errmsg = insert_normal (cd, fields->f_hint, 0, 0, 17, 2, 32, total_length, buffer);
737 case FRV_OPERAND_HINT_NOT_TAKEN :
738 errmsg = insert_normal (cd, fields->f_hint, 0, 0, 17, 2, 32, total_length, buffer);
740 case FRV_OPERAND_HINT_TAKEN :
741 errmsg = insert_normal (cd, fields->f_hint, 0, 0, 17, 2, 32, total_length, buffer);
743 case FRV_OPERAND_LABEL16 :
745 long value = fields->f_label16;
746 value = ((int) (((value) - (pc))) >> (2));
747 errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, buffer);
750 case FRV_OPERAND_LABEL24 :
753 FLD (f_labelH6) = ((int) (((FLD (f_label24)) - (pc))) >> (20));
754 FLD (f_labelL18) = ((((unsigned int) (((FLD (f_label24)) - (pc))) >> (2))) & (262143));
756 errmsg = insert_normal (cd, fields->f_labelH6, 0|(1<<CGEN_IFLD_SIGNED), 0, 30, 6, 32, total_length, buffer);
759 errmsg = insert_normal (cd, fields->f_labelL18, 0, 0, 17, 18, 32, total_length, buffer);
764 case FRV_OPERAND_LOCK :
765 errmsg = insert_normal (cd, fields->f_lock, 0, 0, 25, 1, 32, total_length, buffer);
767 case FRV_OPERAND_PACK :
768 errmsg = insert_normal (cd, fields->f_pack, 0, 0, 31, 1, 32, total_length, buffer);
770 case FRV_OPERAND_S10 :
771 errmsg = insert_normal (cd, fields->f_s10, 0|(1<<CGEN_IFLD_SIGNED), 0, 9, 10, 32, total_length, buffer);
773 case FRV_OPERAND_S12 :
774 errmsg = insert_normal (cd, fields->f_d12, 0|(1<<CGEN_IFLD_SIGNED), 0, 11, 12, 32, total_length, buffer);
776 case FRV_OPERAND_S16 :
777 errmsg = insert_normal (cd, fields->f_s16, 0|(1<<CGEN_IFLD_SIGNED), 0, 15, 16, 32, total_length, buffer);
779 case FRV_OPERAND_S5 :
780 errmsg = insert_normal (cd, fields->f_s5, 0|(1<<CGEN_IFLD_SIGNED), 0, 4, 5, 32, total_length, buffer);
782 case FRV_OPERAND_S6 :
783 errmsg = insert_normal (cd, fields->f_s6, 0|(1<<CGEN_IFLD_SIGNED), 0, 5, 6, 32, total_length, buffer);
785 case FRV_OPERAND_S6_1 :
786 errmsg = insert_normal (cd, fields->f_s6_1, 0|(1<<CGEN_IFLD_SIGNED), 0, 11, 6, 32, total_length, buffer);
788 case FRV_OPERAND_SLO16 :
789 errmsg = insert_normal (cd, fields->f_s16, 0|(1<<CGEN_IFLD_SIGNED), 0, 15, 16, 32, total_length, buffer);
791 case FRV_OPERAND_SPR :
794 FLD (f_spr_h) = ((unsigned int) (FLD (f_spr)) >> (6));
795 FLD (f_spr_l) = ((FLD (f_spr)) & (63));
797 errmsg = insert_normal (cd, fields->f_spr_h, 0, 0, 30, 6, 32, total_length, buffer);
800 errmsg = insert_normal (cd, fields->f_spr_l, 0, 0, 17, 6, 32, total_length, buffer);
805 case FRV_OPERAND_U12 :
808 FLD (f_u12_h) = ((int) (FLD (f_u12)) >> (6));
809 FLD (f_u12_l) = ((FLD (f_u12)) & (63));
811 errmsg = insert_normal (cd, fields->f_u12_h, 0|(1<<CGEN_IFLD_SIGNED), 0, 17, 6, 32, total_length, buffer);
814 errmsg = insert_normal (cd, fields->f_u12_l, 0, 0, 5, 6, 32, total_length, buffer);
819 case FRV_OPERAND_U16 :
820 errmsg = insert_normal (cd, fields->f_u16, 0, 0, 15, 16, 32, total_length, buffer);
822 case FRV_OPERAND_U6 :
823 errmsg = insert_normal (cd, fields->f_u6, 0, 0, 5, 6, 32, total_length, buffer);
825 case FRV_OPERAND_UHI16 :
826 errmsg = insert_normal (cd, fields->f_u16, 0, 0, 15, 16, 32, total_length, buffer);
828 case FRV_OPERAND_ULO16 :
829 errmsg = insert_normal (cd, fields->f_u16, 0, 0, 15, 16, 32, total_length, buffer);
833 /* xgettext:c-format */
834 fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
842 int frv_cgen_extract_operand
843 PARAMS ((CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
844 CGEN_FIELDS *, bfd_vma));
846 /* Main entry point for operand extraction.
847 The result is <= 0 for error, >0 for success.
848 ??? Actual values aren't well defined right now.
850 This function is basically just a big switch statement. Earlier versions
851 used tables to look up the function to use, but
852 - if the table contains both assembler and disassembler functions then
853 the disassembler contains much of the assembler and vice-versa,
854 - there's a lot of inlining possibilities as things grow,
855 - using a switch statement avoids the function call overhead.
857 This function could be moved into `print_insn_normal', but keeping it
858 separate makes clear the interface between `print_insn_normal' and each of
862 frv_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
865 CGEN_EXTRACT_INFO *ex_info;
866 CGEN_INSN_INT insn_value;
867 CGEN_FIELDS * fields;
870 /* Assume success (for those operands that are nops). */
872 unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
876 case FRV_OPERAND_A0 :
877 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_A);
879 case FRV_OPERAND_A1 :
880 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 1, 32, total_length, pc, & fields->f_A);
882 case FRV_OPERAND_ACC40SI :
883 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_ACC40Si);
885 case FRV_OPERAND_ACC40SK :
886 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_ACC40Sk);
888 case FRV_OPERAND_ACC40UI :
889 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_ACC40Ui);
891 case FRV_OPERAND_ACC40UK :
892 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_ACC40Uk);
894 case FRV_OPERAND_ACCGI :
895 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_ACCGi);
897 case FRV_OPERAND_ACCGK :
898 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_ACCGk);
900 case FRV_OPERAND_CCI :
901 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 3, 32, total_length, pc, & fields->f_CCi);
903 case FRV_OPERAND_CPRDOUBLEK :
904 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_CPRk);
906 case FRV_OPERAND_CPRI :
907 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_CPRi);
909 case FRV_OPERAND_CPRJ :
910 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_CPRj);
912 case FRV_OPERAND_CPRK :
913 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_CPRk);
915 case FRV_OPERAND_CRI :
916 length = extract_normal (cd, ex_info, insn_value, 0, 0, 14, 3, 32, total_length, pc, & fields->f_CRi);
918 case FRV_OPERAND_CRJ :
919 length = extract_normal (cd, ex_info, insn_value, 0, 0, 2, 3, 32, total_length, pc, & fields->f_CRj);
921 case FRV_OPERAND_CRJ_FLOAT :
922 length = extract_normal (cd, ex_info, insn_value, 0, 0, 26, 2, 32, total_length, pc, & fields->f_CRj_float);
924 case FRV_OPERAND_CRJ_INT :
927 length = extract_normal (cd, ex_info, insn_value, 0, 0, 26, 2, 32, total_length, pc, & value);
928 value = ((value) + (4));
929 fields->f_CRj_int = value;
932 case FRV_OPERAND_CRK :
933 length = extract_normal (cd, ex_info, insn_value, 0, 0, 27, 3, 32, total_length, pc, & fields->f_CRk);
935 case FRV_OPERAND_FCCI_1 :
936 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 2, 32, total_length, pc, & fields->f_FCCi_1);
938 case FRV_OPERAND_FCCI_2 :
939 length = extract_normal (cd, ex_info, insn_value, 0, 0, 26, 2, 32, total_length, pc, & fields->f_FCCi_2);
941 case FRV_OPERAND_FCCI_3 :
942 length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 2, 32, total_length, pc, & fields->f_FCCi_3);
944 case FRV_OPERAND_FCCK :
945 length = extract_normal (cd, ex_info, insn_value, 0, 0, 26, 2, 32, total_length, pc, & fields->f_FCCk);
947 case FRV_OPERAND_FRDOUBLEI :
948 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
950 case FRV_OPERAND_FRDOUBLEJ :
951 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
953 case FRV_OPERAND_FRDOUBLEK :
954 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
956 case FRV_OPERAND_FRI :
957 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
959 case FRV_OPERAND_FRINTI :
960 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
962 case FRV_OPERAND_FRINTIEVEN :
963 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
965 case FRV_OPERAND_FRINTJ :
966 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
968 case FRV_OPERAND_FRINTJEVEN :
969 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
971 case FRV_OPERAND_FRINTK :
972 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
974 case FRV_OPERAND_FRINTKEVEN :
975 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
977 case FRV_OPERAND_FRJ :
978 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
980 case FRV_OPERAND_FRK :
981 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
983 case FRV_OPERAND_FRKHI :
984 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
986 case FRV_OPERAND_FRKLO :
987 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
989 case FRV_OPERAND_GRDOUBLEK :
990 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_GRk);
992 case FRV_OPERAND_GRI :
993 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_GRi);
995 case FRV_OPERAND_GRJ :
996 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_GRj);
998 case FRV_OPERAND_GRK :
999 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_GRk);
1001 case FRV_OPERAND_GRKHI :
1002 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_GRk);
1004 case FRV_OPERAND_GRKLO :
1005 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_GRk);
1007 case FRV_OPERAND_ICCI_1 :
1008 length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 2, 32, total_length, pc, & fields->f_ICCi_1);
1010 case FRV_OPERAND_ICCI_2 :
1011 length = extract_normal (cd, ex_info, insn_value, 0, 0, 26, 2, 32, total_length, pc, & fields->f_ICCi_2);
1013 case FRV_OPERAND_ICCI_3 :
1014 length = extract_normal (cd, ex_info, insn_value, 0, 0, 1, 2, 32, total_length, pc, & fields->f_ICCi_3);
1016 case FRV_OPERAND_LI :
1017 length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 1, 32, total_length, pc, & fields->f_LI);
1019 case FRV_OPERAND_AE :
1020 length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 1, 32, total_length, pc, & fields->f_ae);
1022 case FRV_OPERAND_CCOND :
1023 length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 1, 32, total_length, pc, & fields->f_ccond);
1025 case FRV_OPERAND_COND :
1026 length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 1, 32, total_length, pc, & fields->f_cond);
1028 case FRV_OPERAND_D12 :
1029 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 11, 12, 32, total_length, pc, & fields->f_d12);
1031 case FRV_OPERAND_DEBUG :
1032 length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 1, 32, total_length, pc, & fields->f_debug);
1034 case FRV_OPERAND_EIR :
1035 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_eir);
1037 case FRV_OPERAND_HINT :
1038 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 2, 32, total_length, pc, & fields->f_hint);
1040 case FRV_OPERAND_HINT_NOT_TAKEN :
1041 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 2, 32, total_length, pc, & fields->f_hint);
1043 case FRV_OPERAND_HINT_TAKEN :
1044 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 2, 32, total_length, pc, & fields->f_hint);
1046 case FRV_OPERAND_LABEL16 :
1049 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, pc, & value);
1050 value = ((((value) << (2))) + (pc));
1051 fields->f_label16 = value;
1054 case FRV_OPERAND_LABEL24 :
1056 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 30, 6, 32, total_length, pc, & fields->f_labelH6);
1057 if (length <= 0) break;
1058 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 18, 32, total_length, pc, & fields->f_labelL18);
1059 if (length <= 0) break;
1061 FLD (f_label24) = ((((((((FLD (f_labelH6)) << (18))) | (FLD (f_labelL18)))) << (2))) + (pc));
1065 case FRV_OPERAND_LOCK :
1066 length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 1, 32, total_length, pc, & fields->f_lock);
1068 case FRV_OPERAND_PACK :
1069 length = extract_normal (cd, ex_info, insn_value, 0, 0, 31, 1, 32, total_length, pc, & fields->f_pack);
1071 case FRV_OPERAND_S10 :
1072 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 9, 10, 32, total_length, pc, & fields->f_s10);
1074 case FRV_OPERAND_S12 :
1075 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 11, 12, 32, total_length, pc, & fields->f_d12);
1077 case FRV_OPERAND_S16 :
1078 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 15, 16, 32, total_length, pc, & fields->f_s16);
1080 case FRV_OPERAND_S5 :
1081 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 4, 5, 32, total_length, pc, & fields->f_s5);
1083 case FRV_OPERAND_S6 :
1084 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 5, 6, 32, total_length, pc, & fields->f_s6);
1086 case FRV_OPERAND_S6_1 :
1087 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 11, 6, 32, total_length, pc, & fields->f_s6_1);
1089 case FRV_OPERAND_SLO16 :
1090 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 15, 16, 32, total_length, pc, & fields->f_s16);
1092 case FRV_OPERAND_SPR :
1094 length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_spr_h);
1095 if (length <= 0) break;
1096 length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_spr_l);
1097 if (length <= 0) break;
1099 FLD (f_spr) = ((((FLD (f_spr_h)) << (6))) | (FLD (f_spr_l)));
1103 case FRV_OPERAND_U12 :
1105 length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 17, 6, 32, total_length, pc, & fields->f_u12_h);
1106 if (length <= 0) break;
1107 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_u12_l);
1108 if (length <= 0) break;
1110 FLD (f_u12) = ((((FLD (f_u12_h)) << (6))) | (FLD (f_u12_l)));
1114 case FRV_OPERAND_U16 :
1115 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_u16);
1117 case FRV_OPERAND_U6 :
1118 length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_u6);
1120 case FRV_OPERAND_UHI16 :
1121 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_u16);
1123 case FRV_OPERAND_ULO16 :
1124 length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_u16);
1128 /* xgettext:c-format */
1129 fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
1137 cgen_insert_fn * const frv_cgen_insert_handlers[] =
1142 cgen_extract_fn * const frv_cgen_extract_handlers[] =
1144 extract_insn_normal,
1147 int frv_cgen_get_int_operand
1148 PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
1149 bfd_vma frv_cgen_get_vma_operand
1150 PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *));
1152 /* Getting values from cgen_fields is handled by a collection of functions.
1153 They are distinguished by the type of the VALUE argument they return.
1154 TODO: floating point, inlining support, remove cases where result type
1158 frv_cgen_get_int_operand (cd, opindex, fields)
1159 CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
1161 const CGEN_FIELDS * fields;
1167 case FRV_OPERAND_A0 :
1168 value = fields->f_A;
1170 case FRV_OPERAND_A1 :
1171 value = fields->f_A;
1173 case FRV_OPERAND_ACC40SI :
1174 value = fields->f_ACC40Si;
1176 case FRV_OPERAND_ACC40SK :
1177 value = fields->f_ACC40Sk;
1179 case FRV_OPERAND_ACC40UI :
1180 value = fields->f_ACC40Ui;
1182 case FRV_OPERAND_ACC40UK :
1183 value = fields->f_ACC40Uk;
1185 case FRV_OPERAND_ACCGI :
1186 value = fields->f_ACCGi;
1188 case FRV_OPERAND_ACCGK :
1189 value = fields->f_ACCGk;
1191 case FRV_OPERAND_CCI :
1192 value = fields->f_CCi;
1194 case FRV_OPERAND_CPRDOUBLEK :
1195 value = fields->f_CPRk;
1197 case FRV_OPERAND_CPRI :
1198 value = fields->f_CPRi;
1200 case FRV_OPERAND_CPRJ :
1201 value = fields->f_CPRj;
1203 case FRV_OPERAND_CPRK :
1204 value = fields->f_CPRk;
1206 case FRV_OPERAND_CRI :
1207 value = fields->f_CRi;
1209 case FRV_OPERAND_CRJ :
1210 value = fields->f_CRj;
1212 case FRV_OPERAND_CRJ_FLOAT :
1213 value = fields->f_CRj_float;
1215 case FRV_OPERAND_CRJ_INT :
1216 value = fields->f_CRj_int;
1218 case FRV_OPERAND_CRK :
1219 value = fields->f_CRk;
1221 case FRV_OPERAND_FCCI_1 :
1222 value = fields->f_FCCi_1;
1224 case FRV_OPERAND_FCCI_2 :
1225 value = fields->f_FCCi_2;
1227 case FRV_OPERAND_FCCI_3 :
1228 value = fields->f_FCCi_3;
1230 case FRV_OPERAND_FCCK :
1231 value = fields->f_FCCk;
1233 case FRV_OPERAND_FRDOUBLEI :
1234 value = fields->f_FRi;
1236 case FRV_OPERAND_FRDOUBLEJ :
1237 value = fields->f_FRj;
1239 case FRV_OPERAND_FRDOUBLEK :
1240 value = fields->f_FRk;
1242 case FRV_OPERAND_FRI :
1243 value = fields->f_FRi;
1245 case FRV_OPERAND_FRINTI :
1246 value = fields->f_FRi;
1248 case FRV_OPERAND_FRINTIEVEN :
1249 value = fields->f_FRi;
1251 case FRV_OPERAND_FRINTJ :
1252 value = fields->f_FRj;
1254 case FRV_OPERAND_FRINTJEVEN :
1255 value = fields->f_FRj;
1257 case FRV_OPERAND_FRINTK :
1258 value = fields->f_FRk;
1260 case FRV_OPERAND_FRINTKEVEN :
1261 value = fields->f_FRk;
1263 case FRV_OPERAND_FRJ :
1264 value = fields->f_FRj;
1266 case FRV_OPERAND_FRK :
1267 value = fields->f_FRk;
1269 case FRV_OPERAND_FRKHI :
1270 value = fields->f_FRk;
1272 case FRV_OPERAND_FRKLO :
1273 value = fields->f_FRk;
1275 case FRV_OPERAND_GRDOUBLEK :
1276 value = fields->f_GRk;
1278 case FRV_OPERAND_GRI :
1279 value = fields->f_GRi;
1281 case FRV_OPERAND_GRJ :
1282 value = fields->f_GRj;
1284 case FRV_OPERAND_GRK :
1285 value = fields->f_GRk;
1287 case FRV_OPERAND_GRKHI :
1288 value = fields->f_GRk;
1290 case FRV_OPERAND_GRKLO :
1291 value = fields->f_GRk;
1293 case FRV_OPERAND_ICCI_1 :
1294 value = fields->f_ICCi_1;
1296 case FRV_OPERAND_ICCI_2 :
1297 value = fields->f_ICCi_2;
1299 case FRV_OPERAND_ICCI_3 :
1300 value = fields->f_ICCi_3;
1302 case FRV_OPERAND_LI :
1303 value = fields->f_LI;
1305 case FRV_OPERAND_AE :
1306 value = fields->f_ae;
1308 case FRV_OPERAND_CCOND :
1309 value = fields->f_ccond;
1311 case FRV_OPERAND_COND :
1312 value = fields->f_cond;
1314 case FRV_OPERAND_D12 :
1315 value = fields->f_d12;
1317 case FRV_OPERAND_DEBUG :
1318 value = fields->f_debug;
1320 case FRV_OPERAND_EIR :
1321 value = fields->f_eir;
1323 case FRV_OPERAND_HINT :
1324 value = fields->f_hint;
1326 case FRV_OPERAND_HINT_NOT_TAKEN :
1327 value = fields->f_hint;
1329 case FRV_OPERAND_HINT_TAKEN :
1330 value = fields->f_hint;
1332 case FRV_OPERAND_LABEL16 :
1333 value = fields->f_label16;
1335 case FRV_OPERAND_LABEL24 :
1336 value = fields->f_label24;
1338 case FRV_OPERAND_LOCK :
1339 value = fields->f_lock;
1341 case FRV_OPERAND_PACK :
1342 value = fields->f_pack;
1344 case FRV_OPERAND_S10 :
1345 value = fields->f_s10;
1347 case FRV_OPERAND_S12 :
1348 value = fields->f_d12;
1350 case FRV_OPERAND_S16 :
1351 value = fields->f_s16;
1353 case FRV_OPERAND_S5 :
1354 value = fields->f_s5;
1356 case FRV_OPERAND_S6 :
1357 value = fields->f_s6;
1359 case FRV_OPERAND_S6_1 :
1360 value = fields->f_s6_1;
1362 case FRV_OPERAND_SLO16 :
1363 value = fields->f_s16;
1365 case FRV_OPERAND_SPR :
1366 value = fields->f_spr;
1368 case FRV_OPERAND_U12 :
1369 value = fields->f_u12;
1371 case FRV_OPERAND_U16 :
1372 value = fields->f_u16;
1374 case FRV_OPERAND_U6 :
1375 value = fields->f_u6;
1377 case FRV_OPERAND_UHI16 :
1378 value = fields->f_u16;
1380 case FRV_OPERAND_ULO16 :
1381 value = fields->f_u16;
1385 /* xgettext:c-format */
1386 fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
1395 frv_cgen_get_vma_operand (cd, opindex, fields)
1396 CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
1398 const CGEN_FIELDS * fields;
1404 case FRV_OPERAND_A0 :
1405 value = fields->f_A;
1407 case FRV_OPERAND_A1 :
1408 value = fields->f_A;
1410 case FRV_OPERAND_ACC40SI :
1411 value = fields->f_ACC40Si;
1413 case FRV_OPERAND_ACC40SK :
1414 value = fields->f_ACC40Sk;
1416 case FRV_OPERAND_ACC40UI :
1417 value = fields->f_ACC40Ui;
1419 case FRV_OPERAND_ACC40UK :
1420 value = fields->f_ACC40Uk;
1422 case FRV_OPERAND_ACCGI :
1423 value = fields->f_ACCGi;
1425 case FRV_OPERAND_ACCGK :
1426 value = fields->f_ACCGk;
1428 case FRV_OPERAND_CCI :
1429 value = fields->f_CCi;
1431 case FRV_OPERAND_CPRDOUBLEK :
1432 value = fields->f_CPRk;
1434 case FRV_OPERAND_CPRI :
1435 value = fields->f_CPRi;
1437 case FRV_OPERAND_CPRJ :
1438 value = fields->f_CPRj;
1440 case FRV_OPERAND_CPRK :
1441 value = fields->f_CPRk;
1443 case FRV_OPERAND_CRI :
1444 value = fields->f_CRi;
1446 case FRV_OPERAND_CRJ :
1447 value = fields->f_CRj;
1449 case FRV_OPERAND_CRJ_FLOAT :
1450 value = fields->f_CRj_float;
1452 case FRV_OPERAND_CRJ_INT :
1453 value = fields->f_CRj_int;
1455 case FRV_OPERAND_CRK :
1456 value = fields->f_CRk;
1458 case FRV_OPERAND_FCCI_1 :
1459 value = fields->f_FCCi_1;
1461 case FRV_OPERAND_FCCI_2 :
1462 value = fields->f_FCCi_2;
1464 case FRV_OPERAND_FCCI_3 :
1465 value = fields->f_FCCi_3;
1467 case FRV_OPERAND_FCCK :
1468 value = fields->f_FCCk;
1470 case FRV_OPERAND_FRDOUBLEI :
1471 value = fields->f_FRi;
1473 case FRV_OPERAND_FRDOUBLEJ :
1474 value = fields->f_FRj;
1476 case FRV_OPERAND_FRDOUBLEK :
1477 value = fields->f_FRk;
1479 case FRV_OPERAND_FRI :
1480 value = fields->f_FRi;
1482 case FRV_OPERAND_FRINTI :
1483 value = fields->f_FRi;
1485 case FRV_OPERAND_FRINTIEVEN :
1486 value = fields->f_FRi;
1488 case FRV_OPERAND_FRINTJ :
1489 value = fields->f_FRj;
1491 case FRV_OPERAND_FRINTJEVEN :
1492 value = fields->f_FRj;
1494 case FRV_OPERAND_FRINTK :
1495 value = fields->f_FRk;
1497 case FRV_OPERAND_FRINTKEVEN :
1498 value = fields->f_FRk;
1500 case FRV_OPERAND_FRJ :
1501 value = fields->f_FRj;
1503 case FRV_OPERAND_FRK :
1504 value = fields->f_FRk;
1506 case FRV_OPERAND_FRKHI :
1507 value = fields->f_FRk;
1509 case FRV_OPERAND_FRKLO :
1510 value = fields->f_FRk;
1512 case FRV_OPERAND_GRDOUBLEK :
1513 value = fields->f_GRk;
1515 case FRV_OPERAND_GRI :
1516 value = fields->f_GRi;
1518 case FRV_OPERAND_GRJ :
1519 value = fields->f_GRj;
1521 case FRV_OPERAND_GRK :
1522 value = fields->f_GRk;
1524 case FRV_OPERAND_GRKHI :
1525 value = fields->f_GRk;
1527 case FRV_OPERAND_GRKLO :
1528 value = fields->f_GRk;
1530 case FRV_OPERAND_ICCI_1 :
1531 value = fields->f_ICCi_1;
1533 case FRV_OPERAND_ICCI_2 :
1534 value = fields->f_ICCi_2;
1536 case FRV_OPERAND_ICCI_3 :
1537 value = fields->f_ICCi_3;
1539 case FRV_OPERAND_LI :
1540 value = fields->f_LI;
1542 case FRV_OPERAND_AE :
1543 value = fields->f_ae;
1545 case FRV_OPERAND_CCOND :
1546 value = fields->f_ccond;
1548 case FRV_OPERAND_COND :
1549 value = fields->f_cond;
1551 case FRV_OPERAND_D12 :
1552 value = fields->f_d12;
1554 case FRV_OPERAND_DEBUG :
1555 value = fields->f_debug;
1557 case FRV_OPERAND_EIR :
1558 value = fields->f_eir;
1560 case FRV_OPERAND_HINT :
1561 value = fields->f_hint;
1563 case FRV_OPERAND_HINT_NOT_TAKEN :
1564 value = fields->f_hint;
1566 case FRV_OPERAND_HINT_TAKEN :
1567 value = fields->f_hint;
1569 case FRV_OPERAND_LABEL16 :
1570 value = fields->f_label16;
1572 case FRV_OPERAND_LABEL24 :
1573 value = fields->f_label24;
1575 case FRV_OPERAND_LOCK :
1576 value = fields->f_lock;
1578 case FRV_OPERAND_PACK :
1579 value = fields->f_pack;
1581 case FRV_OPERAND_S10 :
1582 value = fields->f_s10;
1584 case FRV_OPERAND_S12 :
1585 value = fields->f_d12;
1587 case FRV_OPERAND_S16 :
1588 value = fields->f_s16;
1590 case FRV_OPERAND_S5 :
1591 value = fields->f_s5;
1593 case FRV_OPERAND_S6 :
1594 value = fields->f_s6;
1596 case FRV_OPERAND_S6_1 :
1597 value = fields->f_s6_1;
1599 case FRV_OPERAND_SLO16 :
1600 value = fields->f_s16;
1602 case FRV_OPERAND_SPR :
1603 value = fields->f_spr;
1605 case FRV_OPERAND_U12 :
1606 value = fields->f_u12;
1608 case FRV_OPERAND_U16 :
1609 value = fields->f_u16;
1611 case FRV_OPERAND_U6 :
1612 value = fields->f_u6;
1614 case FRV_OPERAND_UHI16 :
1615 value = fields->f_u16;
1617 case FRV_OPERAND_ULO16 :
1618 value = fields->f_u16;
1622 /* xgettext:c-format */
1623 fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
1631 void frv_cgen_set_int_operand
1632 PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, int));
1633 void frv_cgen_set_vma_operand
1634 PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma));
1636 /* Stuffing values in cgen_fields is handled by a collection of functions.
1637 They are distinguished by the type of the VALUE argument they accept.
1638 TODO: floating point, inlining support, remove cases where argument type
1642 frv_cgen_set_int_operand (cd, opindex, fields, value)
1643 CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
1645 CGEN_FIELDS * fields;
1650 case FRV_OPERAND_A0 :
1651 fields->f_A = value;
1653 case FRV_OPERAND_A1 :
1654 fields->f_A = value;
1656 case FRV_OPERAND_ACC40SI :
1657 fields->f_ACC40Si = value;
1659 case FRV_OPERAND_ACC40SK :
1660 fields->f_ACC40Sk = value;
1662 case FRV_OPERAND_ACC40UI :
1663 fields->f_ACC40Ui = value;
1665 case FRV_OPERAND_ACC40UK :
1666 fields->f_ACC40Uk = value;
1668 case FRV_OPERAND_ACCGI :
1669 fields->f_ACCGi = value;
1671 case FRV_OPERAND_ACCGK :
1672 fields->f_ACCGk = value;
1674 case FRV_OPERAND_CCI :
1675 fields->f_CCi = value;
1677 case FRV_OPERAND_CPRDOUBLEK :
1678 fields->f_CPRk = value;
1680 case FRV_OPERAND_CPRI :
1681 fields->f_CPRi = value;
1683 case FRV_OPERAND_CPRJ :
1684 fields->f_CPRj = value;
1686 case FRV_OPERAND_CPRK :
1687 fields->f_CPRk = value;
1689 case FRV_OPERAND_CRI :
1690 fields->f_CRi = value;
1692 case FRV_OPERAND_CRJ :
1693 fields->f_CRj = value;
1695 case FRV_OPERAND_CRJ_FLOAT :
1696 fields->f_CRj_float = value;
1698 case FRV_OPERAND_CRJ_INT :
1699 fields->f_CRj_int = value;
1701 case FRV_OPERAND_CRK :
1702 fields->f_CRk = value;
1704 case FRV_OPERAND_FCCI_1 :
1705 fields->f_FCCi_1 = value;
1707 case FRV_OPERAND_FCCI_2 :
1708 fields->f_FCCi_2 = value;
1710 case FRV_OPERAND_FCCI_3 :
1711 fields->f_FCCi_3 = value;
1713 case FRV_OPERAND_FCCK :
1714 fields->f_FCCk = value;
1716 case FRV_OPERAND_FRDOUBLEI :
1717 fields->f_FRi = value;
1719 case FRV_OPERAND_FRDOUBLEJ :
1720 fields->f_FRj = value;
1722 case FRV_OPERAND_FRDOUBLEK :
1723 fields->f_FRk = value;
1725 case FRV_OPERAND_FRI :
1726 fields->f_FRi = value;
1728 case FRV_OPERAND_FRINTI :
1729 fields->f_FRi = value;
1731 case FRV_OPERAND_FRINTIEVEN :
1732 fields->f_FRi = value;
1734 case FRV_OPERAND_FRINTJ :
1735 fields->f_FRj = value;
1737 case FRV_OPERAND_FRINTJEVEN :
1738 fields->f_FRj = value;
1740 case FRV_OPERAND_FRINTK :
1741 fields->f_FRk = value;
1743 case FRV_OPERAND_FRINTKEVEN :
1744 fields->f_FRk = value;
1746 case FRV_OPERAND_FRJ :
1747 fields->f_FRj = value;
1749 case FRV_OPERAND_FRK :
1750 fields->f_FRk = value;
1752 case FRV_OPERAND_FRKHI :
1753 fields->f_FRk = value;
1755 case FRV_OPERAND_FRKLO :
1756 fields->f_FRk = value;
1758 case FRV_OPERAND_GRDOUBLEK :
1759 fields->f_GRk = value;
1761 case FRV_OPERAND_GRI :
1762 fields->f_GRi = value;
1764 case FRV_OPERAND_GRJ :
1765 fields->f_GRj = value;
1767 case FRV_OPERAND_GRK :
1768 fields->f_GRk = value;
1770 case FRV_OPERAND_GRKHI :
1771 fields->f_GRk = value;
1773 case FRV_OPERAND_GRKLO :
1774 fields->f_GRk = value;
1776 case FRV_OPERAND_ICCI_1 :
1777 fields->f_ICCi_1 = value;
1779 case FRV_OPERAND_ICCI_2 :
1780 fields->f_ICCi_2 = value;
1782 case FRV_OPERAND_ICCI_3 :
1783 fields->f_ICCi_3 = value;
1785 case FRV_OPERAND_LI :
1786 fields->f_LI = value;
1788 case FRV_OPERAND_AE :
1789 fields->f_ae = value;
1791 case FRV_OPERAND_CCOND :
1792 fields->f_ccond = value;
1794 case FRV_OPERAND_COND :
1795 fields->f_cond = value;
1797 case FRV_OPERAND_D12 :
1798 fields->f_d12 = value;
1800 case FRV_OPERAND_DEBUG :
1801 fields->f_debug = value;
1803 case FRV_OPERAND_EIR :
1804 fields->f_eir = value;
1806 case FRV_OPERAND_HINT :
1807 fields->f_hint = value;
1809 case FRV_OPERAND_HINT_NOT_TAKEN :
1810 fields->f_hint = value;
1812 case FRV_OPERAND_HINT_TAKEN :
1813 fields->f_hint = value;
1815 case FRV_OPERAND_LABEL16 :
1816 fields->f_label16 = value;
1818 case FRV_OPERAND_LABEL24 :
1819 fields->f_label24 = value;
1821 case FRV_OPERAND_LOCK :
1822 fields->f_lock = value;
1824 case FRV_OPERAND_PACK :
1825 fields->f_pack = value;
1827 case FRV_OPERAND_S10 :
1828 fields->f_s10 = value;
1830 case FRV_OPERAND_S12 :
1831 fields->f_d12 = value;
1833 case FRV_OPERAND_S16 :
1834 fields->f_s16 = value;
1836 case FRV_OPERAND_S5 :
1837 fields->f_s5 = value;
1839 case FRV_OPERAND_S6 :
1840 fields->f_s6 = value;
1842 case FRV_OPERAND_S6_1 :
1843 fields->f_s6_1 = value;
1845 case FRV_OPERAND_SLO16 :
1846 fields->f_s16 = value;
1848 case FRV_OPERAND_SPR :
1849 fields->f_spr = value;
1851 case FRV_OPERAND_U12 :
1852 fields->f_u12 = value;
1854 case FRV_OPERAND_U16 :
1855 fields->f_u16 = value;
1857 case FRV_OPERAND_U6 :
1858 fields->f_u6 = value;
1860 case FRV_OPERAND_UHI16 :
1861 fields->f_u16 = value;
1863 case FRV_OPERAND_ULO16 :
1864 fields->f_u16 = value;
1868 /* xgettext:c-format */
1869 fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
1876 frv_cgen_set_vma_operand (cd, opindex, fields, value)
1877 CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
1879 CGEN_FIELDS * fields;
1884 case FRV_OPERAND_A0 :
1885 fields->f_A = value;
1887 case FRV_OPERAND_A1 :
1888 fields->f_A = value;
1890 case FRV_OPERAND_ACC40SI :
1891 fields->f_ACC40Si = value;
1893 case FRV_OPERAND_ACC40SK :
1894 fields->f_ACC40Sk = value;
1896 case FRV_OPERAND_ACC40UI :
1897 fields->f_ACC40Ui = value;
1899 case FRV_OPERAND_ACC40UK :
1900 fields->f_ACC40Uk = value;
1902 case FRV_OPERAND_ACCGI :
1903 fields->f_ACCGi = value;
1905 case FRV_OPERAND_ACCGK :
1906 fields->f_ACCGk = value;
1908 case FRV_OPERAND_CCI :
1909 fields->f_CCi = value;
1911 case FRV_OPERAND_CPRDOUBLEK :
1912 fields->f_CPRk = value;
1914 case FRV_OPERAND_CPRI :
1915 fields->f_CPRi = value;
1917 case FRV_OPERAND_CPRJ :
1918 fields->f_CPRj = value;
1920 case FRV_OPERAND_CPRK :
1921 fields->f_CPRk = value;
1923 case FRV_OPERAND_CRI :
1924 fields->f_CRi = value;
1926 case FRV_OPERAND_CRJ :
1927 fields->f_CRj = value;
1929 case FRV_OPERAND_CRJ_FLOAT :
1930 fields->f_CRj_float = value;
1932 case FRV_OPERAND_CRJ_INT :
1933 fields->f_CRj_int = value;
1935 case FRV_OPERAND_CRK :
1936 fields->f_CRk = value;
1938 case FRV_OPERAND_FCCI_1 :
1939 fields->f_FCCi_1 = value;
1941 case FRV_OPERAND_FCCI_2 :
1942 fields->f_FCCi_2 = value;
1944 case FRV_OPERAND_FCCI_3 :
1945 fields->f_FCCi_3 = value;
1947 case FRV_OPERAND_FCCK :
1948 fields->f_FCCk = value;
1950 case FRV_OPERAND_FRDOUBLEI :
1951 fields->f_FRi = value;
1953 case FRV_OPERAND_FRDOUBLEJ :
1954 fields->f_FRj = value;
1956 case FRV_OPERAND_FRDOUBLEK :
1957 fields->f_FRk = value;
1959 case FRV_OPERAND_FRI :
1960 fields->f_FRi = value;
1962 case FRV_OPERAND_FRINTI :
1963 fields->f_FRi = value;
1965 case FRV_OPERAND_FRINTIEVEN :
1966 fields->f_FRi = value;
1968 case FRV_OPERAND_FRINTJ :
1969 fields->f_FRj = value;
1971 case FRV_OPERAND_FRINTJEVEN :
1972 fields->f_FRj = value;
1974 case FRV_OPERAND_FRINTK :
1975 fields->f_FRk = value;
1977 case FRV_OPERAND_FRINTKEVEN :
1978 fields->f_FRk = value;
1980 case FRV_OPERAND_FRJ :
1981 fields->f_FRj = value;
1983 case FRV_OPERAND_FRK :
1984 fields->f_FRk = value;
1986 case FRV_OPERAND_FRKHI :
1987 fields->f_FRk = value;
1989 case FRV_OPERAND_FRKLO :
1990 fields->f_FRk = value;
1992 case FRV_OPERAND_GRDOUBLEK :
1993 fields->f_GRk = value;
1995 case FRV_OPERAND_GRI :
1996 fields->f_GRi = value;
1998 case FRV_OPERAND_GRJ :
1999 fields->f_GRj = value;
2001 case FRV_OPERAND_GRK :
2002 fields->f_GRk = value;
2004 case FRV_OPERAND_GRKHI :
2005 fields->f_GRk = value;
2007 case FRV_OPERAND_GRKLO :
2008 fields->f_GRk = value;
2010 case FRV_OPERAND_ICCI_1 :
2011 fields->f_ICCi_1 = value;
2013 case FRV_OPERAND_ICCI_2 :
2014 fields->f_ICCi_2 = value;
2016 case FRV_OPERAND_ICCI_3 :
2017 fields->f_ICCi_3 = value;
2019 case FRV_OPERAND_LI :
2020 fields->f_LI = value;
2022 case FRV_OPERAND_AE :
2023 fields->f_ae = value;
2025 case FRV_OPERAND_CCOND :
2026 fields->f_ccond = value;
2028 case FRV_OPERAND_COND :
2029 fields->f_cond = value;
2031 case FRV_OPERAND_D12 :
2032 fields->f_d12 = value;
2034 case FRV_OPERAND_DEBUG :
2035 fields->f_debug = value;
2037 case FRV_OPERAND_EIR :
2038 fields->f_eir = value;
2040 case FRV_OPERAND_HINT :
2041 fields->f_hint = value;
2043 case FRV_OPERAND_HINT_NOT_TAKEN :
2044 fields->f_hint = value;
2046 case FRV_OPERAND_HINT_TAKEN :
2047 fields->f_hint = value;
2049 case FRV_OPERAND_LABEL16 :
2050 fields->f_label16 = value;
2052 case FRV_OPERAND_LABEL24 :
2053 fields->f_label24 = value;
2055 case FRV_OPERAND_LOCK :
2056 fields->f_lock = value;
2058 case FRV_OPERAND_PACK :
2059 fields->f_pack = value;
2061 case FRV_OPERAND_S10 :
2062 fields->f_s10 = value;
2064 case FRV_OPERAND_S12 :
2065 fields->f_d12 = value;
2067 case FRV_OPERAND_S16 :
2068 fields->f_s16 = value;
2070 case FRV_OPERAND_S5 :
2071 fields->f_s5 = value;
2073 case FRV_OPERAND_S6 :
2074 fields->f_s6 = value;
2076 case FRV_OPERAND_S6_1 :
2077 fields->f_s6_1 = value;
2079 case FRV_OPERAND_SLO16 :
2080 fields->f_s16 = value;
2082 case FRV_OPERAND_SPR :
2083 fields->f_spr = value;
2085 case FRV_OPERAND_U12 :
2086 fields->f_u12 = value;
2088 case FRV_OPERAND_U16 :
2089 fields->f_u16 = value;
2091 case FRV_OPERAND_U6 :
2092 fields->f_u6 = value;
2094 case FRV_OPERAND_UHI16 :
2095 fields->f_u16 = value;
2097 case FRV_OPERAND_ULO16 :
2098 fields->f_u16 = value;
2102 /* xgettext:c-format */
2103 fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
2109 /* Function to call before using the instruction builder tables. */
2112 frv_cgen_init_ibld_table (cd)
2115 cd->insert_handlers = & frv_cgen_insert_handlers[0];
2116 cd->extract_handlers = & frv_cgen_extract_handlers[0];
2118 cd->insert_operand = frv_cgen_insert_operand;
2119 cd->extract_operand = frv_cgen_extract_operand;
2121 cd->get_int_operand = frv_cgen_get_int_operand;
2122 cd->set_int_operand = frv_cgen_set_int_operand;
2123 cd->get_vma_operand = frv_cgen_get_vma_operand;
2124 cd->set_vma_operand = frv_cgen_set_vma_operand;