Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/opcodes/v850-opc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* Assemble V850 instructions.
    2    Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
     2   Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
    33
    44This program is free software; you can redistribute it and/or modify
     
    3535#define two(x,y)        ((unsigned int) (x) | ((unsigned int) (y) << 16))
    3636
     37static long unsigned insert_d9      PARAMS ((long unsigned, long, const char **));
     38static long unsigned extract_d9     PARAMS ((long unsigned, int *));
     39static long unsigned insert_d22     PARAMS ((long unsigned, long, const char **));
     40static long unsigned extract_d22    PARAMS ((long unsigned, int *));
     41static long unsigned insert_d16_15  PARAMS ((long unsigned, long, const char **));
     42static long unsigned extract_d16_15 PARAMS ((long unsigned, int *));
     43static long unsigned insert_d8_7    PARAMS ((long unsigned, long, const char **));
     44static long unsigned extract_d8_7   PARAMS ((long unsigned, int *));
     45static long unsigned insert_d8_6    PARAMS ((long unsigned, long, const char **));
     46static long unsigned extract_d8_6   PARAMS ((long unsigned, int *));
     47static long unsigned insert_d5_4    PARAMS ((long unsigned, long, const char **));
     48static long unsigned extract_d5_4   PARAMS ((long unsigned, int *));
     49static long unsigned insert_d16_16  PARAMS ((long unsigned, long, const char **));
     50static long unsigned extract_d16_16 PARAMS ((long unsigned, int *));
     51static long unsigned insert_i9      PARAMS ((long unsigned, long, const char **));
     52static long unsigned extract_i9     PARAMS ((long unsigned, int *));
     53static long unsigned insert_u9      PARAMS ((long unsigned, long, const char **));
     54static long unsigned extract_u9     PARAMS ((long unsigned, int *));
     55static long unsigned insert_spe     PARAMS ((long unsigned, long, const char **));
     56static long unsigned extract_spe    PARAMS ((long unsigned, int *));
     57static long unsigned insert_i5div   PARAMS ((long unsigned, long, const char **));
     58static long unsigned extract_i5div  PARAMS ((long unsigned, int *));
    3759
    3860
     
    7395extract_d9 (insn, invalid)
    7496     unsigned long insn;
    75      int *         invalid;
     97     int *         invalid ATTRIBUTE_UNUSED;
    7698{
    7799  unsigned long ret = ((insn & 0xf800) >> 7) | ((insn & 0x0070) >> 3);
     
    105127extract_d22 (insn, invalid)
    106128     unsigned long insn;
    107      int *         invalid;
     129     int *         invalid ATTRIBUTE_UNUSED;
    108130{
    109131  signed long ret = ((insn & 0xfffe0000) >> 16) | ((insn & 0x3f) << 16);
     
    134156extract_d16_15 (insn, invalid)
    135157     unsigned long insn;
    136      int *         invalid;
     158     int *         invalid ATTRIBUTE_UNUSED;
    137159{
    138160  signed long ret = (insn & 0xfffe0000);
     
    165187extract_d8_7 (insn, invalid)
    166188     unsigned long insn;
    167      int *         invalid;
     189     int *         invalid ATTRIBUTE_UNUSED;
    168190{
    169191  unsigned long ret = (insn & 0x7f);
     
    196218extract_d8_6 (insn, invalid)
    197219     unsigned long insn;
    198      int *         invalid;
     220     int *         invalid ATTRIBUTE_UNUSED;
    199221{
    200222  unsigned long ret = (insn & 0x7e);
     
    227249extract_d5_4 (insn, invalid)
    228250     unsigned long insn;
    229      int *         invalid;
     251     int *         invalid ATTRIBUTE_UNUSED;
    230252{
    231253  unsigned long ret = (insn & 0x0f);
     
    249271extract_d16_16 (insn, invalid)
    250272     unsigned long insn;
    251      int *         invalid;
     273     int *         invalid ATTRIBUTE_UNUSED;
    252274{
    253275  signed long ret = insn & 0xfffe0000;
     
    275297extract_i9 (insn, invalid)
    276298     unsigned long insn;
    277      int *         invalid;
     299     int *         invalid ATTRIBUTE_UNUSED;
    278300{
    279301  signed long ret = insn & 0x003c0000;
     
    288310
    289311static unsigned long
    290 insert_u9 (insn, value, errmsg)
    291      unsigned long insn;
    292      unsigned long value;
    293      const char ** errmsg;
    294 {
     312insert_u9 (insn, v, errmsg)
     313     unsigned long insn;
     314     long v;
     315     const char ** errmsg;
     316{
     317  unsigned long value = (unsigned long) v;
    295318  if (value > 0x1ff)
    296319    * errmsg = _(immediate_out_of_range);
     
    302325extract_u9 (insn, invalid)
    303326     unsigned long insn;
    304      int *         invalid;
     327     int *         invalid ATTRIBUTE_UNUSED;
    305328{
    306329  unsigned long ret = insn & 0x003c0000;
     
    314337
    315338static unsigned long
    316 insert_spe (insn, value, errmsg)
    317      unsigned long insn;
    318      unsigned long value;
    319      const char ** errmsg;
    320 {
     339insert_spe (insn, v, errmsg)
     340     unsigned long insn;
     341     long v;
     342     const char ** errmsg;
     343{
     344  unsigned long value = (unsigned long) v;
     345
    321346  if (value != 3)
    322347    * errmsg = _("invalid register for stack adjustment");
     
    327352static unsigned long
    328353extract_spe (insn, invalid)
    329      unsigned long insn;
    330      int *         invalid;
     354     unsigned long insn ATTRIBUTE_UNUSED;
     355     int *         invalid ATTRIBUTE_UNUSED;
    331356{
    332357  return 3;
     
    334359
    335360static unsigned long
    336 insert_i5div (insn, value, errmsg)
    337      unsigned long insn;
    338      unsigned long value;
    339      const char ** errmsg;
    340 {
     361insert_i5div (insn, v, errmsg)
     362     unsigned long insn;
     363     long v;
     364     const char ** errmsg;
     365{
     366  unsigned long value = (unsigned long) v;
     367
    341368  if (value > 0x1ff)
    342369    {
     
    357384extract_i5div (insn, invalid)
    358385     unsigned long insn;
    359      int *         invalid;
     386     int *         invalid ATTRIBUTE_UNUSED;
    360387{
    361388  unsigned long ret = insn & 0x3c0000;
     
    372399/* Warning: code in gas/config/tc-v850.c examines the contents of this array.
    373400   If you change any of the values here, be sure to look for side effects in
    374    that code. */
     401   that code.  */
    375402const struct v850_operand v850_operands[] =
    376403{
     
    586613 
    587614/* load/store instructions */
    588 { "sld.bu",     one (0x0300),           one (0x0780),           {D7,   EP,   R2_NOTR0}, 1, PROCESSOR_V850EA },
    589615{ "sld.bu",     one (0x0060),           one (0x07f0),           {D4,   EP,   R2_NOTR0}, 1, PROCESSOR_V850E },
    590616
    591 { "sld.hu",     one (0x0400),           one (0x0780),           {D8_7, EP,   R2_NOTR0}, 1, PROCESSOR_V850EA },
    592617{ "sld.hu",     one (0x0070),           one (0x07f0),           {D5_4, EP,   R2_NOTR0}, 1, PROCESSOR_V850E },
    593618
    594 { "sld.b",      one (0x0060),           one (0x07f0),           {D4,   EP,   R2},       1, PROCESSOR_V850EA },
    595619{ "sld.b",      one (0x0300),           one (0x0780),           {D7,   EP,   R2},       1, PROCESSOR_V850E },
    596620{ "sld.b",      one (0x0300),           one (0x0780),           {D7,   EP,   R2},       1, PROCESSOR_V850 },
    597621
    598 { "sld.h",      one (0x0070),           one (0x07f0),           {D5_4, EP,   R2},       1, PROCESSOR_V850EA },
    599622{ "sld.h",      one (0x0400),           one (0x0780),           {D8_7, EP,   R2},       1, PROCESSOR_V850E },
    600623{ "sld.h",      one (0x0400),           one (0x0780),           {D8_7, EP,   R2},       1, PROCESSOR_V850 },
     
    604627{ "sst.w",      one (0x0501),           one (0x0781),           {R2,   D8_6, EP},       2, PROCESSOR_ALL },
    605628
    606 { "pushml",     two (0x07e0, 0x0001),   two (0xfff0, 0x0007),   {LIST18_L},             0, PROCESSOR_V850EA },
    607 { "pushmh",     two (0x07e0, 0x0003),   two (0xfff0, 0x0007),   {LIST18_H},             0, PROCESSOR_V850EA },
    608 { "popml",      two (0x07f0, 0x0001),   two (0xfff0, 0x0007),   {LIST18_L},             0, PROCESSOR_V850EA },
    609 { "popmh",      two (0x07f0, 0x0003),   two (0xfff0, 0x0007),   {LIST18_H},             0, PROCESSOR_V850EA },
    610629{ "prepare",    two (0x0780, 0x0003),   two (0xffc0, 0x001f),   {LIST12, IMM5, SP},     0, PROCESSOR_NOT_V850 },
    611630{ "prepare",    two (0x0780, 0x000b),   two (0xffc0, 0x001f),   {LIST12, IMM5, IMM16},  0, PROCESSOR_NOT_V850 },
     
    654673{ "divh",       two (0x07e0, 0x0280),   two (0x07e0, 0x07ff),   {R1, R2, R3},           0, PROCESSOR_NOT_V850 },
    655674{ "divh",       OP  (0x02),             OP_MASK,                {R1, R2_NOTR0},         0, PROCESSOR_ALL },
    656  
    657 { "divhn",      two (0x07e0, 0x0280),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    658 { "divhun",     two (0x07e0, 0x0282),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    659 { "divn",       two (0x07e0, 0x02c0),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    660 { "divun",      two (0x07e0, 0x02c2),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    661 { "sdivhn",     two (0x07e0, 0x0180),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    662 { "sdivhun",    two (0x07e0, 0x0182),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    663 { "sdivn",      two (0x07e0, 0x01c0),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    664 { "sdivun",     two (0x07e0, 0x01c2),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
    665675 
    666676{ "nop",        one (0x00),             one (0xffff),           {0},                    0, PROCESSOR_ALL },
Note: See TracChangeset for help on using the changeset viewer.