/* tc-i370.c -- Assembler for the IBM 360/370/390 instruction set.
Loosely based on the ppc files by Linas Vepstas <linas@linas.org> 1998, 99
- Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
if (name[0] == '%' && isalpha (name[1]))
name = ++input_line_pointer;
while (' ' == *name)
name = ++input_line_pointer;
- /* if its a number, treat it as a number */
- /* if its alpha, look to see if it's in the register table */
+ /* If it's a number, treat it as a number. If it's alpha, look to
+ see if it's in the register table. */
if (!isalpha (name[0]))
{
- reg_number = get_single_number();
- c = get_symbol_end ();
+ reg_number = get_single_number ();
}
else
{
c = get_symbol_end ();
reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name);
+
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
}
- /* if numeric, make sure its not out of bounds */
+ /* If numeric, make sure its not out of bounds. */
if ((0 <= reg_number) && (16 >= reg_number))
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *input_line_pointer = c; /* put back the delimiting char */
return true;
}
- /* reset the line as if we had not done anything */
- *input_line_pointer = c; /* put back the delimiting char */
- input_line_pointer = start; /* reset input_line pointer */
- return false;
+ /* Reset the line as if we had not done anything. */
+ input_line_pointer = start;
+ return false;
}
\f
/* Local variables. */
/* Pseudo op to make file scope bss items */
static void
-i370_elf_lcomm(unused)
+i370_elf_lcomm (unused)
int unused;
{
register char *name;
/* start a new pool, if necessary */
if (8 == sz && NULL == longlong_poolP)
- longlong_poolP = symbol_make_empty();
+ longlong_poolP = symbol_make_empty ();
else if (4 == sz && NULL == word_poolP)
- word_poolP = symbol_make_empty();
+ word_poolP = symbol_make_empty ();
else if (2 == sz && NULL == short_poolP)
- short_poolP = symbol_make_empty();
+ short_poolP = symbol_make_empty ();
else if (1 == sz && NULL == byte_poolP)
- byte_poolP = symbol_make_empty();
+ byte_poolP = symbol_make_empty ();
/* Check if this literal value is already in the pool: */
/* hack alert -- we should probably be checking expressions
{
if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE)
{
- as_bad("Literal Pool Overflow");
+ as_bad ("Literal Pool Overflow");
}
literals[next_literal_pool_place].exp = *exx;
S_SET_SEGMENT (symbolP, segment);
S_SET_VALUE (symbolP, valu);
- symbol_clear_list_pointers(symbolP);
+ symbol_clear_list_pointers (symbolP);
symbol_set_frag (symbolP, frag);
lab = input_line_pointer;
while (*lab && (',' != *lab) && ('(' != *lab))
{
- if (isdigit(*lab))
+ if (isdigit (*lab))
{
all_digits = 1;
}
- else if (isalpha(*lab))
+ else if (isalpha (*lab))
{
if (!all_digits)
{
save = input_line_pointer;
while (*save)
{
- if (isxdigit(*save))
+ if (isxdigit (*save))
hex_len++;
save++;
}
*/
if (literals[lit_count].sym_name)
{
- symbolS * symP = symbol_make_empty();
+ symbolS * symP = symbol_make_empty ();
symbol_locate (symP, literals[lit_count].sym_name, now_seg,
(valueT) frag_now_fix (), frag_now);
symbol_table_insert (symP);
/* We have no need to default values of symbols. */
-/*ARGSUSED*/
symbolS *
md_undefined_symbol (name)
char *name;
default:
fprintf (stderr,
"Gas failure, reloc value %d\n", fixp->fx_r_type);
- fflush(stderr);
+ fflush (stderr);
abort ();
}
}