/[gcl]/gcl/binutils/bfd/cpu-ia64-opc.c
ViewVC logotype

Diff of /gcl/binutils/bfd/cpu-ia64-opc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:35:01 2002 UTC revision 1.1.1.1.20.1 by camm, Fri Sep 30 02:08:56 2005 UTC
# Line 1  Line 1 
1  /* Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.  /* Copyright 1998, 1999, 2000, 2001, 2002, 2003
2       Free Software Foundation, Inc.
3     Contributed by David Mosberger-Tang <davidm@hpl.hp.com>     Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
4    
5  This file is part of BFD, the Binary File Descriptor library.  This file is part of BFD, the Binary File Descriptor library.
# Line 161  static const char* Line 162  static const char*
162  ext_imms_scaled (const struct ia64_operand *self, ia64_insn code,  ext_imms_scaled (const struct ia64_operand *self, ia64_insn code,
163                   ia64_insn *valuep, int scale)                   ia64_insn *valuep, int scale)
164  {  {
165    int i, bits = 0, total = 0, shift;    int i, bits = 0, total = 0;
166    BFD_HOST_64_BIT val = 0;    BFD_HOST_64_BIT val = 0, sign;
167    
168    for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i)    for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i)
169      {      {
# Line 172  ext_imms_scaled (const struct ia64_opera Line 173  ext_imms_scaled (const struct ia64_opera
173        total += bits;        total += bits;
174      }      }
175    /* sign extend: */    /* sign extend: */
176    shift = 8*sizeof (val) - total;    sign = (BFD_HOST_64_BIT) 1 << (total - 1);
177    val = (val << shift) >> shift;    val = (val ^ sign) - sign;
178    
179    *valuep = (val << scale);    *valuep = (val << scale);
180    return 0;    return 0;
# Line 188  ins_imms (const struct ia64_operand *sel Line 189  ins_imms (const struct ia64_operand *sel
189  static const char*  static const char*
190  ins_immsu4 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code)  ins_immsu4 (const struct ia64_operand *self, ia64_insn value, ia64_insn *code)
191  {  {
192    if (value == (BFD_HOST_U_64_BIT) 0x100000000)    value = ((value & 0xffffffff) ^ 0x80000000) - 0x80000000;
     value = 0;  
   else  
     value = (((BFD_HOST_64_BIT)value << 32) >> 32);  
193    
194    return ins_imms_scaled (self, value, code, 0);    return ins_imms_scaled (self, value, code, 0);
195  }  }
# Line 213  static const char* Line 211  static const char*
211  ins_immsm1u4 (const struct ia64_operand *self, ia64_insn value,  ins_immsm1u4 (const struct ia64_operand *self, ia64_insn value,
212                ia64_insn *code)                ia64_insn *code)
213  {  {
214    if (value == (BFD_HOST_U_64_BIT) 0x100000000)    value = ((value & 0xffffffff) ^ 0x80000000) - 0x80000000;
     value = 0;  
   else  
     value = (((BFD_HOST_64_BIT)value << 32) >> 32);  
215    
216    --value;    --value;
217    return ins_imms_scaled (self, value, code, 0);    return ins_imms_scaled (self, value, code, 0);
# Line 418  const struct ia64_operand elf64_ia64_ope Line 413  const struct ia64_operand elf64_ia64_ope
413    {    {
414      /* constants: */      /* constants: */
415      { CST, ins_const, ext_const, "NIL",         {{ 0, 0}}, 0, "<none>" },      { CST, ins_const, ext_const, "NIL",         {{ 0, 0}}, 0, "<none>" },
416        { CST, ins_const, ext_const, "ar.csd",      {{ 0, 0}}, 0, "ar.csd" },
417      { CST, ins_const, ext_const, "ar.ccv",      {{ 0, 0}}, 0, "ar.ccv" },      { CST, ins_const, ext_const, "ar.ccv",      {{ 0, 0}}, 0, "ar.ccv" },
418      { CST, ins_const, ext_const, "ar.pfs",      {{ 0, 0}}, 0, "ar.pfs" },      { CST, ins_const, ext_const, "ar.pfs",      {{ 0, 0}}, 0, "ar.pfs" },
419      { CST, ins_const, ext_const, "1",           {{ 0, 0}}, 0, "1" },      { CST, ins_const, ext_const, "1",           {{ 0, 0}}, 0, "1" },
# Line 586  const struct ia64_operand elf64_ia64_ope Line 582  const struct ia64_operand elf64_ia64_ope
582        "a branch target" },        "a branch target" },
583      { REL, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0,                  /* TGT64  */      { REL, ins_rsvd, ext_rsvd, 0, {{0, 0}}, 0,                  /* TGT64  */
584        "a branch target" },        "a branch target" },
585    
586        { ABS, ins_const, ext_const, 0, {{0, 0}}, 0,                /* LDXMOV */
587          "ldxmov target" },
588    };    };

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.20.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26