Add AMD SSE5 support
[deliverable/binutils-gdb.git] / gas / config / tc-crx.c
index 3f0c767fbc22eb98d0e9d1d7dd1d701664d66bcb..08656f976857a2f6a90dbbc94b1d231ab0e58d0d 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-crx.c -- Assembler code for the CRX CPU core.
-   Copyright 2004 Free Software Foundation, Inc.
+   Copyright 2004, 2007 Free Software Foundation, Inc.
 
    Contributed by Tomer Levi, NSC, Israel.
    Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
@@ -9,7 +9,7 @@
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    GAS is distributed in the hope that it will be useful,
@@ -268,7 +268,8 @@ reset_vars (char *op)
   memset (& output_opcode, '\0', sizeof (output_opcode));
 
   /* Save a copy of the original OP (used in error messages).  */
-  strcpy (ins_parse, op);
+  strncpy (ins_parse, op, sizeof ins_parse - 1);
+  ins_parse [sizeof ins_parse - 1] = 0;
 }
 
 /* This macro decides whether a particular reloc is an entry in a
@@ -1270,7 +1271,7 @@ print_constant (int nbits, int shift, argument *arg)
       /* When instruction size is 3 and 'shift' is 16, a 16-bit constant is 
         always filling the upper part of output_opcode[1]. If we mistakenly 
         write it to output_opcode[0], the constant prefix (that is, 'match')
-        will be overriden.
+        will be overridden.
                 0         1         2         3
            +---------+---------+---------+---------+
            | 'match' |         | X X X X |         |
@@ -1377,6 +1378,12 @@ check_range (long *num, int bits, int unsigned flags, int update)
   long upper_64kb = 0xFFFF0000;
   long value = *num;
 
+  /* For hosts witah longs bigger than 32-bits make sure that the top 
+     bits of a 32-bit negative value read in by the parser are set,
+     so that the correct comparisons are made.  */
+  if (value & 0x80000000)
+    value |= (-1L << 31);
+
   /* Verify operand value is even.  */
   if (flags & OP_EVEN)
     {
This page took 0.023828 seconds and 4 git commands to generate.