projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MIPS16/GAS: Fix absolute references with PC-relative synthetic instructions
[deliverable/binutils-gdb.git]
/
gas
/
app.c
diff --git
a/gas/app.c
b/gas/app.c
index 372b9b6cef5b873869aa30321a56f02ebf147598..9f4610cb57496a76d9d7b050a132e44bb13ac176 100644
(file)
--- a/
gas/app.c
+++ b/
gas/app.c
@@
-1,7
+1,5
@@
/* This is the Assembler Pre-Processor
/* This is the Assembler Pre-Processor
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 1987-2017 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
This file is part of GAS, the GNU Assembler.
@@
-160,7
+158,10
@@
do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
for (p = line_comment_chars; *p; p++)
lex[(unsigned char) *p] = LEX_IS_LINE_COMMENT_START;
for (p = line_comment_chars; *p; p++)
lex[(unsigned char) *p] = LEX_IS_LINE_COMMENT_START;
- for (p = line_separator_chars; *p; p++)
+#ifndef tc_line_separator_chars
+#define tc_line_separator_chars line_separator_chars
+#endif
+ for (p = tc_line_separator_chars; *p; p++)
lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR;
#ifdef tc_parallel_separator_chars
lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR;
#ifdef tc_parallel_separator_chars
@@
-210,7
+211,7
@@
do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
/* Saved state of the scrubber. */
static int state;
static int old_state;
/* Saved state of the scrubber. */
static int state;
static int old_state;
-static char *out_string;
+static c
onst c
har *out_string;
static char out_buf[20];
static int add_newlines;
static char *saved_input;
static char out_buf[20];
static int add_newlines;
static char *saved_input;
@@
-228,7
+229,7
@@
struct app_save
{
int state;
int old_state;
{
int state;
int old_state;
- c
har *
out_string;
+ c
onst char *
out_string;
char out_buf[sizeof (out_buf)];
int add_newlines;
char * saved_input;
char out_buf[sizeof (out_buf)];
int add_newlines;
char * saved_input;
@@
-246,9
+247,9
@@
struct app_save
char *
app_push (void)
{
char *
app_push (void)
{
-
register
struct app_save *saved;
+ struct app_save *saved;
- saved =
(struct app_save *) xmalloc (sizeof (*saved)
);
+ saved =
XNEW (struct app_save
);
saved->state = state;
saved->old_state = old_state;
saved->out_string = out_string;
saved->state = state;
saved->old_state = old_state;
saved->out_string = out_string;
@@
-258,7
+259,7
@@
app_push (void)
saved->saved_input = NULL;
else
{
saved->saved_input = NULL;
else
{
- saved->saved_input =
(char *) xmalloc (
saved_input_len);
+ saved->saved_input =
XNEWVEC (char,
saved_input_len);
memcpy (saved->saved_input, saved_input, saved_input_len);
saved->saved_input_len = saved_input_len;
}
memcpy (saved->saved_input, saved_input, saved_input_len);
saved->saved_input_len = saved_input_len;
}
@@
-283,7
+284,7
@@
app_push (void)
void
app_pop (char *arg)
{
void
app_pop (char *arg)
{
-
register
struct app_save *saved = (struct app_save *) arg;
+ struct app_save *saved = (struct app_save *) arg;
/* There is no do_scrub_end (). */
state = saved->state;
/* There is no do_scrub_end (). */
state = saved->state;
@@
-359,7
+360,7
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
char *from;
char *fromend;
size_t fromlen;
char *from;
char *fromend;
size_t fromlen;
-
register
int ch, ch2 = 0;
+ int ch, ch2 = 0;
/* Character that started the string we're working on. */
static char quotechar;
/* Character that started the string we're working on. */
static char quotechar;
@@
-684,7
+685,7
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
case 16:
/* We have seen an 'a' at the start of a symbol, look for an 'f'. */
ch = GET ();
case 16:
/* We have seen an 'a' at the start of a symbol, look for an 'f'. */
ch = GET ();
- if (ch == 'f' || ch == 'F')
+ if (ch == 'f' || ch == 'F')
{
state = 17;
PUT (ch);
{
state = 17;
PUT (ch);
@@
-694,6
+695,7
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
state = 9;
break;
}
state = 9;
break;
}
+ /* Fall through. */
case 17:
/* We have seen "af" at the start of a symbol,
a ' here is a part of that symbol. */
case 17:
/* We have seen "af" at the start of a symbol,
a ' here is a part of that symbol. */
@@
-1186,7
+1188,7
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
state = -2;
break;
}
state = -2;
break;
}
- else
+ else
if (ch2 != EOF)
{
UNGET (ch2);
}
{
UNGET (ch2);
}
@@
-1217,9
+1219,16
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
while (ch != EOF && !IS_NEWLINE (ch))
ch = GET ();
if (ch == EOF)
while (ch != EOF && !IS_NEWLINE (ch))
ch = GET ();
if (ch == EOF)
- as_warn (_("end of file in comment; newline inserted"));
+ {
+ as_warn (_("end of file in comment; newline inserted"));
+ PUT ('\n');
+ }
+ else /* IS_NEWLINE (ch) */
+ {
+ /* To process non-zero add_newlines. */
+ UNGET (ch);
+ }
state = 0;
state = 0;
- PUT ('\n');
break;
}
/* Looks like `# 123 "filename"' from cpp. */
break;
}
/* Looks like `# 123 "filename"' from cpp. */
@@
-1283,7
+1292,7
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
#ifdef WARN_COMMENTS
if (!found_comment)
#ifdef WARN_COMMENTS
if (!found_comment)
-
as_where (&found_comment_file,
&found_comment);
+
found_comment_file = as_where (
&found_comment);
#endif
do
{
#endif
do
{
@@
-1313,8
+1322,8
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
else
UNGET (quot);
}
else
UNGET (quot);
}
- /* FALL THROUGH */
#endif
#endif
+ /* Fall through. */
case LEX_IS_SYMBOL_COMPONENT:
if (state == 10)
case LEX_IS_SYMBOL_COMPONENT:
if (state == 10)
@@
-1330,12
+1339,12
@@
do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
#ifdef TC_Z80
/* "af'" is a symbol containing '\''. */
#ifdef TC_Z80
/* "af'" is a symbol containing '\''. */
- if (state == 3 && (ch == 'a' || ch == 'A'))
+ if (state == 3 && (ch == 'a' || ch == 'A'))
{
state = 16;
PUT (ch);
ch = GET ();
{
state = 16;
PUT (ch);
ch = GET ();
- if (ch == 'f' || ch == 'F')
+ if (ch == 'f' || ch == 'F')
{
state = 17;
PUT (ch);
{
state = 17;
PUT (ch);
This page took
0.035481 seconds
and
4
git commands to generate.