1 /* expr.c -operands, expressions-
2 Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4 Free Software Foundation, Inc.
6 This file is part of GAS, the GNU Assembler.
8 GAS is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GAS is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GAS; see the file COPYING. If not, write to the Free
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 /* This is really a branch office of as-read.c. I split it out to clearly
24 distinguish the world of expressions from the world of statements.
25 (It also gives smaller files to re-compile.)
26 Here, "operand"s are of expressions, not instructions. */
30 #define min(a, b) ((a) < (b) ? (a) : (b))
35 static void floating_constant
PARAMS ((expressionS
* expressionP
));
36 static valueT generic_bignum_to_int32
PARAMS ((void));
38 static valueT generic_bignum_to_int64
PARAMS ((void));
40 static void integer_constant
PARAMS ((int radix
, expressionS
* expressionP
));
41 static void mri_char_constant
PARAMS ((expressionS
*));
42 static void current_location
PARAMS ((expressionS
*));
43 static void clean_up_expression
PARAMS ((expressionS
* expressionP
));
44 static segT operand
PARAMS ((expressionS
*));
45 static operatorT
operator PARAMS ((int *));
47 extern const char EXP_CHARS
[], FLT_CHARS
[];
49 /* We keep a mapping of expression symbols to file positions, so that
50 we can provide better error messages. */
52 struct expr_symbol_line
{
53 struct expr_symbol_line
*next
;
59 static struct expr_symbol_line
*expr_symbol_lines
;
61 /* Build a dummy symbol to hold a complex expression. This is how we
62 build expressions up out of other expressions. The symbol is put
63 into the fake section expr_section. */
66 make_expr_symbol (expressionP
)
67 expressionS
*expressionP
;
72 struct expr_symbol_line
*n
;
74 if (expressionP
->X_op
== O_symbol
75 && expressionP
->X_add_number
== 0)
76 return expressionP
->X_add_symbol
;
78 if (expressionP
->X_op
== O_big
)
80 /* This won't work, because the actual value is stored in
81 generic_floating_point_number or generic_bignum, and we are
82 going to lose it if we haven't already. */
83 if (expressionP
->X_add_number
> 0)
84 as_bad (_("bignum invalid"));
86 as_bad (_("floating point number invalid"));
87 zero
.X_op
= O_constant
;
88 zero
.X_add_number
= 0;
90 clean_up_expression (&zero
);
94 fake
= FAKE_LABEL_NAME
;
96 /* Putting constant symbols in absolute_section rather than
97 expr_section is convenient for the old a.out code, for which
98 S_GET_SEGMENT does not always retrieve the value put in by
100 symbolP
= symbol_create (fake
,
101 (expressionP
->X_op
== O_constant
104 0, &zero_address_frag
);
105 symbol_set_value_expression (symbolP
, expressionP
);
107 if (expressionP
->X_op
== O_constant
)
108 resolve_symbol_value (symbolP
);
110 n
= (struct expr_symbol_line
*) xmalloc (sizeof *n
);
112 as_where (&n
->file
, &n
->line
);
113 n
->next
= expr_symbol_lines
;
114 expr_symbol_lines
= n
;
119 /* Return the file and line number for an expr symbol. Return
120 non-zero if something was found, 0 if no information is known for
124 expr_symbol_where (sym
, pfile
, pline
)
129 register struct expr_symbol_line
*l
;
131 for (l
= expr_symbol_lines
; l
!= NULL
; l
= l
->next
)
144 /* Utilities for building expressions.
145 Since complex expressions are recorded as symbols for use in other
146 expressions these return a symbolS * and not an expressionS *.
147 These explicitly do not take an "add_number" argument. */
148 /* ??? For completeness' sake one might want expr_build_symbol.
149 It would just return its argument. */
151 /* Build an expression for an unsigned constant.
152 The corresponding one for signed constants is missing because
153 there's currently no need for it. One could add an unsigned_p flag
154 but that seems more clumsy. */
157 expr_build_uconstant (value
)
163 e
.X_add_number
= value
;
165 return make_expr_symbol (&e
);
168 /* Build an expression for OP s1. */
171 expr_build_unary (op
, s1
)
180 return make_expr_symbol (&e
);
183 /* Build an expression for s1 OP s2. */
186 expr_build_binary (op
, s1
, s2
)
197 return make_expr_symbol (&e
);
200 /* Build an expression for the current location ('.'). */
207 current_location (&e
);
208 return make_expr_symbol (&e
);
211 /* Build any floating-point literal here.
212 Also build any bignum literal here. */
214 /* Seems atof_machine can backscan through generic_bignum and hit whatever
215 happens to be loaded before it in memory. And its way too complicated
216 for me to fix right. Thus a hack. JF: Just make generic_bignum bigger,
217 and never write into the early words, thus they'll always be zero.
218 I hate Dean's floating-point code. Bleh. */
219 LITTLENUM_TYPE generic_bignum
[SIZE_OF_LARGE_NUMBER
+ 6];
221 FLONUM_TYPE generic_floating_point_number
= {
222 &generic_bignum
[6], /* low. (JF: Was 0) */
223 &generic_bignum
[SIZE_OF_LARGE_NUMBER
+ 6 - 1], /* high. JF: (added +6) */
229 /* If nonzero, we've been asked to assemble nan, +inf or -inf. */
230 int generic_floating_point_magic
;
233 floating_constant (expressionP
)
234 expressionS
*expressionP
;
236 /* input_line_pointer -> floating-point constant. */
239 error_code
= atof_generic (&input_line_pointer
, ".", EXP_CHARS
,
240 &generic_floating_point_number
);
244 if (error_code
== ERROR_EXPONENT_OVERFLOW
)
246 as_bad (_("bad floating-point constant: exponent overflow"));
250 as_bad (_("bad floating-point constant: unknown error code=%d"),
254 expressionP
->X_op
= O_big
;
255 /* input_line_pointer -> just after constant, which may point to
257 expressionP
->X_add_number
= -1;
261 generic_bignum_to_int32 ()
264 ((generic_bignum
[1] & LITTLENUM_MASK
) << LITTLENUM_NUMBER_OF_BITS
)
265 | (generic_bignum
[0] & LITTLENUM_MASK
);
266 number
&= 0xffffffff;
272 generic_bignum_to_int64 ()
275 ((((((((valueT
) generic_bignum
[3] & LITTLENUM_MASK
)
276 << LITTLENUM_NUMBER_OF_BITS
)
277 | ((valueT
) generic_bignum
[2] & LITTLENUM_MASK
))
278 << LITTLENUM_NUMBER_OF_BITS
)
279 | ((valueT
) generic_bignum
[1] & LITTLENUM_MASK
))
280 << LITTLENUM_NUMBER_OF_BITS
)
281 | ((valueT
) generic_bignum
[0] & LITTLENUM_MASK
));
287 integer_constant (radix
, expressionP
)
289 expressionS
*expressionP
;
291 char *start
; /* Start of number. */
294 valueT number
; /* Offset or (absolute) value. */
295 short int digit
; /* Value of next digit in current radix. */
296 short int maxdig
= 0; /* Highest permitted digit value. */
297 int too_many_digits
= 0; /* If we see >= this number of. */
298 char *name
; /* Points to name of symbol. */
299 symbolS
*symbolP
; /* Points to symbol. */
301 int small
; /* True if fits in 32 bits. */
303 /* May be bignum, or may fit in 32 bits. */
304 /* Most numbers fit into 32 bits, and we want this case to be fast.
305 so we pretend it will fit into 32 bits. If, after making up a 32
306 bit number, we realise that we have scanned more digits than
307 comfortably fit into 32 bits, we re-scan the digits coding them
308 into a bignum. For decimal and octal numbers we are
309 conservative: Some numbers may be assumed bignums when in fact
310 they do fit into 32 bits. Numbers of any radix can have excess
311 leading zeros: We strive to recognise this and cast them back
312 into 32 bits. We must check that the bignum really is more than
313 32 bits, and change it back to a 32-bit number if it fits. The
314 number we are looking for is expected to be positive, but if it
315 fits into 32 bits as an unsigned number, we let it be a 32-bit
316 number. The cavalier approach is for speed in ordinary cases. */
317 /* This has been extended for 64 bits. We blindly assume that if
318 you're compiling in 64-bit mode, the target is a 64-bit machine.
319 This should be cleaned up. */
323 #else /* includes non-bfd case, mostly */
327 if ((NUMBERS_WITH_SUFFIX
|| flag_m68k_mri
) && radix
== 0)
331 /* In MRI mode, the number may have a suffix indicating the
332 radix. For that matter, it might actually be a floating
334 for (suffix
= input_line_pointer
;
335 isalnum ((unsigned char) *suffix
);
338 if (*suffix
== 'e' || *suffix
== 'E')
342 if (suffix
== input_line_pointer
)
350 if (islower ((unsigned char) c
))
356 else if (c
== 'O' || c
== 'Q')
360 else if (suffix
[1] == '.' || c
== 'E' || flt
)
362 floating_constant (expressionP
);
377 too_many_digits
= valuesize
+ 1;
381 too_many_digits
= (valuesize
+ 2) / 3 + 1;
385 too_many_digits
= (valuesize
+ 3) / 4 + 1;
389 too_many_digits
= (valuesize
+ 11) / 4; /* Very rough. */
392 start
= input_line_pointer
;
393 c
= *input_line_pointer
++;
395 (digit
= hex_value (c
)) < maxdig
;
396 c
= *input_line_pointer
++)
398 number
= number
* radix
+ digit
;
400 /* c contains character after number. */
401 /* input_line_pointer->char after c. */
402 small
= (input_line_pointer
- start
- 1) < too_many_digits
;
404 if (radix
== 16 && c
== '_')
406 /* This is literal of the form 0x333_0_12345678_1.
407 This example is equivalent to 0x00000333000000001234567800000001. */
409 int num_little_digits
= 0;
411 input_line_pointer
= start
; /* -> 1st digit. */
413 know (LITTLENUM_NUMBER_OF_BITS
== 16);
415 for (c
= '_'; c
== '_'; num_little_digits
+= 2)
418 /* Convert one 64-bit word. */
421 for (c
= *input_line_pointer
++;
422 (digit
= hex_value (c
)) < maxdig
;
423 c
= *(input_line_pointer
++))
425 number
= number
* radix
+ digit
;
429 /* Check for 8 digit per word max. */
431 as_bad (_("a bignum with underscores may not have more than 8 hex digits in any word"));
433 /* Add this chunk to the bignum.
434 Shift things down 2 little digits. */
435 know (LITTLENUM_NUMBER_OF_BITS
== 16);
436 for (i
= min (num_little_digits
+ 1, SIZE_OF_LARGE_NUMBER
- 1);
439 generic_bignum
[i
] = generic_bignum
[i
- 2];
441 /* Add the new digits as the least significant new ones. */
442 generic_bignum
[0] = number
& 0xffffffff;
443 generic_bignum
[1] = number
>> 16;
446 /* Again, c is char after number, input_line_pointer->after c. */
448 if (num_little_digits
> SIZE_OF_LARGE_NUMBER
- 1)
449 num_little_digits
= SIZE_OF_LARGE_NUMBER
- 1;
451 assert (num_little_digits
>= 4);
453 if (num_little_digits
!= 8)
454 as_bad (_("a bignum with underscores must have exactly 4 words"));
456 /* We might have some leading zeros. These can be trimmed to give
457 us a change to fit this constant into a small number. */
458 while (generic_bignum
[num_little_digits
- 1] == 0
459 && num_little_digits
> 1)
462 if (num_little_digits
<= 2)
464 /* will fit into 32 bits. */
465 number
= generic_bignum_to_int32 ();
469 else if (num_little_digits
<= 4)
471 /* Will fit into 64 bits. */
472 number
= generic_bignum_to_int64 ();
480 /* Number of littlenums in the bignum. */
481 number
= num_little_digits
;
486 /* We saw a lot of digits. manufacture a bignum the hard way. */
487 LITTLENUM_TYPE
*leader
; /* -> high order littlenum of the bignum. */
488 LITTLENUM_TYPE
*pointer
; /* -> littlenum we are frobbing now. */
491 leader
= generic_bignum
;
492 generic_bignum
[0] = 0;
493 generic_bignum
[1] = 0;
494 generic_bignum
[2] = 0;
495 generic_bignum
[3] = 0;
496 input_line_pointer
= start
; /* -> 1st digit. */
497 c
= *input_line_pointer
++;
498 for (; (carry
= hex_value (c
)) < maxdig
; c
= *input_line_pointer
++)
500 for (pointer
= generic_bignum
; pointer
<= leader
; pointer
++)
504 work
= carry
+ radix
* *pointer
;
505 *pointer
= work
& LITTLENUM_MASK
;
506 carry
= work
>> LITTLENUM_NUMBER_OF_BITS
;
510 if (leader
< generic_bignum
+ SIZE_OF_LARGE_NUMBER
- 1)
512 /* Room to grow a longer bignum. */
517 /* Again, c is char after number. */
518 /* input_line_pointer -> after c. */
519 know (LITTLENUM_NUMBER_OF_BITS
== 16);
520 if (leader
< generic_bignum
+ 2)
522 /* Will fit into 32 bits. */
523 number
= generic_bignum_to_int32 ();
527 else if (leader
< generic_bignum
+ 4)
529 /* Will fit into 64 bits. */
530 number
= generic_bignum_to_int64 ();
536 /* Number of littlenums in the bignum. */
537 number
= leader
- generic_bignum
+ 1;
541 if ((NUMBERS_WITH_SUFFIX
|| flag_m68k_mri
)
543 && input_line_pointer
- 1 == suffix
)
544 c
= *input_line_pointer
++;
548 /* Here with number, in correct radix. c is the next char.
549 Note that unlike un*x, we allow "011f" "0x9f" to both mean
550 the same as the (conventional) "9f".
551 This is simply easier than checking for strict canonical
554 if (LOCAL_LABELS_FB
&& c
== 'b')
556 /* Backward ref to local label.
557 Because it is backward, expect it to be defined. */
558 /* Construct a local label. */
559 name
= fb_label_name ((int) number
, 0);
561 /* Seen before, or symbol is defined: OK. */
562 symbolP
= symbol_find (name
);
563 if ((symbolP
!= NULL
) && (S_IS_DEFINED (symbolP
)))
565 /* Local labels are never absolute. Don't waste time
566 checking absoluteness. */
567 know (SEG_NORMAL (S_GET_SEGMENT (symbolP
)));
569 expressionP
->X_op
= O_symbol
;
570 expressionP
->X_add_symbol
= symbolP
;
574 /* Either not seen or not defined. */
575 /* @@ Should print out the original string instead of
576 the parsed number. */
577 as_bad (_("backward ref to unknown label \"%d:\""),
579 expressionP
->X_op
= O_constant
;
582 expressionP
->X_add_number
= 0;
584 else if (LOCAL_LABELS_FB
&& c
== 'f')
586 /* Forward reference. Expect symbol to be undefined or
587 unknown. undefined: seen it before. unknown: never seen
590 Construct a local label name, then an undefined symbol.
591 Don't create a xseg frag for it: caller may do that.
592 Just return it as never seen before. */
593 name
= fb_label_name ((int) number
, 1);
594 symbolP
= symbol_find_or_make (name
);
595 /* We have no need to check symbol properties. */
596 #ifndef many_segments
597 /* Since "know" puts its arg into a "string", we
598 can't have newlines in the argument. */
599 know (S_GET_SEGMENT (symbolP
) == undefined_section
|| S_GET_SEGMENT (symbolP
) == text_section
|| S_GET_SEGMENT (symbolP
) == data_section
);
601 expressionP
->X_op
= O_symbol
;
602 expressionP
->X_add_symbol
= symbolP
;
603 expressionP
->X_add_number
= 0;
605 else if (LOCAL_LABELS_DOLLAR
&& c
== '$')
607 /* If the dollar label is *currently* defined, then this is just
608 another reference to it. If it is not *currently* defined,
609 then this is a fresh instantiation of that number, so create
612 if (dollar_label_defined ((long) number
))
614 name
= dollar_label_name ((long) number
, 0);
615 symbolP
= symbol_find (name
);
616 know (symbolP
!= NULL
);
620 name
= dollar_label_name ((long) number
, 1);
621 symbolP
= symbol_find_or_make (name
);
624 expressionP
->X_op
= O_symbol
;
625 expressionP
->X_add_symbol
= symbolP
;
626 expressionP
->X_add_number
= 0;
630 expressionP
->X_op
= O_constant
;
631 #ifdef TARGET_WORD_SIZE
632 /* Sign extend NUMBER. */
633 number
|= (-(number
>> (TARGET_WORD_SIZE
- 1))) << (TARGET_WORD_SIZE
- 1);
635 expressionP
->X_add_number
= number
;
636 input_line_pointer
--; /* Restore following character. */
637 } /* Really just a number. */
641 /* Not a small number. */
642 expressionP
->X_op
= O_big
;
643 expressionP
->X_add_number
= number
; /* Number of littlenums. */
644 input_line_pointer
--; /* -> char following number. */
648 /* Parse an MRI multi character constant. */
651 mri_char_constant (expressionP
)
652 expressionS
*expressionP
;
656 if (*input_line_pointer
== '\''
657 && input_line_pointer
[1] != '\'')
659 expressionP
->X_op
= O_constant
;
660 expressionP
->X_add_number
= 0;
664 /* In order to get the correct byte ordering, we must build the
665 number in reverse. */
666 for (i
= SIZE_OF_LARGE_NUMBER
- 1; i
>= 0; i
--)
670 generic_bignum
[i
] = 0;
671 for (j
= 0; j
< CHARS_PER_LITTLENUM
; j
++)
673 if (*input_line_pointer
== '\'')
675 if (input_line_pointer
[1] != '\'')
677 ++input_line_pointer
;
679 generic_bignum
[i
] <<= 8;
680 generic_bignum
[i
] += *input_line_pointer
;
681 ++input_line_pointer
;
684 if (i
< SIZE_OF_LARGE_NUMBER
- 1)
686 /* If there is more than one littlenum, left justify the
687 last one to make it match the earlier ones. If there is
688 only one, we can just use the value directly. */
689 for (; j
< CHARS_PER_LITTLENUM
; j
++)
690 generic_bignum
[i
] <<= 8;
693 if (*input_line_pointer
== '\''
694 && input_line_pointer
[1] != '\'')
700 as_bad (_("character constant too large"));
709 c
= SIZE_OF_LARGE_NUMBER
- i
;
710 for (j
= 0; j
< c
; j
++)
711 generic_bignum
[j
] = generic_bignum
[i
+ j
];
715 know (LITTLENUM_NUMBER_OF_BITS
== 16);
718 expressionP
->X_op
= O_big
;
719 expressionP
->X_add_number
= i
;
723 expressionP
->X_op
= O_constant
;
725 expressionP
->X_add_number
= generic_bignum
[0] & LITTLENUM_MASK
;
727 expressionP
->X_add_number
=
728 (((generic_bignum
[1] & LITTLENUM_MASK
)
729 << LITTLENUM_NUMBER_OF_BITS
)
730 | (generic_bignum
[0] & LITTLENUM_MASK
));
733 /* Skip the final closing quote. */
734 ++input_line_pointer
;
737 /* Return an expression representing the current location. This
738 handles the magic symbol `.'. */
741 current_location (expressionp
)
742 expressionS
*expressionp
;
744 if (now_seg
== absolute_section
)
746 expressionp
->X_op
= O_constant
;
747 expressionp
->X_add_number
= abs_section_offset
;
753 symbolp
= symbol_new (FAKE_LABEL_NAME
, now_seg
,
754 (valueT
) frag_now_fix (),
756 expressionp
->X_op
= O_symbol
;
757 expressionp
->X_add_symbol
= symbolp
;
758 expressionp
->X_add_number
= 0;
762 /* In: Input_line_pointer points to 1st char of operand, which may
766 The operand may have been empty: in this case X_op == O_absent.
767 Input_line_pointer->(next non-blank) char after operand. */
770 operand (expressionP
)
771 expressionS
*expressionP
;
774 symbolS
*symbolP
; /* Points to symbol. */
775 char *name
; /* Points to name of symbol. */
778 /* All integers are regarded as unsigned unless they are negated.
779 This is because the only thing which cares whether a number is
780 unsigned is the code in emit_expr which extends constants into
781 bignums. It should only sign extend negative numbers, so that
782 something like ``.quad 0x80000000'' is not sign extended even
783 though it appears negative if valueT is 32 bits. */
784 expressionP
->X_unsigned
= 1;
786 /* Digits, assume it is a bignum. */
788 SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */
789 c
= *input_line_pointer
++; /* input_line_pointer -> past char in c. */
791 if (is_end_of_line
[(unsigned char) c
])
805 input_line_pointer
--;
807 integer_constant ((NUMBERS_WITH_SUFFIX
|| flag_m68k_mri
)
812 #ifdef LITERAL_PREFIXDOLLAR_HEX
814 integer_constant (16, expressionP
);
818 #ifdef LITERAL_PREFIXPERCENT_BIN
820 integer_constant (2, expressionP
);
825 /* Non-decimal radix. */
827 if (NUMBERS_WITH_SUFFIX
|| flag_m68k_mri
)
831 /* Check for a hex constant. */
832 for (s
= input_line_pointer
; hex_p (*s
); s
++)
834 if (*s
== 'h' || *s
== 'H')
836 --input_line_pointer
;
837 integer_constant (0, expressionP
);
841 c
= *input_line_pointer
;
850 if (NUMBERS_WITH_SUFFIX
|| flag_m68k_mri
)
852 integer_constant (0, expressionP
);
858 if (c
&& strchr (FLT_CHARS
, c
))
860 input_line_pointer
++;
861 floating_constant (expressionP
);
862 expressionP
->X_add_number
=
863 - (isupper ((unsigned char) c
) ? tolower (c
) : c
);
867 /* The string was only zero. */
868 expressionP
->X_op
= O_constant
;
869 expressionP
->X_add_number
= 0;
878 input_line_pointer
++;
879 integer_constant (16, expressionP
);
883 if (LOCAL_LABELS_FB
&& ! (flag_m68k_mri
|| NUMBERS_WITH_SUFFIX
))
885 /* This code used to check for '+' and '-' here, and, in
886 some conditions, fall through to call
887 integer_constant. However, that didn't make sense,
888 as integer_constant only accepts digits. */
889 /* Some of our code elsewhere does permit digits greater
890 than the expected base; for consistency, do the same
892 if (input_line_pointer
[1] < '0'
893 || input_line_pointer
[1] > '9')
895 /* Parse this as a back reference to label 0. */
896 input_line_pointer
--;
897 integer_constant (10, expressionP
);
900 /* Otherwise, parse this as a binary number. */
904 input_line_pointer
++;
905 if (flag_m68k_mri
|| NUMBERS_WITH_SUFFIX
)
907 integer_constant (2, expressionP
);
918 integer_constant ((flag_m68k_mri
|| NUMBERS_WITH_SUFFIX
)
926 /* If it says "0f" and it could possibly be a floating point
927 number, make it one. Otherwise, make it a local label,
928 and try to deal with parsing the rest later. */
929 if (!input_line_pointer
[1]
930 || (is_end_of_line
[0xff & input_line_pointer
[1]])
931 || strchr (FLT_CHARS
, 'f') == NULL
)
934 char *cp
= input_line_pointer
+ 1;
935 int r
= atof_generic (&cp
, ".", EXP_CHARS
,
936 &generic_floating_point_number
);
940 case ERROR_EXPONENT_OVERFLOW
:
941 if (*cp
== 'f' || *cp
== 'b')
942 /* Looks like a difference expression. */
944 else if (cp
== input_line_pointer
+ 1)
945 /* No characters has been accepted -- looks like
951 as_fatal (_("expr.c(operand): bad atof_generic return val %d"),
956 /* Okay, now we've sorted it out. We resume at one of these
957 two labels, depending on what we've decided we're probably
960 input_line_pointer
--;
961 integer_constant (10, expressionP
);
971 if (flag_m68k_mri
|| NUMBERS_WITH_SUFFIX
)
973 integer_constant (0, expressionP
);
983 input_line_pointer
++;
984 floating_constant (expressionP
);
985 expressionP
->X_add_number
=
986 - (isupper ((unsigned char) c
) ? tolower (c
) : c
);
990 if (LOCAL_LABELS_DOLLAR
)
992 integer_constant (10, expressionP
);
1002 #ifndef NEED_INDEX_OPERATOR
1005 /* Didn't begin with digit & not a name. */
1006 segment
= expression (expressionP
);
1007 /* expression () will pass trailing whitespace. */
1008 if ((c
== '(' && *input_line_pointer
!= ')')
1009 || (c
== '[' && *input_line_pointer
!= ']'))
1011 #ifdef RELAX_PAREN_GROUPING
1014 as_bad (_("missing '%c'"), c
== '(' ? ')' : ']');
1017 input_line_pointer
++;
1019 /* Here with input_line_pointer -> char after "(...)". */
1024 if (! flag_m68k_mri
|| *input_line_pointer
!= '\'')
1026 as_bad (_("EBCDIC constants are not supported"));
1029 if (! flag_m68k_mri
|| *input_line_pointer
!= '\'')
1031 ++input_line_pointer
;
1035 if (! flag_m68k_mri
)
1037 /* Warning: to conform to other people's assemblers NO
1038 ESCAPEMENT is permitted for a single quote. The next
1039 character, parity errors and all, is taken as the value
1040 of the operand. VERY KINKY. */
1041 expressionP
->X_op
= O_constant
;
1042 expressionP
->X_add_number
= *input_line_pointer
++;
1046 mri_char_constant (expressionP
);
1050 (void) operand (expressionP
);
1055 /* Double quote is the bitwise not operator in MRI mode. */
1056 if (! flag_m68k_mri
)
1061 /* '~' is permitted to start a label on the Delta. */
1062 if (is_name_beginner (c
))
1067 operand (expressionP
);
1068 if (expressionP
->X_op
== O_constant
)
1070 /* input_line_pointer -> char after operand. */
1073 expressionP
->X_add_number
= - expressionP
->X_add_number
;
1074 /* Notice: '-' may overflow: no warning is given.
1075 This is compatible with other people's
1076 assemblers. Sigh. */
1077 expressionP
->X_unsigned
= 0;
1079 else if (c
== '~' || c
== '"')
1080 expressionP
->X_add_number
= ~ expressionP
->X_add_number
;
1082 expressionP
->X_add_number
= ! expressionP
->X_add_number
;
1084 else if (expressionP
->X_op
!= O_illegal
1085 && expressionP
->X_op
!= O_absent
)
1087 expressionP
->X_add_symbol
= make_expr_symbol (expressionP
);
1089 expressionP
->X_op
= O_uminus
;
1090 else if (c
== '~' || c
== '"')
1091 expressionP
->X_op
= O_bit_not
;
1093 expressionP
->X_op
= O_logical_not
;
1094 expressionP
->X_add_number
= 0;
1097 as_warn (_("Unary operator %c ignored because bad operand follows"),
1102 #if defined (DOLLAR_DOT) || defined (TC_M68K)
1104 /* '$' is the program counter when in MRI mode, or when
1105 DOLLAR_DOT is defined. */
1107 if (! flag_m68k_mri
)
1110 if (flag_m68k_mri
&& hex_p (*input_line_pointer
))
1112 /* In MRI mode, '$' is also used as the prefix for a
1113 hexadecimal constant. */
1114 integer_constant (16, expressionP
);
1118 if (is_part_of_name (*input_line_pointer
))
1121 current_location (expressionP
);
1126 if (!is_part_of_name (*input_line_pointer
))
1128 current_location (expressionP
);
1131 else if ((strncasecmp (input_line_pointer
, "startof.", 8) == 0
1132 && ! is_part_of_name (input_line_pointer
[8]))
1133 || (strncasecmp (input_line_pointer
, "sizeof.", 7) == 0
1134 && ! is_part_of_name (input_line_pointer
[7])))
1138 start
= (input_line_pointer
[1] == 't'
1139 || input_line_pointer
[1] == 'T');
1140 input_line_pointer
+= start
? 8 : 7;
1142 if (*input_line_pointer
!= '(')
1143 as_bad (_("syntax error in .startof. or .sizeof."));
1148 ++input_line_pointer
;
1150 name
= input_line_pointer
;
1151 c
= get_symbol_end ();
1153 buf
= (char *) xmalloc (strlen (name
) + 10);
1155 sprintf (buf
, ".startof.%s", name
);
1157 sprintf (buf
, ".sizeof.%s", name
);
1158 symbolP
= symbol_make (buf
);
1161 expressionP
->X_op
= O_symbol
;
1162 expressionP
->X_add_symbol
= symbolP
;
1163 expressionP
->X_add_number
= 0;
1165 *input_line_pointer
= c
;
1167 if (*input_line_pointer
!= ')')
1168 as_bad (_("syntax error in .startof. or .sizeof."));
1170 ++input_line_pointer
;
1181 /* Can't imagine any other kind of operand. */
1182 expressionP
->X_op
= O_absent
;
1183 input_line_pointer
--;
1188 if (! flag_m68k_mri
)
1190 integer_constant (2, expressionP
);
1194 if (! flag_m68k_mri
)
1196 integer_constant (8, expressionP
);
1200 if (! flag_m68k_mri
)
1203 /* In MRI mode, this is a floating point constant represented
1204 using hexadecimal digits. */
1206 ++input_line_pointer
;
1207 integer_constant (16, expressionP
);
1211 if (! flag_m68k_mri
|| is_part_of_name (*input_line_pointer
))
1214 current_location (expressionP
);
1222 if (is_name_beginner (c
)) /* Here if did not begin with a digit. */
1224 /* Identifier begins here.
1225 This is kludged for speed, so code is repeated. */
1227 name
= --input_line_pointer
;
1228 c
= get_symbol_end ();
1230 #ifdef md_parse_name
1231 /* This is a hook for the backend to parse certain names
1232 specially in certain contexts. If a name always has a
1233 specific value, it can often be handled by simply
1234 entering it in the symbol table. */
1235 if (md_parse_name (name
, expressionP
, &c
))
1237 *input_line_pointer
= c
;
1243 /* The MRI i960 assembler permits
1245 FIXME: This should use md_parse_name. */
1247 && (strcasecmp (name
, "sizeof") == 0
1248 || strcasecmp (name
, "startof") == 0))
1253 start
= (name
[1] == 't'
1256 *input_line_pointer
= c
;
1259 name
= input_line_pointer
;
1260 c
= get_symbol_end ();
1262 buf
= (char *) xmalloc (strlen (name
) + 10);
1264 sprintf (buf
, ".startof.%s", name
);
1266 sprintf (buf
, ".sizeof.%s", name
);
1267 symbolP
= symbol_make (buf
);
1270 expressionP
->X_op
= O_symbol
;
1271 expressionP
->X_add_symbol
= symbolP
;
1272 expressionP
->X_add_number
= 0;
1274 *input_line_pointer
= c
;
1281 symbolP
= symbol_find_or_make (name
);
1283 /* If we have an absolute symbol or a reg, then we know its
1285 segment
= S_GET_SEGMENT (symbolP
);
1286 if (segment
== absolute_section
)
1288 expressionP
->X_op
= O_constant
;
1289 expressionP
->X_add_number
= S_GET_VALUE (symbolP
);
1291 else if (segment
== reg_section
)
1293 expressionP
->X_op
= O_register
;
1294 expressionP
->X_add_number
= S_GET_VALUE (symbolP
);
1298 expressionP
->X_op
= O_symbol
;
1299 expressionP
->X_add_symbol
= symbolP
;
1300 expressionP
->X_add_number
= 0;
1302 *input_line_pointer
= c
;
1306 /* Let the target try to parse it. Success is indicated by changing
1307 the X_op field to something other than O_absent and pointing
1308 input_line_pointer past the expression. If it can't parse the
1309 expression, X_op and input_line_pointer should be unchanged. */
1310 expressionP
->X_op
= O_absent
;
1311 --input_line_pointer
;
1312 md_operand (expressionP
);
1313 if (expressionP
->X_op
== O_absent
)
1315 ++input_line_pointer
;
1316 as_bad (_("bad expression"));
1317 expressionP
->X_op
= O_constant
;
1318 expressionP
->X_add_number
= 0;
1324 /* It is more 'efficient' to clean up the expressionS when they are
1325 created. Doing it here saves lines of code. */
1326 clean_up_expression (expressionP
);
1327 SKIP_WHITESPACE (); /* -> 1st char after operand. */
1328 know (*input_line_pointer
!= ' ');
1330 /* The PA port needs this information. */
1331 if (expressionP
->X_add_symbol
)
1332 symbol_mark_used (expressionP
->X_add_symbol
);
1334 switch (expressionP
->X_op
)
1337 return absolute_section
;
1339 return S_GET_SEGMENT (expressionP
->X_add_symbol
);
1345 /* Internal. Simplify a struct expression for use by expr (). */
1347 /* In: address of a expressionS.
1348 The X_op field of the expressionS may only take certain values.
1349 Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT.
1351 Out: expressionS may have been modified:
1352 'foo-foo' symbol references cancelled to 0, which changes X_op
1353 from O_subtract to O_constant.
1354 Unused fields zeroed to help expr (). */
1357 clean_up_expression (expressionP
)
1358 expressionS
*expressionP
;
1360 switch (expressionP
->X_op
)
1364 expressionP
->X_add_number
= 0;
1369 expressionP
->X_add_symbol
= NULL
;
1374 expressionP
->X_op_symbol
= NULL
;
1377 if (expressionP
->X_op_symbol
== expressionP
->X_add_symbol
1378 || ((symbol_get_frag (expressionP
->X_op_symbol
)
1379 == symbol_get_frag (expressionP
->X_add_symbol
))
1380 && SEG_NORMAL (S_GET_SEGMENT (expressionP
->X_add_symbol
))
1381 && (S_GET_VALUE (expressionP
->X_op_symbol
)
1382 == S_GET_VALUE (expressionP
->X_add_symbol
))))
1384 addressT diff
= (S_GET_VALUE (expressionP
->X_add_symbol
)
1385 - S_GET_VALUE (expressionP
->X_op_symbol
));
1387 expressionP
->X_op
= O_constant
;
1388 expressionP
->X_add_symbol
= NULL
;
1389 expressionP
->X_op_symbol
= NULL
;
1390 expressionP
->X_add_number
+= diff
;
1398 /* Expression parser. */
1400 /* We allow an empty expression, and just assume (absolute,0) silently.
1401 Unary operators and parenthetical expressions are treated as operands.
1402 As usual, Q==quantity==operand, O==operator, X==expression mnemonics.
1404 We used to do a aho/ullman shift-reduce parser, but the logic got so
1405 warped that I flushed it and wrote a recursive-descent parser instead.
1406 Now things are stable, would anybody like to write a fast parser?
1407 Most expressions are either register (which does not even reach here)
1408 or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common.
1409 So I guess it doesn't really matter how inefficient more complex expressions
1412 After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK.
1413 Also, we have consumed any leading or trailing spaces (operand does that)
1414 and done all intervening operators.
1416 This returns the segment of the result, which will be
1417 absolute_section or the segment of a symbol. */
1420 #define __ O_illegal
1422 /* Maps ASCII -> operators. */
1423 static const operatorT op_encoding
[256] = {
1424 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1425 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1427 __
, O_bit_or_not
, __
, __
, __
, O_modulus
, O_bit_and
, __
,
1428 __
, __
, O_multiply
, O_add
, __
, O_subtract
, __
, O_divide
,
1429 __
, __
, __
, __
, __
, __
, __
, __
,
1430 __
, __
, __
, __
, O_lt
, __
, O_gt
, __
,
1431 __
, __
, __
, __
, __
, __
, __
, __
,
1432 __
, __
, __
, __
, __
, __
, __
, __
,
1433 __
, __
, __
, __
, __
, __
, __
, __
,
1435 #ifdef NEED_INDEX_OPERATOR
1440 __
, __
, O_bit_exclusive_or
, __
,
1441 __
, __
, __
, __
, __
, __
, __
, __
,
1442 __
, __
, __
, __
, __
, __
, __
, __
,
1443 __
, __
, __
, __
, __
, __
, __
, __
,
1444 __
, __
, __
, __
, O_bit_inclusive_or
, __
, __
, __
,
1446 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1447 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1448 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1449 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1450 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1451 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1452 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
,
1453 __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
, __
1457 0 operand, (expression)
1462 5 used for * / % in MRI mode
1467 static operator_rankT op_rank
[] = {
1472 0, /* O_symbol_rva */
1477 9, /* O_logical_not */
1481 8, /* O_left_shift */
1482 8, /* O_right_shift */
1483 7, /* O_bit_inclusive_or */
1484 7, /* O_bit_or_not */
1485 7, /* O_bit_exclusive_or */
1495 3, /* O_logical_and */
1496 2, /* O_logical_or */
1516 /* Unfortunately, in MRI mode for the m68k, multiplication and
1517 division have lower precedence than the bit wise operators. This
1518 function sets the operator precedences correctly for the current
1519 mode. Also, MRI uses a different bit_not operator, and this fixes
1522 #define STANDARD_MUL_PRECEDENCE 8
1523 #define MRI_MUL_PRECEDENCE 6
1526 expr_set_precedence ()
1530 op_rank
[O_multiply
] = MRI_MUL_PRECEDENCE
;
1531 op_rank
[O_divide
] = MRI_MUL_PRECEDENCE
;
1532 op_rank
[O_modulus
] = MRI_MUL_PRECEDENCE
;
1536 op_rank
[O_multiply
] = STANDARD_MUL_PRECEDENCE
;
1537 op_rank
[O_divide
] = STANDARD_MUL_PRECEDENCE
;
1538 op_rank
[O_modulus
] = STANDARD_MUL_PRECEDENCE
;
1542 /* Initialize the expression parser. */
1547 expr_set_precedence ();
1549 /* Verify that X_op field is wide enough. */
1553 assert (e
.X_op
== O_max
);
1557 /* Return the encoding for the operator at INPUT_LINE_POINTER, and
1558 sets NUM_CHARS to the number of characters in the operator.
1559 Does not advance INPUT_LINE_POINTER. */
1561 static inline operatorT
1562 operator (num_chars
)
1568 c
= *input_line_pointer
& 0xff;
1571 if (is_end_of_line
[c
])
1577 return op_encoding
[c
];
1580 switch (input_line_pointer
[1])
1583 return op_encoding
[c
];
1598 if (input_line_pointer
[1] != '=')
1599 return op_encoding
[c
];
1605 switch (input_line_pointer
[1])
1608 return op_encoding
[c
];
1610 ret
= O_right_shift
;
1620 /* We accept !! as equivalent to ^ for MRI compatibility. */
1621 if (input_line_pointer
[1] != '!')
1624 return O_bit_inclusive_or
;
1625 return op_encoding
[c
];
1628 return O_bit_exclusive_or
;
1631 if (input_line_pointer
[1] != '|')
1632 return op_encoding
[c
];
1635 return O_logical_or
;
1638 if (input_line_pointer
[1] != '&')
1639 return op_encoding
[c
];
1642 return O_logical_and
;
1648 /* Parse an expression. */
1651 expr (rankarg
, resultP
)
1652 int rankarg
; /* Larger # is higher rank. */
1653 expressionS
*resultP
; /* Deliver result here. */
1655 operator_rankT rank
= (operator_rankT
) rankarg
;
1664 retval
= operand (resultP
);
1666 /* operand () gobbles spaces. */
1667 know (*input_line_pointer
!= ' ');
1669 op_left
= operator (&op_chars
);
1670 while (op_left
!= O_illegal
&& op_rank
[(int) op_left
] > rank
)
1674 input_line_pointer
+= op_chars
; /* -> after operator. */
1676 rightseg
= expr (op_rank
[(int) op_left
], &right
);
1677 if (right
.X_op
== O_absent
)
1679 as_warn (_("missing operand; zero assumed"));
1680 right
.X_op
= O_constant
;
1681 right
.X_add_number
= 0;
1682 right
.X_add_symbol
= NULL
;
1683 right
.X_op_symbol
= NULL
;
1686 know (*input_line_pointer
!= ' ');
1688 if (op_left
== O_index
)
1690 if (*input_line_pointer
!= ']')
1691 as_bad ("missing right bracket");
1694 ++input_line_pointer
;
1699 if (retval
== undefined_section
)
1701 if (SEG_NORMAL (rightseg
))
1704 else if (! SEG_NORMAL (retval
))
1706 else if (SEG_NORMAL (rightseg
)
1707 && retval
!= rightseg
1709 && op_left
!= O_subtract
1712 as_bad (_("operation combines symbols in different segments"));
1714 op_right
= operator (&op_chars
);
1716 know (op_right
== O_illegal
1717 || op_rank
[(int) op_right
] <= op_rank
[(int) op_left
]);
1718 know ((int) op_left
>= (int) O_multiply
1719 && (int) op_left
<= (int) O_logical_or
);
1721 /* input_line_pointer->after right-hand quantity. */
1722 /* left-hand quantity in resultP. */
1723 /* right-hand quantity in right. */
1724 /* operator in op_left. */
1726 if (resultP
->X_op
== O_big
)
1728 if (resultP
->X_add_number
> 0)
1729 as_warn (_("left operand is a bignum; integer 0 assumed"));
1731 as_warn (_("left operand is a float; integer 0 assumed"));
1732 resultP
->X_op
= O_constant
;
1733 resultP
->X_add_number
= 0;
1734 resultP
->X_add_symbol
= NULL
;
1735 resultP
->X_op_symbol
= NULL
;
1737 if (right
.X_op
== O_big
)
1739 if (right
.X_add_number
> 0)
1740 as_warn (_("right operand is a bignum; integer 0 assumed"));
1742 as_warn (_("right operand is a float; integer 0 assumed"));
1743 right
.X_op
= O_constant
;
1744 right
.X_add_number
= 0;
1745 right
.X_add_symbol
= NULL
;
1746 right
.X_op_symbol
= NULL
;
1749 /* Optimize common cases. */
1750 #ifdef md_optimize_expr
1751 if (md_optimize_expr (resultP
, op_left
, &right
))
1758 if (op_left
== O_add
&& right
.X_op
== O_constant
)
1761 resultP
->X_add_number
+= right
.X_add_number
;
1763 /* This case comes up in PIC code. */
1764 else if (op_left
== O_subtract
1765 && right
.X_op
== O_symbol
1766 && resultP
->X_op
== O_symbol
1767 && (symbol_get_frag (right
.X_add_symbol
)
1768 == symbol_get_frag (resultP
->X_add_symbol
))
1769 && SEG_NORMAL (S_GET_SEGMENT (right
.X_add_symbol
)))
1772 resultP
->X_add_number
-= right
.X_add_number
;
1773 resultP
->X_add_number
+= (S_GET_VALUE (resultP
->X_add_symbol
)
1774 - S_GET_VALUE (right
.X_add_symbol
));
1775 resultP
->X_op
= O_constant
;
1776 resultP
->X_add_symbol
= 0;
1778 else if (op_left
== O_subtract
&& right
.X_op
== O_constant
)
1781 resultP
->X_add_number
-= right
.X_add_number
;
1783 else if (op_left
== O_add
&& resultP
->X_op
== O_constant
)
1786 resultP
->X_op
= right
.X_op
;
1787 resultP
->X_add_symbol
= right
.X_add_symbol
;
1788 resultP
->X_op_symbol
= right
.X_op_symbol
;
1789 resultP
->X_add_number
+= right
.X_add_number
;
1792 else if (resultP
->X_op
== O_constant
&& right
.X_op
== O_constant
)
1794 /* Constant OP constant. */
1795 offsetT v
= right
.X_add_number
;
1796 if (v
== 0 && (op_left
== O_divide
|| op_left
== O_modulus
))
1798 as_warn (_("division by zero"));
1804 case O_multiply
: resultP
->X_add_number
*= v
; break;
1805 case O_divide
: resultP
->X_add_number
/= v
; break;
1806 case O_modulus
: resultP
->X_add_number
%= v
; break;
1807 case O_left_shift
: resultP
->X_add_number
<<= v
; break;
1809 /* We always use unsigned shifts, to avoid relying on
1810 characteristics of the compiler used to compile gas. */
1811 resultP
->X_add_number
=
1812 (offsetT
) ((valueT
) resultP
->X_add_number
>> (valueT
) v
);
1814 case O_bit_inclusive_or
: resultP
->X_add_number
|= v
; break;
1815 case O_bit_or_not
: resultP
->X_add_number
|= ~v
; break;
1816 case O_bit_exclusive_or
: resultP
->X_add_number
^= v
; break;
1817 case O_bit_and
: resultP
->X_add_number
&= v
; break;
1818 case O_add
: resultP
->X_add_number
+= v
; break;
1819 case O_subtract
: resultP
->X_add_number
-= v
; break;
1821 resultP
->X_add_number
=
1822 resultP
->X_add_number
== v
? ~ (offsetT
) 0 : 0;
1825 resultP
->X_add_number
=
1826 resultP
->X_add_number
!= v
? ~ (offsetT
) 0 : 0;
1829 resultP
->X_add_number
=
1830 resultP
->X_add_number
< v
? ~ (offsetT
) 0 : 0;
1833 resultP
->X_add_number
=
1834 resultP
->X_add_number
<= v
? ~ (offsetT
) 0 : 0;
1837 resultP
->X_add_number
=
1838 resultP
->X_add_number
>= v
? ~ (offsetT
) 0 : 0;
1841 resultP
->X_add_number
=
1842 resultP
->X_add_number
> v
? ~ (offsetT
) 0 : 0;
1845 resultP
->X_add_number
= resultP
->X_add_number
&& v
;
1848 resultP
->X_add_number
= resultP
->X_add_number
|| v
;
1852 else if (resultP
->X_op
== O_symbol
1853 && right
.X_op
== O_symbol
1854 && (op_left
== O_add
1855 || op_left
== O_subtract
1856 || (resultP
->X_add_number
== 0
1857 && right
.X_add_number
== 0)))
1859 /* Symbol OP symbol. */
1860 resultP
->X_op
= op_left
;
1861 resultP
->X_op_symbol
= right
.X_add_symbol
;
1862 if (op_left
== O_add
)
1863 resultP
->X_add_number
+= right
.X_add_number
;
1864 else if (op_left
== O_subtract
)
1865 resultP
->X_add_number
-= right
.X_add_number
;
1869 /* The general case. */
1870 resultP
->X_add_symbol
= make_expr_symbol (resultP
);
1871 resultP
->X_op_symbol
= make_expr_symbol (&right
);
1872 resultP
->X_op
= op_left
;
1873 resultP
->X_add_number
= 0;
1874 resultP
->X_unsigned
= 1;
1878 } /* While next operator is >= this rank. */
1880 /* The PA port needs this information. */
1881 if (resultP
->X_add_symbol
)
1882 symbol_mark_used (resultP
->X_add_symbol
);
1884 return resultP
->X_op
== O_constant
? absolute_section
: retval
;
1887 /* This lives here because it belongs equally in expr.c & read.c.
1888 expr.c is just a branch office read.c anyway, and putting it
1889 here lessens the crowd at read.c.
1891 Assume input_line_pointer is at start of symbol name.
1892 Advance input_line_pointer past symbol name.
1893 Turn that character into a '\0', returning its former value.
1894 This allows a string compare (RMS wants symbol names to be strings)
1896 There will always be a char following symbol name, because all good
1897 lines end in end-of-line. */
1904 /* We accept \001 in a name in case this is being called with a
1905 constructed string. */
1906 if (is_name_beginner (c
= *input_line_pointer
++) || c
== '\001')
1908 while (is_part_of_name (c
= *input_line_pointer
++)
1911 if (is_name_ender (c
))
1912 c
= *input_line_pointer
++;
1914 *--input_line_pointer
= 0;
1919 get_single_number ()
1923 return exp
.X_add_number
;