Import of readline 4.3.
[deliverable/binutils-gdb.git] / opcodes / v850-opc.c
index 874db1b6ee980ff4aadb91ddc0e266a848fd3986..94969ac48f2cbcb2f49059355c24c6bfa3366dee 100644 (file)
@@ -1,5 +1,5 @@
 /* Assemble V850 instructions.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -34,6 +34,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* two-word opcodes */
 #define two(x,y)       ((unsigned int) (x) | ((unsigned int) (y) << 16))
 
+static long unsigned insert_d9      PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d9     PARAMS ((long unsigned, int *));
+static long unsigned insert_d22     PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d22    PARAMS ((long unsigned, int *));
+static long unsigned insert_d16_15  PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d16_15 PARAMS ((long unsigned, int *));
+static long unsigned insert_d8_7    PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d8_7   PARAMS ((long unsigned, int *));
+static long unsigned insert_d8_6    PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d8_6   PARAMS ((long unsigned, int *));
+static long unsigned insert_d5_4    PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d5_4   PARAMS ((long unsigned, int *));
+static long unsigned insert_d16_16  PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_d16_16 PARAMS ((long unsigned, int *));
+static long unsigned insert_i9      PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_i9     PARAMS ((long unsigned, int *));
+static long unsigned insert_u9      PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_u9     PARAMS ((long unsigned, int *));
+static long unsigned insert_spe     PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_spe    PARAMS ((long unsigned, int *));
+static long unsigned insert_i5div   PARAMS ((long unsigned, long, const char **));
+static long unsigned extract_i5div  PARAMS ((long unsigned, int *));
 
 \f
 /* The functions used to insert and extract complicated operands.  */
@@ -71,7 +93,7 @@ insert_d9 (insn, value, errmsg)
 static unsigned long
 extract_d9 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   unsigned long ret = ((insn & 0xf800) >> 7) | ((insn & 0x0070) >> 3);
 
@@ -103,7 +125,7 @@ insert_d22 (insn, value, errmsg)
 static unsigned long
 extract_d22 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   signed long ret = ((insn & 0xfffe0000) >> 16) | ((insn & 0x3f) << 16);
 
@@ -132,7 +154,7 @@ insert_d16_15 (insn, value, errmsg)
 static unsigned long
 extract_d16_15 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   signed long ret = (insn & 0xfffe0000);
 
@@ -163,7 +185,7 @@ insert_d8_7 (insn, value, errmsg)
 static unsigned long
 extract_d8_7 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   unsigned long ret = (insn & 0x7f);
 
@@ -194,7 +216,7 @@ insert_d8_6 (insn, value, errmsg)
 static unsigned long
 extract_d8_6 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   unsigned long ret = (insn & 0x7e);
 
@@ -225,7 +247,7 @@ insert_d5_4 (insn, value, errmsg)
 static unsigned long
 extract_d5_4 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   unsigned long ret = (insn & 0x0f);
 
@@ -247,7 +269,7 @@ insert_d16_16 (insn, value, errmsg)
 static unsigned long
 extract_d16_16 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   signed long ret = insn & 0xfffe0000;
 
@@ -273,7 +295,7 @@ insert_i9 (insn, value, errmsg)
 static unsigned long
 extract_i9 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   signed long ret = insn & 0x003c0000;
 
@@ -286,11 +308,12 @@ extract_i9 (insn, invalid)
 }
 
 static unsigned long
-insert_u9 (insn, value, errmsg)
+insert_u9 (insn, v, errmsg)
      unsigned long insn;
-     unsigned long value;
+     long v;
      const char ** errmsg;
 {
+  unsigned long value = (unsigned long) v;
   if (value > 0x1ff)
     * errmsg = _(immediate_out_of_range);
 
@@ -300,7 +323,7 @@ insert_u9 (insn, value, errmsg)
 static unsigned long
 extract_u9 (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   unsigned long ret = insn & 0x003c0000;
 
@@ -312,11 +335,13 @@ extract_u9 (insn, invalid)
 }
 
 static unsigned long
-insert_spe (insn, value, errmsg)
+insert_spe (insn, v, errmsg)
      unsigned long insn;
-     unsigned long value;
+     long v;
      const char ** errmsg;
 {
+  unsigned long value = (unsigned long) v;
+
   if (value != 3)
     * errmsg = _("invalid register for stack adjustment");
 
@@ -325,18 +350,20 @@ insert_spe (insn, value, errmsg)
 
 static unsigned long
 extract_spe (insn, invalid)
-     unsigned long insn;
-     int *         invalid;
+     unsigned long insn ATTRIBUTE_UNUSED;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   return 3;
 }
 
 static unsigned long
-insert_i5div (insn, value, errmsg)
+insert_i5div (insn, v, errmsg)
      unsigned long insn;
-     unsigned long value;
+     long v;
      const char ** errmsg;
 {
+  unsigned long value = (unsigned long) v;
+
   if (value > 0x1ff)
     {
       if (value & 1)
@@ -355,7 +382,7 @@ insert_i5div (insn, value, errmsg)
 static unsigned long
 extract_i5div (insn, invalid)
      unsigned long insn;
-     int *         invalid;
+     int *         invalid ATTRIBUTE_UNUSED;
 {
   unsigned long ret = insn & 0x3c0000;
 
@@ -369,7 +396,7 @@ extract_i5div (insn, invalid)
 \f
 /* Warning: code in gas/config/tc-v850.c examines the contents of this array.
    If you change any of the values here, be sure to look for side effects in
-   that code. */
+   that code.  */
 const struct v850_operand v850_operands[] =
 {
 #define UNUSED 0
@@ -581,17 +608,13 @@ const struct v850_opcode v850_opcodes[] =
 { "jmp",       one (0x0060),           one (0xffe0),           {R1},                   1, PROCESSOR_ALL },
   
 /* load/store instructions */
-{ "sld.bu",    one (0x0300),           one (0x0780),           {D7,   EP,   R2_NOTR0}, 1, PROCESSOR_V850EA },
 { "sld.bu",     one (0x0060),          one (0x07f0),           {D4,   EP,   R2_NOTR0}, 1, PROCESSOR_V850E },
 
-{ "sld.hu",    one (0x0400),           one (0x0780),           {D8_7, EP,   R2_NOTR0}, 1, PROCESSOR_V850EA },
 { "sld.hu",     one (0x0070),          one (0x07f0),           {D5_4, EP,   R2_NOTR0}, 1, PROCESSOR_V850E },
 
-{ "sld.b",      one (0x0060),          one (0x07f0),           {D4,   EP,   R2},       1, PROCESSOR_V850EA },
 { "sld.b",     one (0x0300),           one (0x0780),           {D7,   EP,   R2},       1, PROCESSOR_V850E },
 { "sld.b",     one (0x0300),           one (0x0780),           {D7,   EP,   R2},       1, PROCESSOR_V850 },
 
-{ "sld.h",      one (0x0070),          one (0x07f0),           {D5_4, EP,   R2},       1, PROCESSOR_V850EA },
 { "sld.h",     one (0x0400),           one (0x0780),           {D8_7, EP,   R2},       1, PROCESSOR_V850E },
 { "sld.h",     one (0x0400),           one (0x0780),           {D8_7, EP,   R2},       1, PROCESSOR_V850 },
 { "sld.w",     one (0x0500),           one (0x0781),           {D8_6, EP,   R2},       1, PROCESSOR_ALL },
@@ -599,10 +622,6 @@ const struct v850_opcode v850_opcodes[] =
 { "sst.h",     one (0x0480),           one (0x0780),           {R2,   D8_7, EP},       2, PROCESSOR_ALL },
 { "sst.w",     one (0x0501),           one (0x0781),           {R2,   D8_6, EP},       2, PROCESSOR_ALL },
 
-{ "pushml",    two (0x07e0, 0x0001),   two (0xfff0, 0x0007),   {LIST18_L},             0, PROCESSOR_V850EA },
-{ "pushmh",    two (0x07e0, 0x0003),   two (0xfff0, 0x0007),   {LIST18_H},             0, PROCESSOR_V850EA },
-{ "popml",     two (0x07f0, 0x0001),   two (0xfff0, 0x0007),   {LIST18_L},             0, PROCESSOR_V850EA },
-{ "popmh",     two (0x07f0, 0x0003),   two (0xfff0, 0x0007),   {LIST18_H},             0, PROCESSOR_V850EA },
 { "prepare",    two (0x0780, 0x0003),  two (0xffc0, 0x001f),   {LIST12, IMM5, SP},     0, PROCESSOR_NOT_V850 },
 { "prepare",    two (0x0780, 0x000b),  two (0xffc0, 0x001f),   {LIST12, IMM5, IMM16},  0, PROCESSOR_NOT_V850 },
 { "prepare",    two (0x0780, 0x0013),  two (0xffc0, 0x001f),   {LIST12, IMM5, IMM16},  0, PROCESSOR_NOT_V850 },
@@ -650,15 +669,6 @@ const struct v850_opcode v850_opcodes[] =
 { "divh",      two (0x07e0, 0x0280),   two (0x07e0, 0x07ff),   {R1, R2, R3},           0, PROCESSOR_NOT_V850 },
 { "divh",      OP  (0x02),             OP_MASK,                {R1, R2_NOTR0},         0, PROCESSOR_ALL },
   
-{ "divhn",     two (0x07e0, 0x0280),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "divhun",    two (0x07e0, 0x0282),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "divn",      two (0x07e0, 0x02c0),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "divun",     two (0x07e0, 0x02c2),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "sdivhn",    two (0x07e0, 0x0180),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "sdivhun",   two (0x07e0, 0x0182),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "sdivn",     two (0x07e0, 0x01c0),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-{ "sdivun",    two (0x07e0, 0x01c2),   two (0x07e0, 0x07c3),   {I5DIV, R1, R2, R3},    0, PROCESSOR_V850EA },
-  
 { "nop",       one (0x00),             one (0xffff),           {0},                    0, PROCESSOR_ALL },
 { "mov",       OP  (0x10),             OP_MASK,                {I5, R2_NOTR0},         0, PROCESSOR_ALL },
 { "mov",       one (0x0620),           one (0xffe0),           {IMM32, R1_NOTR0},      0, PROCESSOR_NOT_V850 },
This page took 0.032549 seconds and 4 git commands to generate.