make some variables unsigned
[deliverable/binutils-gdb.git] / gas / config / tc-pdp11.c
CommitLineData
e135f41b 1/* tc-pdp11.c - pdp11-specific -
6f2750fe 2 Copyright (C) 2001-2016 Free Software Foundation, Inc.
e135f41b
NC
3
4 This file is part of GAS, the GNU Assembler.
5
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
ec2655a6 8 the Free Software Foundation; either version 3, or (at your option)
e135f41b
NC
9 any later version.
10
11 GAS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to
bb0a86e1
NC
18 the Free Software Foundation, 51 Franklin Street - Fifth Floor,
19 Boston, MA 02110-1301, USA. */
e135f41b 20
e135f41b 21#include "as.h"
3882b010 22#include "safe-ctype.h"
e135f41b
NC
23#include "opcode/pdp11.h"
24
4d5f9b2a 25extern int flonum_gen2vax (int, FLONUM_TYPE * f, LITTLENUM_TYPE *);
cd3cde86 26
4d5f9b2a 27#define TRUE 1
e135f41b
NC
28#define FALSE 0
29
4d5f9b2a 30/* A representation for PDP-11 machine code. */
e135f41b
NC
31struct pdp11_code
32{
33 char *error;
34 int code;
4d5f9b2a
NC
35 int additional; /* Is there an additional word? */
36 int word; /* Additional word, if any. */
e135f41b
NC
37 struct
38 {
39 bfd_reloc_code_real_type type;
40 expressionS exp;
41 int pc_rel;
42 } reloc;
43};
44
4d5f9b2a
NC
45/* Instruction set extensions.
46
47 If you change this from an array to something else, please update
48 the "PDP-11 instruction set extensions" comment in pdp11.h. */
e135f41b
NC
49int pdp11_extension[PDP11_EXT_NUM];
50
4d5f9b2a 51/* Assembly options. */
e135f41b
NC
52
53#define ASM_OPT_PIC 1
54#define ASM_OPT_NUM 2
55
56int asm_option[ASM_OPT_NUM];
57
58/* These chars start a comment anywhere in a source file (except inside
4d5f9b2a 59 another comment. */
5a38dc70 60const char comment_chars[] = "#/";
e135f41b 61
5cd4edbe 62/* These chars only start a comment at the beginning of a line. */
5a38dc70 63const char line_comment_chars[] = "#/";
e135f41b 64
5a38dc70 65const char line_separator_chars[] = ";";
e135f41b 66
4d5f9b2a 67/* Chars that can be used to separate mant from exp in floating point nums. */
5a38dc70 68const char EXP_CHARS[] = "eE";
e135f41b 69
4d5f9b2a
NC
70/* Chars that mean this number is a floating point constant. */
71/* as in 0f123.456. */
72/* or 0H1.234E-12 (see exp chars above). */
5a38dc70 73const char FLT_CHARS[] = "dDfF";
e135f41b
NC
74
75void pseudo_even (int);
76void pseudo_bss (int);
77
5a38dc70 78const pseudo_typeS md_pseudo_table[] =
e135f41b
NC
79{
80 { "bss", pseudo_bss, 0 },
81 { "even", pseudo_even, 0 },
82 { 0, 0, 0 },
83};
84
4d5f9b2a
NC
85static struct hash_control *insn_hash = NULL;
86\f
87static int
17b9d67d 88set_option (const char *arg)
4d5f9b2a
NC
89{
90 int yes = 1;
91
92 if (strcmp (arg, "all-extensions") == 0
93 || strcmp (arg, "all") == 0)
94 {
95 memset (pdp11_extension, ~0, sizeof pdp11_extension);
96 pdp11_extension[PDP11_NONE] = 0;
97 return 1;
98 }
99 else if (strcmp (arg, "no-extensions") == 0)
100 {
101 memset (pdp11_extension, 0, sizeof pdp11_extension);
102 pdp11_extension[PDP11_BASIC] = 1;
103 return 1;
104 }
105
106 if (strncmp (arg, "no-", 3) == 0)
107 {
108 yes = 0;
109 arg += 3;
110 }
111
112 /* Commersial instructions. */
113 if (strcmp (arg, "cis") == 0)
114 pdp11_extension[PDP11_CIS] = yes;
115 /* Call supervisor mode. */
116 else if (strcmp (arg, "csm") == 0)
117 pdp11_extension[PDP11_CSM] = yes;
118 /* Extended instruction set. */
119 else if (strcmp (arg, "eis") == 0)
120 pdp11_extension[PDP11_EIS] = pdp11_extension[PDP11_LEIS] = yes;
121 /* KEV11 floating-point. */
122 else if (strcmp (arg, "fis") == 0
123 || strcmp (arg, "kev11") == 0
124 || strcmp (arg, "kev-11") == 0)
125 pdp11_extension[PDP11_FIS] = yes;
126 /* FP-11 floating-point. */
127 else if (strcmp (arg, "fpp") == 0
128 || strcmp (arg, "fpu") == 0
129 || strcmp (arg, "fp11") == 0
130 || strcmp (arg, "fp-11") == 0
131 || strcmp (arg, "fpj11") == 0
132 || strcmp (arg, "fp-j11") == 0
133 || strcmp (arg, "fpj-11") == 0)
134 pdp11_extension[PDP11_FPP] = yes;
135 /* Limited extended insns. */
136 else if (strcmp (arg, "limited-eis") == 0)
137 {
138 pdp11_extension[PDP11_LEIS] = yes;
139 if (!pdp11_extension[PDP11_LEIS])
140 pdp11_extension[PDP11_EIS] = 0;
141 }
142 /* Move from processor type. */
143 else if (strcmp (arg, "mfpt") == 0)
144 pdp11_extension[PDP11_MFPT] = yes;
145 /* Multiprocessor insns: */
146 else if (strncmp (arg, "mproc", 5) == 0
147 /* TSTSET, WRTLCK */
148 || strncmp (arg, "multiproc", 9) == 0)
149 pdp11_extension[PDP11_MPROC] = yes;
150 /* Move from/to proc status. */
151 else if (strcmp (arg, "mxps") == 0)
152 pdp11_extension[PDP11_MXPS] = yes;
153 /* Position-independent code. */
154 else if (strcmp (arg, "pic") == 0)
155 asm_option[ASM_OPT_PIC] = yes;
156 /* Set priority level. */
157 else if (strcmp (arg, "spl") == 0)
158 pdp11_extension[PDP11_SPL] = yes;
159 /* Microcode instructions: */
160 else if (strcmp (arg, "ucode") == 0
161 /* LDUB, MED, XFC */
162 || strcmp (arg, "microcode") == 0)
163 pdp11_extension[PDP11_UCODE] = yes;
164 else
165 return 0;
166
167 return 1;
168}
169
170
e135f41b 171static void
4d5f9b2a 172init_defaults (void)
e135f41b
NC
173{
174 static int first = 1;
175
176 if (first)
177 {
178 set_option ("all-extensions");
179 set_option ("pic");
180 first = 0;
181 }
182}
183
e135f41b 184void
4d5f9b2a 185md_begin (void)
e135f41b
NC
186{
187 int i;
188
189 init_defaults ();
190
191 insn_hash = hash_new ();
192 if (insn_hash == NULL)
20203fb9 193 as_fatal (_("Virtual memory exhausted"));
5cd4edbe 194
e135f41b 195 for (i = 0; i < pdp11_num_opcodes; i++)
4d5f9b2a 196 hash_insert (insn_hash, pdp11_opcodes[i].name, (void *) (pdp11_opcodes + i));
e135f41b 197 for (i = 0; i < pdp11_num_aliases; i++)
4d5f9b2a 198 hash_insert (insn_hash, pdp11_aliases[i].name, (void *) (pdp11_aliases + i));
e135f41b
NC
199}
200
201void
4d5f9b2a 202md_number_to_chars (char con[], valueT value, int nbytes)
e135f41b
NC
203{
204 /* On a PDP-11, 0x1234 is stored as "\x12\x34", and
4d5f9b2a
NC
205 0x12345678 is stored as "\x56\x78\x12\x34". It's
206 anyones guess what 0x123456 would be stored like. */
e135f41b
NC
207
208 switch (nbytes)
209 {
210 case 0:
211 break;
212 case 1:
213 con[0] = value & 0xff;
214 break;
215 case 2:
4d5f9b2a 216 con[0] = value & 0xff;
e135f41b
NC
217 con[1] = (value >> 8) & 0xff;
218 break;
219 case 4:
220 con[0] = (value >> 16) & 0xff;
221 con[1] = (value >> 24) & 0xff;
4d5f9b2a 222 con[2] = value & 0xff;
e135f41b
NC
223 con[3] = (value >> 8) & 0xff;
224 break;
225 default:
226 BAD_CASE (nbytes);
5cd4edbe 227 }
e135f41b
NC
228}
229
230/* Fix up some data or instructions after we find out the value of a symbol
94f592af 231 that they reference. Knows about order of bytes in address. */
e135f41b 232
94f592af 233void
55cf6793 234md_apply_fix (fixS *fixP,
4d5f9b2a
NC
235 valueT * valP,
236 segT seg ATTRIBUTE_UNUSED)
e135f41b
NC
237{
238 valueT code;
239 valueT mask;
94f592af 240 valueT val = * valP;
e135f41b
NC
241 char *buf;
242 int shift;
243 int size;
244
245 buf = fixP->fx_where + fixP->fx_frag->fr_literal;
246 size = fixP->fx_size;
3ec2b351 247 code = md_chars_to_number ((unsigned char *) buf, size);
e135f41b
NC
248
249 switch (fixP->fx_r_type)
250 {
251 case BFD_RELOC_16:
252 case BFD_RELOC_16_PCREL:
253 mask = 0xffff;
254 shift = 0;
255 break;
256 case BFD_RELOC_PDP11_DISP_8_PCREL:
257 mask = 0x00ff;
258 shift = 1;
259 break;
260 case BFD_RELOC_PDP11_DISP_6_PCREL:
261 mask = 0x003f;
262 shift = 1;
14127cc4 263 val = -val;
e135f41b
NC
264 break;
265 default:
266 BAD_CASE (fixP->fx_r_type);
267 }
268
269 if (fixP->fx_addsy != NULL)
94f592af 270 val += symbol_get_bfdsym (fixP->fx_addsy)->section->vma;
e135f41b
NC
271 /* *value += fixP->fx_addsy->bsym->section->vma; */
272
273 code &= ~mask;
94f592af 274 code |= (val >> shift) & mask;
e135f41b 275 number_to_chars_littleendian (buf, code, size);
94f592af
NC
276
277 if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
278 fixP->fx_done = 1;
e135f41b
NC
279}
280
281long
282md_chars_to_number (con, nbytes)
5cd4edbe
KH
283 unsigned char con[]; /* Low order byte 1st. */
284 int nbytes; /* Number of bytes in the input. */
e135f41b
NC
285{
286 /* On a PDP-11, 0x1234 is stored as "\x12\x34", and
4d5f9b2a
NC
287 0x12345678 is stored as "\x56\x78\x12\x34". It's
288 anyones guess what 0x123456 would be stored like. */
e135f41b
NC
289 switch (nbytes)
290 {
291 case 0:
292 return 0;
293 case 1:
294 return con[0];
295 case 2:
296 return (con[1] << BITS_PER_CHAR) | con[0];
297 case 4:
298 return
4d5f9b2a
NC
299 (((con[1] << BITS_PER_CHAR) | con[0]) << (2 * BITS_PER_CHAR))
300 |((con[3] << BITS_PER_CHAR) | con[2]);
e135f41b
NC
301 default:
302 BAD_CASE (nbytes);
303 return 0;
5cd4edbe 304 }
e135f41b
NC
305}
306\f
307static char *
308skip_whitespace (char *str)
309{
310 while (*str == ' ' || *str == '\t')
311 str++;
312 return str;
313}
314
315static char *
316find_whitespace (char *str)
317{
318 while (*str != ' ' && *str != '\t' && *str != 0)
319 str++;
320 return str;
321}
322
e135f41b
NC
323static char *
324parse_reg (char *str, struct pdp11_code *operand)
325{
326 str = skip_whitespace (str);
3882b010 327 if (TOLOWER (*str) == 'r')
e135f41b
NC
328 {
329 str++;
330 switch (*str)
331 {
332 case '0': case '1': case '2': case '3':
333 case '4': case '5': case '6': case '7':
334 operand->code = *str - '0';
335 str++;
336 break;
337 default:
20203fb9 338 operand->error = _("Bad register name");
e135f41b
NC
339 return str - 1;
340 }
341 }
4d5f9b2a
NC
342 else if (strncmp (str, "sp", 2) == 0
343 || strncmp (str, "SP", 2) == 0)
e135f41b
NC
344 {
345 operand->code = 6;
346 str += 2;
347 }
4d5f9b2a
NC
348 else if (strncmp (str, "pc", 2) == 0
349 || strncmp (str, "PC", 2) == 0)
e135f41b
NC
350 {
351 operand->code = 7;
352 str += 2;
353 }
354 else
355 {
20203fb9 356 operand->error = _("Bad register name");
e135f41b
NC
357 return str;
358 }
359
360 return str;
361}
362
363static char *
cd3cde86 364parse_ac5 (char *str, struct pdp11_code *operand)
e135f41b
NC
365{
366 str = skip_whitespace (str);
4d5f9b2a
NC
367 if (strncmp (str, "fr", 2) == 0
368 || strncmp (str, "FR", 2) == 0
369 || strncmp (str, "ac", 2) == 0
370 || strncmp (str, "AC", 2) == 0)
e135f41b
NC
371 {
372 str += 2;
373 switch (*str)
374 {
375 case '0': case '1': case '2': case '3':
cd3cde86 376 case '4': case '5':
e135f41b
NC
377 operand->code = *str - '0';
378 str++;
379 break;
380 default:
20203fb9 381 operand->error = _("Bad register name");
e135f41b
NC
382 return str - 2;
383 }
384 }
385 else
386 {
20203fb9 387 operand->error = _("Bad register name");
e135f41b
NC
388 return str;
389 }
390
391 return str;
392}
393
cd3cde86
AM
394static char *
395parse_ac (char *str, struct pdp11_code *operand)
396{
397 str = parse_ac5 (str, operand);
398 if (!operand->error && operand->code > 3)
399 {
20203fb9 400 operand->error = _("Bad register name");
cd3cde86
AM
401 return str - 3;
402 }
403
404 return str;
405}
406
e135f41b
NC
407static char *
408parse_expression (char *str, struct pdp11_code *operand)
409{
410 char *save_input_line_pointer;
411 segT seg;
412
413 save_input_line_pointer = input_line_pointer;
414 input_line_pointer = str;
415 seg = expression (&operand->reloc.exp);
416 if (seg == NULL)
417 {
418 input_line_pointer = save_input_line_pointer;
20203fb9 419 operand->error = _("Error in expression");
e135f41b
NC
420 return str;
421 }
422
423 str = input_line_pointer;
424 input_line_pointer = save_input_line_pointer;
425
426 operand->reloc.pc_rel = 0;
427
e135f41b
NC
428 return str;
429}
430
431static char *
432parse_op_no_deferred (char *str, struct pdp11_code *operand)
433{
cd3cde86
AM
434 LITTLENUM_TYPE literal_float[2];
435
e135f41b
NC
436 str = skip_whitespace (str);
437
438 switch (*str)
439 {
440 case '(': /* (rn) and (rn)+ */
441 str = parse_reg (str + 1, operand);
442 if (operand->error)
443 return str;
444 str = skip_whitespace (str);
445 if (*str != ')')
446 {
20203fb9 447 operand->error = _("Missing ')'");
e135f41b
NC
448 return str;
449 }
450 str++;
451 if (*str == '+')
452 {
453 operand->code |= 020;
454 str++;
455 }
456 else
457 {
458 operand->code |= 010;
459 }
460 break;
461
4d5f9b2a
NC
462 /* Immediate. */
463 case '#':
5cd4edbe 464 case '$':
e135f41b
NC
465 str = parse_expression (str + 1, operand);
466 if (operand->error)
467 return str;
468 operand->additional = TRUE;
469 operand->word = operand->reloc.exp.X_add_number;
470 switch (operand->reloc.exp.X_op)
471 {
472 case O_constant:
473 break;
474 case O_symbol:
475 case O_add:
476 case O_subtract:
477 operand->reloc.type = BFD_RELOC_16;
478 operand->reloc.pc_rel = 0;
479 break;
cd3cde86
AM
480 case O_big:
481 if (operand->reloc.exp.X_add_number > 0)
482 {
20203fb9 483 operand->error = _("Error in expression");
cd3cde86
AM
484 break;
485 }
4d5f9b2a 486 /* It's a floating literal... */
cd3cde86
AM
487 know (operand->reloc.exp.X_add_number < 0);
488 flonum_gen2vax ('f', &generic_floating_point_number, literal_float);
489 operand->word = literal_float[0];
490 if (literal_float[1] != 0)
491 as_warn (_("Low order bits truncated in immediate float operand"));
492 break;
e135f41b 493 default:
20203fb9 494 operand->error = _("Error in expression");
e135f41b
NC
495 break;
496 }
497 operand->code = 027;
498 break;
499
4d5f9b2a
NC
500 /* label, d(rn), -(rn) */
501 default:
e135f41b 502 {
e135f41b
NC
503 if (strncmp (str, "-(", 2) == 0) /* -(rn) */
504 {
505 str = parse_reg (str + 2, operand);
506 if (operand->error)
507 return str;
508 str = skip_whitespace (str);
509 if (*str != ')')
510 {
20203fb9 511 operand->error = _("Missing ')'");
e135f41b
NC
512 return str;
513 }
514 operand->code |= 040;
515 str++;
516 break;
517 }
518
519 str = parse_expression (str, operand);
520 if (operand->error)
521 return str;
522
523 str = skip_whitespace (str);
524
4d5f9b2a 525 if (*str != '(')
e135f41b 526 {
e135f41b
NC
527 operand->code = 067;
528 operand->additional = 1;
529 operand->word = 0;
530 operand->reloc.type = BFD_RELOC_16_PCREL;
531 operand->reloc.pc_rel = 1;
532 break;
533 }
534
4d5f9b2a
NC
535 /* d(rn) */
536 str++;
e135f41b
NC
537 str = parse_reg (str, operand);
538 if (operand->error)
539 return str;
540
541 str = skip_whitespace (str);
542
543 if (*str != ')')
544 {
20203fb9 545 operand->error = _("Missing ')'");
e135f41b
NC
546 return str;
547 }
548
549 str++;
550 operand->additional = TRUE;
551 operand->code |= 060;
552 switch (operand->reloc.exp.X_op)
553 {
554 case O_symbol:
bb0a86e1
NC
555 operand->reloc.type = BFD_RELOC_16;
556 operand->reloc.pc_rel = 0;
e135f41b
NC
557 break;
558 case O_constant:
559 if ((operand->code & 7) == 7)
560 {
561 operand->reloc.pc_rel = 1;
562 operand->word = operand->reloc.exp.X_add_number;
563 }
564 else
4d5f9b2a
NC
565 operand->word = operand->reloc.exp.X_add_number;
566
e135f41b
NC
567 break;
568 default:
569 BAD_CASE (operand->reloc.exp.X_op);
570 }
571 break;
572 }
573 }
574
575 return str;
576}
577
578static char *
cd3cde86 579parse_op_noreg (char *str, struct pdp11_code *operand)
e135f41b
NC
580{
581 str = skip_whitespace (str);
e135f41b
NC
582 operand->error = NULL;
583
584 if (*str == '@' || *str == '*')
585 {
586 str = parse_op_no_deferred (str + 1, operand);
587 if (operand->error)
588 return str;
589 operand->code |= 010;
590 }
591 else
592 str = parse_op_no_deferred (str, operand);
593
594 return str;
595}
596
cd3cde86
AM
597static char *
598parse_op (char *str, struct pdp11_code *operand)
599{
600 str = skip_whitespace (str);
601
602 str = parse_reg (str, operand);
603 if (!operand->error)
604 return str;
605
606 operand->error = NULL;
607 parse_ac5 (str, operand);
608 if (!operand->error)
609 {
20203fb9 610 operand->error = _("Float AC not legal as integer operand");
cd3cde86
AM
611 return str;
612 }
5d6255fe 613
cd3cde86
AM
614 return parse_op_noreg (str, operand);
615}
616
617static char *
618parse_fop (char *str, struct pdp11_code *operand)
619{
620 str = skip_whitespace (str);
621
622 str = parse_ac5 (str, operand);
623 if (!operand->error)
624 return str;
625
626 operand->error = NULL;
627 parse_reg (str, operand);
628 if (!operand->error)
629 {
20203fb9 630 operand->error = _("General register not legal as float operand");
cd3cde86
AM
631 return str;
632 }
633
634 return parse_op_noreg (str, operand);
635}
636
e135f41b
NC
637static char *
638parse_separator (char *str, int *error)
639{
640 str = skip_whitespace (str);
641 *error = (*str != ',');
642 if (!*error)
643 str++;
644 return str;
645}
646
647void
4d5f9b2a 648md_assemble (char *instruction_string)
e135f41b 649{
5a38dc70 650 const struct pdp11_opcode *op;
e135f41b
NC
651 struct pdp11_code insn, op1, op2;
652 int error;
653 int size;
654 char *err = NULL;
655 char *str;
656 char *p;
657 char c;
658
659 str = skip_whitespace (instruction_string);
660 p = find_whitespace (str);
661 if (p - str == 0)
662 {
20203fb9 663 as_bad (_("No instruction found"));
e135f41b
NC
664 return;
665 }
666
667 c = *p;
668 *p = '\0';
669 op = (struct pdp11_opcode *)hash_find (insn_hash, str);
670 *p = c;
671 if (op == 0)
672 {
cd3cde86 673 as_bad (_("Unknown instruction '%s'"), str);
e135f41b
NC
674 return;
675 }
676
677 if (!pdp11_extension[op->extension])
678 {
20203fb9 679 as_warn (_("Unsupported instruction set extension: %s"), op->name);
e135f41b
NC
680 return;
681 }
682
683 insn.error = NULL;
684 insn.code = op->opcode;
685 insn.reloc.type = BFD_RELOC_NONE;
686 op1.error = NULL;
687 op1.additional = FALSE;
688 op1.reloc.type = BFD_RELOC_NONE;
689 op2.error = NULL;
690 op2.additional = FALSE;
691 op2.reloc.type = BFD_RELOC_NONE;
692
693 str = p;
694 size = 2;
695
696 switch (op->type)
697 {
698 case PDP11_OPCODE_NO_OPS:
699 str = skip_whitespace (str);
e135f41b
NC
700 break;
701
702 case PDP11_OPCODE_IMM3:
703 case PDP11_OPCODE_IMM6:
704 case PDP11_OPCODE_IMM8:
705 str = skip_whitespace (str);
706 if (*str == '#' || *str == '$')
707 str++;
708 str = parse_expression (str, &op1);
709 if (op1.error)
710 break;
cd3cde86
AM
711 if (op1.reloc.exp.X_op != O_constant || op1.reloc.type != BFD_RELOC_NONE)
712 {
20203fb9 713 op1.error = _("operand is not an absolute constant");
cd3cde86
AM
714 break;
715 }
e135f41b
NC
716 switch (op->type)
717 {
718 case PDP11_OPCODE_IMM3:
cd3cde86 719 if (op1.reloc.exp.X_add_number & ~7)
e135f41b 720 {
20203fb9 721 op1.error = _("3-bit immediate out of range");
e135f41b
NC
722 break;
723 }
724 break;
725 case PDP11_OPCODE_IMM6:
cd3cde86 726 if (op1.reloc.exp.X_add_number & ~0x3f)
e135f41b 727 {
20203fb9 728 op1.error = _("6-bit immediate out of range");
e135f41b
NC
729 break;
730 }
731 break;
732 case PDP11_OPCODE_IMM8:
cd3cde86 733 if (op1.reloc.exp.X_add_number & ~0xff)
e135f41b 734 {
20203fb9 735 op1.error = _("8-bit immediate out of range");
e135f41b
NC
736 break;
737 }
738 break;
739 }
cd3cde86 740 insn.code |= op1.reloc.exp.X_add_number;
e135f41b
NC
741 break;
742
743 case PDP11_OPCODE_DISPL:
744 {
d3ce72d0
NC
745 char *new_pointer;
746 new_pointer = parse_expression (str, &op1);
e135f41b
NC
747 op1.code = 0;
748 op1.reloc.pc_rel = 1;
749 op1.reloc.type = BFD_RELOC_PDP11_DISP_8_PCREL;
750 if (op1.reloc.exp.X_op != O_symbol)
751 {
20203fb9 752 op1.error = _("Symbol expected");
e135f41b
NC
753 break;
754 }
755 if (op1.code & ~0xff)
756 {
20203fb9 757 err = _("8-bit displacement out of range");
e135f41b
NC
758 break;
759 }
d3ce72d0 760 str = new_pointer;
e135f41b
NC
761 insn.code |= op1.code;
762 insn.reloc = op1.reloc;
763 }
764 break;
765
766 case PDP11_OPCODE_REG:
767 str = parse_reg (str, &op1);
768 if (op1.error)
769 break;
770 insn.code |= op1.code;
771 break;
772
773 case PDP11_OPCODE_OP:
774 str = parse_op (str, &op1);
775 if (op1.error)
776 break;
777 insn.code |= op1.code;
778 if (op1.additional)
779 size += 2;
780 break;
781
cd3cde86
AM
782 case PDP11_OPCODE_FOP:
783 str = parse_fop (str, &op1);
784 if (op1.error)
785 break;
786 insn.code |= op1.code;
787 if (op1.additional)
788 size += 2;
789 break;
790
e135f41b
NC
791 case PDP11_OPCODE_REG_OP:
792 str = parse_reg (str, &op2);
793 if (op2.error)
794 break;
795 insn.code |= op2.code << 6;
796 str = parse_separator (str, &error);
797 if (error)
798 {
20203fb9 799 op2.error = _("Missing ','");
e135f41b
NC
800 break;
801 }
802 str = parse_op (str, &op1);
803 if (op1.error)
804 break;
805 insn.code |= op1.code;
806 if (op1.additional)
807 size += 2;
808 break;
809
810 case PDP11_OPCODE_REG_OP_REV:
811 str = parse_op (str, &op1);
812 if (op1.error)
813 break;
814 insn.code |= op1.code;
815 if (op1.additional)
816 size += 2;
817 str = parse_separator (str, &error);
818 if (error)
819 {
20203fb9 820 op2.error = _("Missing ','");
e135f41b
NC
821 break;
822 }
823 str = parse_reg (str, &op2);
824 if (op2.error)
825 break;
826 insn.code |= op2.code << 6;
827 break;
828
cd3cde86
AM
829 case PDP11_OPCODE_AC_FOP:
830 str = parse_ac (str, &op2);
831 if (op2.error)
832 break;
833 insn.code |= op2.code << 6;
834 str = parse_separator (str, &error);
835 if (error)
836 {
20203fb9 837 op1.error = _("Missing ','");
cd3cde86
AM
838 break;
839 }
840 str = parse_fop (str, &op1);
841 if (op1.error)
842 break;
843 insn.code |= op1.code;
844 if (op1.additional)
845 size += 2;
846 break;
847
848 case PDP11_OPCODE_FOP_AC:
849 str = parse_fop (str, &op1);
850 if (op1.error)
851 break;
852 insn.code |= op1.code;
853 if (op1.additional)
854 size += 2;
855 str = parse_separator (str, &error);
856 if (error)
857 {
20203fb9 858 op1.error = _("Missing ','");
cd3cde86
AM
859 break;
860 }
861 str = parse_ac (str, &op2);
862 if (op2.error)
863 break;
864 insn.code |= op2.code << 6;
865 break;
866
e135f41b
NC
867 case PDP11_OPCODE_AC_OP:
868 str = parse_ac (str, &op2);
869 if (op2.error)
870 break;
871 insn.code |= op2.code << 6;
872 str = parse_separator (str, &error);
873 if (error)
874 {
20203fb9 875 op1.error = _("Missing ','");
e135f41b
NC
876 break;
877 }
878 str = parse_op (str, &op1);
879 if (op1.error)
880 break;
881 insn.code |= op1.code;
882 if (op1.additional)
883 size += 2;
884 break;
885
cd3cde86
AM
886 case PDP11_OPCODE_OP_AC:
887 str = parse_op (str, &op1);
888 if (op1.error)
889 break;
890 insn.code |= op1.code;
891 if (op1.additional)
892 size += 2;
893 str = parse_separator (str, &error);
894 if (error)
895 {
20203fb9 896 op1.error = _("Missing ','");
cd3cde86
AM
897 break;
898 }
899 str = parse_ac (str, &op2);
900 if (op2.error)
901 break;
902 insn.code |= op2.code << 6;
903 break;
904
e135f41b
NC
905 case PDP11_OPCODE_OP_OP:
906 str = parse_op (str, &op1);
907 if (op1.error)
908 break;
909 insn.code |= op1.code << 6;
910 if (op1.additional)
911 size += 2;
912 str = parse_separator (str, &error);
913 if (error)
914 {
20203fb9 915 op2.error = _("Missing ','");
e135f41b
NC
916 break;
917 }
918 str = parse_op (str, &op2);
919 if (op2.error)
920 break;
921 insn.code |= op2.code;
922 if (op2.additional)
923 size += 2;
924 break;
925
926 case PDP11_OPCODE_REG_DISPL:
927 {
d3ce72d0 928 char *new_pointer;
e135f41b
NC
929 str = parse_reg (str, &op2);
930 if (op2.error)
931 break;
932 insn.code |= op2.code << 6;
933 str = parse_separator (str, &error);
934 if (error)
935 {
20203fb9 936 op1.error = _("Missing ','");
e135f41b
NC
937 break;
938 }
d3ce72d0 939 new_pointer = parse_expression (str, &op1);
e135f41b
NC
940 op1.code = 0;
941 op1.reloc.pc_rel = 1;
942 op1.reloc.type = BFD_RELOC_PDP11_DISP_6_PCREL;
943 if (op1.reloc.exp.X_op != O_symbol)
944 {
20203fb9 945 op1.error = _("Symbol expected");
e135f41b
NC
946 break;
947 }
948 if (op1.code & ~0x3f)
949 {
20203fb9 950 err = _("6-bit displacement out of range");
e135f41b
NC
951 break;
952 }
d3ce72d0 953 str = new_pointer;
e135f41b
NC
954 insn.code |= op1.code;
955 insn.reloc = op1.reloc;
956 }
957 break;
5cd4edbe 958
e135f41b
NC
959 default:
960 BAD_CASE (op->type);
961 }
962
963 if (op1.error)
964 err = op1.error;
965 else if (op2.error)
966 err = op2.error;
967 else
968 {
969 str = skip_whitespace (str);
970 if (*str)
20203fb9 971 err = _("Too many operands");
e135f41b
NC
972 }
973
974 {
975 char *to = NULL;
5cd4edbe 976
e135f41b
NC
977 if (err)
978 {
20203fb9 979 as_bad ("%s", err);
e135f41b
NC
980 return;
981 }
982
983 to = frag_more (size);
984
985 md_number_to_chars (to, insn.code, 2);
986 if (insn.reloc.type != BFD_RELOC_NONE)
987 fix_new_exp (frag_now, to - frag_now->fr_literal, 2,
988 &insn.reloc.exp, insn.reloc.pc_rel, insn.reloc.type);
989 to += 2;
990
991 if (op1.additional)
992 {
993 md_number_to_chars (to, op1.word, 2);
994 if (op1.reloc.type != BFD_RELOC_NONE)
995 fix_new_exp (frag_now, to - frag_now->fr_literal, 2,
996 &op1.reloc.exp, op1.reloc.pc_rel, op1.reloc.type);
997 to += 2;
998 }
999
1000 if (op2.additional)
1001 {
1002 md_number_to_chars (to, op2.word, 2);
1003 if (op2.reloc.type != BFD_RELOC_NONE)
1004 fix_new_exp (frag_now, to - frag_now->fr_literal, 2,
1005 &op2.reloc.exp, op2.reloc.pc_rel, op2.reloc.type);
1006 }
1007 }
1008}
1009
1010int
4d5f9b2a
NC
1011md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED,
1012 segT segment ATTRIBUTE_UNUSED)
e135f41b
NC
1013{
1014 return 0;
1015}
1016
1017void
4d5f9b2a
NC
1018md_convert_frag (bfd *headers ATTRIBUTE_UNUSED,
1019 segT seg ATTRIBUTE_UNUSED,
1020 fragS *fragP ATTRIBUTE_UNUSED)
e135f41b
NC
1021{
1022}
1023
2b4f075a
HPN
1024int md_short_jump_size = 2;
1025int md_long_jump_size = 4;
e135f41b
NC
1026
1027void
4d5f9b2a
NC
1028md_create_short_jump (char *ptr ATTRIBUTE_UNUSED,
1029 addressT from_addr ATTRIBUTE_UNUSED,
1030 addressT to_addr ATTRIBUTE_UNUSED,
1031 fragS *frag ATTRIBUTE_UNUSED,
1032 symbolS *to_symbol ATTRIBUTE_UNUSED)
e135f41b
NC
1033{
1034}
1035
1036void
4d5f9b2a
NC
1037md_create_long_jump (char *ptr ATTRIBUTE_UNUSED,
1038 addressT from_addr ATTRIBUTE_UNUSED,
1039 addressT to_addr ATTRIBUTE_UNUSED,
1040 fragS *frag ATTRIBUTE_UNUSED,
1041 symbolS *to_symbol ATTRIBUTE_UNUSED)
e135f41b
NC
1042{
1043}
1044
1045static int
17b9d67d 1046set_cpu_model (const char *arg)
e135f41b
NC
1047{
1048 char buf[4];
1049 char *model = buf;
1050
1051 if (arg[0] == 'k')
1052 arg++;
1053
1054 *model++ = *arg++;
1055
1056 if (strchr ("abdx", model[-1]) == NULL)
1057 return 0;
1058
1059 if (model[-1] == 'd')
1060 {
4d5f9b2a 1061 if (arg[0] == 'f' || arg[0] == 'j')
e135f41b
NC
1062 model[-1] = *arg++;
1063 }
1064 else if (model[-1] == 'x')
1065 {
1066 if (arg[0] == 't')
1067 model[-1] = *arg++;
1068 }
1069
1070 if (arg[0] == '-')
1071 arg++;
1072
1073 if (strncmp (arg, "11", 2) != 0)
1074 return 0;
1075 arg += 2;
1076
1077 if (arg[0] == '-')
1078 {
1079 if (*++arg == 0)
1080 return 0;
1081 }
1082
4d5f9b2a 1083 /* Allow up to two revision letters. */
e135f41b
NC
1084 if (arg[0] != 0)
1085 *model++ = *arg++;
1086 if (arg[0] != 0)
1087 *model++ = *arg++;
1088
1089 *model++ = 0;
1090
1091 set_option ("no-extensions");
1092
4d5f9b2a
NC
1093 /* KA11 (11/15/20). */
1094 if (strncmp (buf, "a", 1) == 0)
1095 return 1; /* No extensions. */
e135f41b 1096
4d5f9b2a
NC
1097 /* KB11 (11/45/50/55/70). */
1098 else if (strncmp (buf, "b", 1) == 0)
1099 return set_option ("eis") && set_option ("spl");
e135f41b 1100
4d5f9b2a
NC
1101 /* KD11-A (11/35/40). */
1102 else if (strncmp (buf, "da", 2) == 0)
e135f41b
NC
1103 return set_option ("limited-eis");
1104
4d5f9b2a
NC
1105 /* KD11-B (11/05/10). */
1106 else if (strncmp (buf, "db", 2) == 0
1107 /* KD11-D (11/04). */
1108 || strncmp (buf, "dd", 2) == 0)
e135f41b
NC
1109 return 1; /* no extensions */
1110
4d5f9b2a
NC
1111 /* KD11-E (11/34). */
1112 else if (strncmp (buf, "de", 2) == 0)
1113 return set_option ("eis") && set_option ("mxps");
1114
1115 /* KD11-F (11/03). */
1116 else if (strncmp (buf, "df", 2) == 0
1117 /* KD11-H (11/03). */
1118 || strncmp (buf, "dh", 2) == 0
1119 /* KD11-Q (11/03). */
1120 || strncmp (buf, "dq", 2) == 0)
1121 return set_option ("limited-eis") && set_option ("mxps");
1122
1123 /* KD11-K (11/60). */
1124 else if (strncmp (buf, "dk", 2) == 0)
1125 return set_option ("eis")
1126 && set_option ("mxps")
1127 && set_option ("ucode");
1128
1129 /* KD11-Z (11/44). */
1130 else if (strncmp (buf, "dz", 2) == 0)
1131 return set_option ("csm")
1132 && set_option ("eis")
1133 && set_option ("mfpt")
1134 && set_option ("mxps")
1135 && set_option ("spl");
1136
1137 /* F11 (11/23/24). */
1138 else if (strncmp (buf, "f", 1) == 0)
1139 return set_option ("eis")
1140 && set_option ("mfpt")
1141 && set_option ("mxps");
1142
1143 /* J11 (11/53/73/83/84/93/94). */
1144 else if (strncmp (buf, "j", 1) == 0)
1145 return set_option ("csm")
1146 && set_option ("eis")
1147 && set_option ("mfpt")
1148 && set_option ("multiproc")
1149 && set_option ("mxps")
1150 && set_option ("spl");
1151
1152 /* T11 (11/21). */
1153 else if (strncmp (buf, "t", 1) == 0)
1154 return set_option ("limited-eis")
1155 && set_option ("mxps");
e135f41b
NC
1156
1157 else
1158 return 0;
1159}
1160
1161static int
17b9d67d 1162set_machine_model (const char *arg)
e135f41b 1163{
4d5f9b2a
NC
1164 if (strncmp (arg, "pdp-11/", 7) != 0
1165 && strncmp (arg, "pdp11/", 6) != 0
1166 && strncmp (arg, "11/", 3) != 0)
e135f41b
NC
1167 return 0;
1168
1169 if (strncmp (arg, "pdp", 3) == 0)
1170 arg += 3;
1171 if (arg[0] == '-')
1172 arg++;
1173 if (strncmp (arg, "11/", 3) == 0)
1174 arg += 3;
1175
4d5f9b2a
NC
1176 if (strcmp (arg, "03") == 0)
1177 return set_cpu_model ("kd11f");
1178
1179 else if (strcmp (arg, "04") == 0)
1180 return set_cpu_model ("kd11d");
e135f41b 1181
4d5f9b2a
NC
1182 else if (strcmp (arg, "05") == 0
1183 || strcmp (arg, "10") == 0)
1184 return set_cpu_model ("kd11b");
e135f41b 1185
4d5f9b2a
NC
1186 else if (strcmp (arg, "15") == 0
1187 || strcmp (arg, "20") == 0)
1188 return set_cpu_model ("ka11");
e135f41b 1189
4d5f9b2a
NC
1190 else if (strcmp (arg, "21") == 0)
1191 return set_cpu_model ("t11");
e135f41b 1192
4d5f9b2a
NC
1193 else if (strcmp (arg, "23") == 0
1194 || strcmp (arg, "24") == 0)
1195 return set_cpu_model ("f11");
e135f41b 1196
4d5f9b2a
NC
1197 else if (strcmp (arg, "34") == 0
1198 || strcmp (arg, "34a") == 0)
1199 return set_cpu_model ("kd11e");
e135f41b 1200
4d5f9b2a
NC
1201 else if (strcmp (arg, "35") == 0
1202 || strcmp (arg, "40") == 0)
1203 return set_cpu_model ("kd11da");
e135f41b 1204
4d5f9b2a
NC
1205 else if (strcmp (arg, "44") == 0)
1206 return set_cpu_model ("kd11dz");
e135f41b 1207
4d5f9b2a
NC
1208 else if (strcmp (arg, "45") == 0
1209 || strcmp (arg, "50") == 0
1210 || strcmp (arg, "55") == 0
1211 || strcmp (arg, "70") == 0)
1212 return set_cpu_model ("kb11");
e135f41b 1213
4d5f9b2a
NC
1214 else if (strcmp (arg, "60") == 0)
1215 return set_cpu_model ("kd11k");
e135f41b 1216
4d5f9b2a
NC
1217 else if (strcmp (arg, "53") == 0
1218 || strcmp (arg, "73") == 0
1219 || strcmp (arg, "83") == 0
1220 || strcmp (arg, "84") == 0
1221 || strcmp (arg, "93") == 0
1222 || strcmp (arg, "94") == 0)
1223 return set_cpu_model ("j11")
1224 && set_option ("fpp");
e135f41b 1225
e135f41b
NC
1226 else
1227 return 0;
1228}
1229
5a38dc70 1230const char *md_shortopts = "m:";
e135f41b
NC
1231
1232struct option md_longopts[] =
1233{
1234#define OPTION_CPU 257
1235 { "cpu", required_argument, NULL, OPTION_CPU },
1236#define OPTION_MACHINE 258
1237 { "machine", required_argument, NULL, OPTION_MACHINE },
1238#define OPTION_PIC 259
1239 { "pic", no_argument, NULL, OPTION_PIC },
1240 { NULL, no_argument, NULL, 0 }
1241};
1242
07726851 1243size_t md_longopts_size = sizeof (md_longopts);
e135f41b 1244
4d5f9b2a
NC
1245/* Invocation line includes a switch not recognized by the base assembler.
1246 See if it's a processor-specific option. */
e135f41b
NC
1247
1248int
17b9d67d 1249md_parse_option (int c, const char *arg)
e135f41b
NC
1250{
1251 init_defaults ();
1252
1253 switch (c)
1254 {
1255 case 'm':
1256 if (set_option (arg))
1257 return 1;
1258 if (set_cpu_model (arg))
1259 return 1;
1260 if (set_machine_model (arg))
1261 return 1;
1262 break;
1263
1264 case OPTION_CPU:
1265 if (set_cpu_model (arg))
1266 return 1;
1267 break;
1268
1269 case OPTION_MACHINE:
1270 if (set_machine_model (arg))
1271 return 1;
1272 break;
1273
1274 case OPTION_PIC:
1275 if (set_option ("pic"))
1276 return 1;
1277 break;
1278
1279 default:
1280 break;
1281 }
1282
e135f41b
NC
1283 return 0;
1284}
1285
e135f41b 1286void
4d5f9b2a 1287md_show_usage (FILE *stream)
e135f41b
NC
1288{
1289 fprintf (stream, "\
1290\n\
1291PDP-11 instruction set extentions:\n\
1292\n\
1293-m(no-)cis allow (disallow) commersial instruction set\n\
1294-m(no-)csm allow (disallow) CSM instruction\n\
1295-m(no-)eis allow (disallow) full extended instruction set\n\
1296-m(no-)fis allow (disallow) KEV11 floating-point instructions\n\
1297-m(no-)fpp allow (disallow) FP-11 floating-point instructions\n\
1298-m(no-)fpu allow (disallow) FP-11 floating-point instructions\n\
1299-m(no-)limited-eis allow (disallow) limited extended instruction set\n\
1300-m(no-)mfpt allow (disallow) processor type instruction\n\
1301-m(no-)multiproc allow (disallow) multiprocessor instructions\n\
1302-m(no-)mxps allow (disallow) processor status instructions\n\
1303-m(no-)spl allow (disallow) SPL instruction\n\
1304-m(no-)ucode allow (disallow) microcode instructions\n\
1305-mall-extensions allow all instruction set extensions\n\
1306 (this is the default)\n\
1307-mno-extentions disallow all instruction set extensions\n\
1308-pic generate position-indepenent code\n\
1309\n\
1310PDP-11 CPU model options:\n\
1311\n\
1312-mka11* KA11 CPU. base line instruction set only\n\
1313-mkb11* KB11 CPU. enable full EIS and SPL\n\
1314-mkd11a* KD11-A CPU. enable limited EIS\n\
1315-mkd11b* KD11-B CPU. base line instruction set only\n\
1316-mkd11d* KD11-D CPU. base line instruction set only\n\
1317-mkd11e* KD11-E CPU. enable full EIS, MTPS, and MFPS\n\
1318-mkd11f* KD11-F CPU. enable limited EIS, MTPS, and MFPS\n\
1319-mkd11h* KD11-H CPU. enable limited EIS, MTPS, and MFPS\n\
1320-mkd11q* KD11-Q CPU. enable limited EIS, MTPS, and MFPS\n\
1321-mkd11k* KD11-K CPU. enable full EIS, MTPS, MFPS, LDUB, MED,\n\
1322 XFC, and MFPT\n\
1323-mkd11z* KD11-Z CPU. enable full EIS, MTPS, MFPS, MFPT, SPL,\n\
1324 and CSM\n\
1325-mf11* F11 CPU. enable full EIS, MFPS, MTPS, and MFPT\n\
1326-mj11* J11 CPU. enable full EIS, MTPS, MFPS, MFPT, SPL,\n\
1327 CSM, TSTSET, and WRTLCK\n\
1328-mt11* T11 CPU. enable limited EIS, MTPS, and MFPS\n\
1329\n\
1330PDP-11 machine model options:\n\
1331\n\
1332-m11/03 same as -mkd11f\n\
1333-m11/04 same as -mkd11d\n\
1334-m11/05 same as -mkd11b\n\
1335-m11/10 same as -mkd11b\n\
1336-m11/15 same as -mka11\n\
1337-m11/20 same as -mka11\n\
1338-m11/21 same as -mt11\n\
1339-m11/23 same as -mf11\n\
1340-m11/24 same as -mf11\n\
1341-m11/34 same as -mkd11e\n\
1342-m11/34a same as -mkd11e -mfpp\n\
1343-m11/35 same as -mkd11a\n\
1344-m11/40 same as -mkd11a\n\
1345-m11/44 same as -mkd11z\n\
1346-m11/45 same as -mkb11\n\
1347-m11/50 same as -mkb11\n\
1348-m11/53 same as -mj11\n\
1349-m11/55 same as -mkb11\n\
1350-m11/60 same as -mkd11k\n\
1351-m11/70 same as -mkb11\n\
1352-m11/73 same as -mj11\n\
1353-m11/83 same as -mj11\n\
1354-m11/84 same as -mj11\n\
1355-m11/93 same as -mj11\n\
1356-m11/94 same as -mj11\n\
1357");
1358}
1359
1360symbolS *
4d5f9b2a 1361md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
e135f41b
NC
1362{
1363 return 0;
1364}
1365
1366valueT
4d5f9b2a
NC
1367md_section_align (segT segment ATTRIBUTE_UNUSED,
1368 valueT size)
e135f41b
NC
1369{
1370 return (size + 1) & ~1;
1371}
1372
1373long
4d5f9b2a 1374md_pcrel_from (fixS *fixP)
e135f41b
NC
1375{
1376 return fixP->fx_frag->fr_address + fixP->fx_where + fixP->fx_size;
1377}
1378
1379/* Translate internal representation of relocation info to BFD target
1380 format. */
4d5f9b2a 1381
e135f41b 1382arelent *
4d5f9b2a
NC
1383tc_gen_reloc (asection *section ATTRIBUTE_UNUSED,
1384 fixS *fixp)
e135f41b
NC
1385{
1386 arelent *reloc;
1387 bfd_reloc_code_real_type code;
1388
4d5f9b2a 1389 reloc = xmalloc (sizeof (* reloc));
e135f41b 1390
4d5f9b2a 1391 reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
e135f41b
NC
1392 *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
1393 reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
1394
55cf6793 1395 /* This is taken account for in md_apply_fix(). */
e135f41b
NC
1396 reloc->addend = -symbol_get_bfdsym (fixp->fx_addsy)->section->vma;
1397
1398 switch (fixp->fx_r_type)
1399 {
1400 case BFD_RELOC_16:
1401 if (fixp->fx_pcrel)
1402 code = BFD_RELOC_16_PCREL;
1403 else
1404 code = BFD_RELOC_16;
1405 break;
1406
1407 case BFD_RELOC_16_PCREL:
1408 code = BFD_RELOC_16_PCREL;
1409 break;
1410
1411 default:
1412 BAD_CASE (fixp->fx_r_type);
1413 return NULL;
1414 }
1415
1416 reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
1417
1418 if (reloc->howto == NULL)
1419 {
1420 as_bad_where (fixp->fx_file, fixp->fx_line,
20203fb9 1421 _("Can not represent %s relocation in this object file format"),
e135f41b
NC
1422 bfd_get_reloc_code_name (code));
1423 return NULL;
1424 }
1425
1426 return reloc;
1427}
1428
1429void
4d5f9b2a 1430pseudo_bss (int c ATTRIBUTE_UNUSED)
e135f41b
NC
1431{
1432 int temp;
1433
1434 temp = get_absolute_expression ();
1435 subseg_set (bss_section, temp);
1436 demand_empty_rest_of_line ();
1437}
1438
1439void
4d5f9b2a 1440pseudo_even (int c ATTRIBUTE_UNUSED)
e135f41b
NC
1441{
1442 int alignment = 1; /* 2^1 */
1443 frag_align (alignment, 0, 1);
1444 record_alignment (now_seg, alignment);
1445}
499ac353
NC
1446
1447char *
1448md_atof (int type, char * litP, int * sizeP)
1449{
1450 return vax_md_atof (type, litP, sizeP);
1451}
This page took 0.708678 seconds and 4 git commands to generate.