OLD | NEW |
1 /* Assemble V850 instructions. | 1 /* Assemble V850 instructions. |
2 Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2010 | 2 Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2010, |
3 Free Software Foundation, Inc. | 3 2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of the GNU opcodes library. | 5 This file is part of the GNU opcodes library. |
6 | 6 |
7 This library is free software; you can redistribute it and/or modify | 7 This library is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3, or (at your option) | 9 the Free Software Foundation; either version 3, or (at your option) |
10 any later version. | 10 any later version. |
11 | 11 |
12 It is distributed in the hope that it will be useful, but WITHOUT | 12 It is distributed in the hope that it will be useful, but WITHOUT |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | 14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
15 License for more details. | 15 License for more details. |
16 | 16 |
17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
18 along with this program; if not, write to the Free Software | 18 along with this program; if not, write to the Free Software |
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | 19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
20 MA 02110-1301, USA. */ | 20 MA 02110-1301, USA. */ |
21 | 21 |
| 22 #include "sysdep.h" |
22 #include <stdio.h> | 23 #include <stdio.h> |
23 #include "sysdep.h" | |
24 #include "opcode/v850.h" | 24 #include "opcode/v850.h" |
25 #include "bfd.h" | 25 #include "bfd.h" |
26 #include "opintl.h" | 26 #include "opintl.h" |
27 | 27 |
28 | 28 |
29 /* Regular opcodes. */ | 29 /* Regular opcodes. */ |
30 #define OP(x) ((x & 0x3f) << 5) | 30 #define OP(x) ((x & 0x3f) << 5) |
31 #define OP_MASK OP (0x3f) | 31 #define OP_MASK OP (0x3f) |
32 | 32 |
33 /* Conditional branch opcodes (Format III). */ | 33 /* Conditional branch opcodes (Format III). */ |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 249 } |
250 | 250 |
251 static unsigned long | 251 static unsigned long |
252 insert_v8 (unsigned long insn, long value, const char ** errmsg) | 252 insert_v8 (unsigned long insn, long value, const char ** errmsg) |
253 { | 253 { |
254 if (value > 0xff || value < 0) | 254 if (value > 0xff || value < 0) |
255 * errmsg = _(immediate_out_of_range); | 255 * errmsg = _(immediate_out_of_range); |
256 | 256 |
257 return insn | (value & 0x1f) | ((value & 0xe0) << (27-5)); | 257 return insn | (value & 0x1f) | ((value & 0xe0) << (27-5)); |
258 } | 258 } |
error: old chunk mismatch |
None
OLD | NEW |