/* tc-tilegx.c -- Assemble for a Tile-Gx chip.
- Copyright 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
insert_operand (tilegx_bundle_bits bits,
const struct tilegx_operand *operand,
int operand_value,
- char *file,
+ const char *file,
unsigned lineno)
{
/* Range-check the immediate. */
static int
-apply_special_operator (operatorT op, offsetT num, char *file, unsigned lineno)
+apply_special_operator (operatorT op, offsetT num, const char *file,
+ unsigned lineno)
{
int ret;
int check_shift = -1;
static void
parse_reg_expression (expressionS* expression)
{
+ char *regname;
+ char terminating_char;
+ void *pval;
+ int regno_and_flags;
+ int regno;
+
/* Zero everything to make sure we don't miss any flags. */
memset (expression, 0, sizeof *expression);
- char* regname = input_line_pointer;
- char terminating_char = get_symbol_end ();
-
- void* pval = hash_find (main_reg_hash, regname);
+ terminating_char = get_symbol_name (®name);
+ pval = hash_find (main_reg_hash, regname);
if (pval == NULL)
- {
- as_bad (_("Expected register, got '%s'."), regname);
- }
+ as_bad (_("Expected register, got '%s'."), regname);
- int regno_and_flags = (int)(size_t)pval;
- int regno = EXTRACT_REGNO(regno_and_flags);
+ regno_and_flags = (int)(size_t)pval;
+ regno = EXTRACT_REGNO(regno_and_flags);
if ((regno_and_flags & NONCANONICAL_REG_NAME_FLAG)
&& require_canonical_reg_names)
- {
- as_warn (_("Found use of non-canonical register name %s; "
- "use %s instead."),
- regname,
- tilegx_register_names[regno]);
- }
+ as_warn (_("Found use of non-canonical register name %s; "
+ "use %s instead."),
+ regname, tilegx_register_names[regno]);
/* Restore the old character following the register name. */
- *input_line_pointer = terminating_char;
+ (void) restore_line_pointer (terminating_char);
/* Fill in the expression fields to indicate it's a register. */
expression->X_op = O_register;
LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
int prec;