Changeset 609 for branches/GNU/src/binutils/opcodes/v850-opc.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/opcodes/v850-opc.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* Assemble V850 instructions. 2 Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.2 Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 35 35 #define two(x,y) ((unsigned int) (x) | ((unsigned int) (y) << 16)) 36 36 37 static long unsigned insert_d9 PARAMS ((long unsigned, long, const char **)); 38 static long unsigned extract_d9 PARAMS ((long unsigned, int *)); 39 static long unsigned insert_d22 PARAMS ((long unsigned, long, const char **)); 40 static long unsigned extract_d22 PARAMS ((long unsigned, int *)); 41 static long unsigned insert_d16_15 PARAMS ((long unsigned, long, const char **)); 42 static long unsigned extract_d16_15 PARAMS ((long unsigned, int *)); 43 static long unsigned insert_d8_7 PARAMS ((long unsigned, long, const char **)); 44 static long unsigned extract_d8_7 PARAMS ((long unsigned, int *)); 45 static long unsigned insert_d8_6 PARAMS ((long unsigned, long, const char **)); 46 static long unsigned extract_d8_6 PARAMS ((long unsigned, int *)); 47 static long unsigned insert_d5_4 PARAMS ((long unsigned, long, const char **)); 48 static long unsigned extract_d5_4 PARAMS ((long unsigned, int *)); 49 static long unsigned insert_d16_16 PARAMS ((long unsigned, long, const char **)); 50 static long unsigned extract_d16_16 PARAMS ((long unsigned, int *)); 51 static long unsigned insert_i9 PARAMS ((long unsigned, long, const char **)); 52 static long unsigned extract_i9 PARAMS ((long unsigned, int *)); 53 static long unsigned insert_u9 PARAMS ((long unsigned, long, const char **)); 54 static long unsigned extract_u9 PARAMS ((long unsigned, int *)); 55 static long unsigned insert_spe PARAMS ((long unsigned, long, const char **)); 56 static long unsigned extract_spe PARAMS ((long unsigned, int *)); 57 static long unsigned insert_i5div PARAMS ((long unsigned, long, const char **)); 58 static long unsigned extract_i5div PARAMS ((long unsigned, int *)); 37 59 38 60 … … 73 95 extract_d9 (insn, invalid) 74 96 unsigned long insn; 75 int * invalid ;97 int * invalid ATTRIBUTE_UNUSED; 76 98 { 77 99 unsigned long ret = ((insn & 0xf800) >> 7) | ((insn & 0x0070) >> 3); … … 105 127 extract_d22 (insn, invalid) 106 128 unsigned long insn; 107 int * invalid ;129 int * invalid ATTRIBUTE_UNUSED; 108 130 { 109 131 signed long ret = ((insn & 0xfffe0000) >> 16) | ((insn & 0x3f) << 16); … … 134 156 extract_d16_15 (insn, invalid) 135 157 unsigned long insn; 136 int * invalid ;158 int * invalid ATTRIBUTE_UNUSED; 137 159 { 138 160 signed long ret = (insn & 0xfffe0000); … … 165 187 extract_d8_7 (insn, invalid) 166 188 unsigned long insn; 167 int * invalid ;189 int * invalid ATTRIBUTE_UNUSED; 168 190 { 169 191 unsigned long ret = (insn & 0x7f); … … 196 218 extract_d8_6 (insn, invalid) 197 219 unsigned long insn; 198 int * invalid ;220 int * invalid ATTRIBUTE_UNUSED; 199 221 { 200 222 unsigned long ret = (insn & 0x7e); … … 227 249 extract_d5_4 (insn, invalid) 228 250 unsigned long insn; 229 int * invalid ;251 int * invalid ATTRIBUTE_UNUSED; 230 252 { 231 253 unsigned long ret = (insn & 0x0f); … … 249 271 extract_d16_16 (insn, invalid) 250 272 unsigned long insn; 251 int * invalid ;273 int * invalid ATTRIBUTE_UNUSED; 252 274 { 253 275 signed long ret = insn & 0xfffe0000; … … 275 297 extract_i9 (insn, invalid) 276 298 unsigned long insn; 277 int * invalid ;299 int * invalid ATTRIBUTE_UNUSED; 278 300 { 279 301 signed long ret = insn & 0x003c0000; … … 288 310 289 311 static unsigned long 290 insert_u9 (insn, value, errmsg) 291 unsigned long insn; 292 unsigned long value; 293 const char ** errmsg; 294 { 312 insert_u9 (insn, v, errmsg) 313 unsigned long insn; 314 long v; 315 const char ** errmsg; 316 { 317 unsigned long value = (unsigned long) v; 295 318 if (value > 0x1ff) 296 319 * errmsg = _(immediate_out_of_range); … … 302 325 extract_u9 (insn, invalid) 303 326 unsigned long insn; 304 int * invalid ;327 int * invalid ATTRIBUTE_UNUSED; 305 328 { 306 329 unsigned long ret = insn & 0x003c0000; … … 314 337 315 338 static unsigned long 316 insert_spe (insn, value, errmsg) 317 unsigned long insn; 318 unsigned long value; 319 const char ** errmsg; 320 { 339 insert_spe (insn, v, errmsg) 340 unsigned long insn; 341 long v; 342 const char ** errmsg; 343 { 344 unsigned long value = (unsigned long) v; 345 321 346 if (value != 3) 322 347 * errmsg = _("invalid register for stack adjustment"); … … 327 352 static unsigned long 328 353 extract_spe (insn, invalid) 329 unsigned long insn ;330 int * invalid ;354 unsigned long insn ATTRIBUTE_UNUSED; 355 int * invalid ATTRIBUTE_UNUSED; 331 356 { 332 357 return 3; … … 334 359 335 360 static unsigned long 336 insert_i5div (insn, value, errmsg) 337 unsigned long insn; 338 unsigned long value; 339 const char ** errmsg; 340 { 361 insert_i5div (insn, v, errmsg) 362 unsigned long insn; 363 long v; 364 const char ** errmsg; 365 { 366 unsigned long value = (unsigned long) v; 367 341 368 if (value > 0x1ff) 342 369 { … … 357 384 extract_i5div (insn, invalid) 358 385 unsigned long insn; 359 int * invalid ;386 int * invalid ATTRIBUTE_UNUSED; 360 387 { 361 388 unsigned long ret = insn & 0x3c0000; … … 372 399 /* Warning: code in gas/config/tc-v850.c examines the contents of this array. 373 400 If you change any of the values here, be sure to look for side effects in 374 that code. */401 that code. */ 375 402 const struct v850_operand v850_operands[] = 376 403 { … … 586 613 587 614 /* load/store instructions */ 588 { "sld.bu", one (0x0300), one (0x0780), {D7, EP, R2_NOTR0}, 1, PROCESSOR_V850EA },589 615 { "sld.bu", one (0x0060), one (0x07f0), {D4, EP, R2_NOTR0}, 1, PROCESSOR_V850E }, 590 616 591 { "sld.hu", one (0x0400), one (0x0780), {D8_7, EP, R2_NOTR0}, 1, PROCESSOR_V850EA },592 617 { "sld.hu", one (0x0070), one (0x07f0), {D5_4, EP, R2_NOTR0}, 1, PROCESSOR_V850E }, 593 618 594 { "sld.b", one (0x0060), one (0x07f0), {D4, EP, R2}, 1, PROCESSOR_V850EA },595 619 { "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850E }, 596 620 { "sld.b", one (0x0300), one (0x0780), {D7, EP, R2}, 1, PROCESSOR_V850 }, 597 621 598 { "sld.h", one (0x0070), one (0x07f0), {D5_4, EP, R2}, 1, PROCESSOR_V850EA },599 622 { "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850E }, 600 623 { "sld.h", one (0x0400), one (0x0780), {D8_7, EP, R2}, 1, PROCESSOR_V850 }, … … 604 627 { "sst.w", one (0x0501), one (0x0781), {R2, D8_6, EP}, 2, PROCESSOR_ALL }, 605 628 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 },610 629 { "prepare", two (0x0780, 0x0003), two (0xffc0, 0x001f), {LIST12, IMM5, SP}, 0, PROCESSOR_NOT_V850 }, 611 630 { "prepare", two (0x0780, 0x000b), two (0xffc0, 0x001f), {LIST12, IMM5, IMM16}, 0, PROCESSOR_NOT_V850 }, … … 654 673 { "divh", two (0x07e0, 0x0280), two (0x07e0, 0x07ff), {R1, R2, R3}, 0, PROCESSOR_NOT_V850 }, 655 674 { "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 },665 675 666 676 { "nop", one (0x00), one (0xffff), {0}, 0, PROCESSOR_ALL }, -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.