Commit 1dd4da14 authored by Elias Naur's avatar Elias Naur Committed by Ian Lance Taylor

liblink, cmd/5a, cmd/5l: restore cgo on older ARM processors

CL 56120043 fixed TLS handling on ARM after the introduction of
liblink but left older ARM processors broken.

Before liblink, the MRC instruction was replaced with a fallback
on older ARMs. CL 56120043 removed that, because the rewrite matched
bit patterns on the AWORD pseudo-instruction and could therefore change
unrelated AWORDs that happened to match.

This CL adds an AMRC instruction to encode both MRC and MCR previously
encoded as AWORDs. Then, in liblink, the AMRC instructions are either
rewritten to AWORD, or, on goarm < 7, replaced with a branch to the
fallback.

./all.bash completes successfully on an ARMv7 with either GOARM=7 or
GOARM=5. I have verified that the fallback is indeed present in both
runtime.save_gm and runtime.load_gm when GOARM=5 but not when GOARM=7.

If all goes well, this should fix the armv5 builders.

LGTM=iant
R=iant, rsc
CC=golang-codereviews
https://golang.org/cl/55540044
parent e6d8bfe2
......@@ -294,7 +294,7 @@ inst:
(($11 & 15) << 0) | /* Crm */
(($12 & 7) << 5) | /* coprocessor information */
(1<<4); /* must be set */
outcode(AWORD, Always, &nullgen, NREG, &g);
outcode(AMRC, Always, &nullgen, NREG, &g);
}
/*
* MULL r1,r2,(hi,lo)
......
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
......@@ -29,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
......@@ -47,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.3"
#define YYBISON_VERSION "2.7.12-4996"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
......@@ -55,10 +52,55 @@
/* Pure parsers. */
#define YYPURE 0
/* Using locations. */
#define YYLSP_NEEDED 0
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Copy the first part of user declarations. */
/* Line 371 of yacc.c */
#line 31 "a.y"
#include <u.h>
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
#include <libc.h>
#include "a.h"
#include "../../pkg/runtime/funcdata.h"
/* Line 371 of yacc.c */
#line 76 "y.tab.c"
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr
# else
# define YY_NULL 0
# endif
# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* In a future release of Bison, this section will be replaced
by #include "y.tab.h". */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
......@@ -168,60 +210,49 @@
/* Copy the first part of user declarations. */
#line 31 "a.y"
#include <u.h>
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
#include <libc.h>
#include "a.h"
#include "../../pkg/runtime/funcdata.h"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 39 "a.y"
{
/* Line 387 of yacc.c */
#line 39 "a.y"
Sym *sym;
int32 lval;
double dval;
char sval[8];
Addr addr;
}
/* Line 193 of yacc.c. */
#line 212 "y.tab.c"
YYSTYPE;
/* Line 387 of yacc.c */
#line 228 "y.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE yylval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_Y_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
/* Line 216 of yacc.c. */
#line 225 "y.tab.c"
/* Line 390 of yacc.c */
#line 256 "y.tab.c"
#ifdef short
# undef short
......@@ -274,36 +305,45 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# define YY_(Msgid) Msgid
# endif
#endif
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if (! defined __GNUC__ || __GNUC__ < 2 \
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
# define __attribute__(Spec) /* empty */
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(e) /* empty */
# define YYUSE(E) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
# define YYID(n) (n)
# define YYID(N) (N)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
YYID (int yyi)
#else
static int
YYID (i)
int i;
YYID (yyi)
int yyi;
#endif
{
return i;
return yyi;
}
#endif
......@@ -324,11 +364,12 @@ YYID (i)
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# endif
......@@ -351,24 +392,24 @@ YYID (i)
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus && ! defined _STDLIB_H \
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
......@@ -384,9 +425,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yytype_int16 yyss;
YYSTYPE yyvs;
};
yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
......@@ -397,35 +438,19 @@ union yyalloc
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
......@@ -433,6 +458,26 @@ union yyalloc
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (YYID (0))
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
......@@ -589,7 +634,7 @@ static const yytype_uint16 yyrline[] =
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
......@@ -602,11 +647,11 @@ static const char *const yytname[] =
"LSP", "LSB", "LFP", "LPC", "LTYPEX", "LTYPEPC", "LTYPEF", "LR", "LREG",
"LF", "LFREG", "LC", "LCREG", "LPSR", "LFCR", "LCOND", "LS", "LAT",
"LFCONST", "LSCONST", "LNAME", "LLAB", "LVAR", "':'", "'='", "';'",
"','", "'['", "']'", "'('", "')'", "'$'", "'~'", "$accept", "prog", "@1",
"line", "@2", "@3", "inst", "cond", "comma", "rel", "ximm", "fcon",
"reglist", "gen", "nireg", "ireg", "ioreg", "oreg", "imsr", "imm", "reg",
"regreg", "shift", "rcon", "sreg", "spreg", "creg", "frcon", "freg",
"name", "offset", "pointer", "con", "oexpr", "expr", 0
"','", "'['", "']'", "'('", "')'", "'$'", "'~'", "$accept", "prog",
"$@1", "line", "$@2", "$@3", "inst", "cond", "comma", "rel", "ximm",
"fcon", "reglist", "gen", "nireg", "ireg", "ioreg", "oreg", "imsr",
"imm", "reg", "regreg", "shift", "rcon", "sreg", "spreg", "creg",
"frcon", "freg", "name", "offset", "pointer", "con", "oexpr", "expr", YY_NULL
};
#endif
......@@ -664,8 +709,8 @@ static const yytype_uint8 yyr2[] =
4, 3, 3, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
......@@ -766,8 +811,7 @@ static const yytype_int16 yypgoto[] =
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -64
static const yytype_int16 yytable[] =
{
......@@ -834,6 +878,12 @@ static const yytype_int16 yytable[] =
202, 203, 204, 198, 199, 200, 201, 202, 203, 204
};
#define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-128)))
#define yytable_value_is_error(Yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] =
{
28, 29, 45, 60, 0, 132, 27, 15, 16, 37,
......@@ -951,78 +1001,50 @@ static const yytype_uint8 yystos[] =
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
Once GCC version 2 has supplanted version 1, this can go. However,
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
discussed. */
#define YYFAIL goto yyerrlab
#if defined YYFAIL
/* This is here to suppress warnings from the GCC cpp's
-Wunused-macros. Normally we don't worry about that warning, but
some users do, and we want to make it easy for users to remove
YYFAIL uses, which will produce warnings from Bison 2.5. */
#endif
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
/* Error token number */
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#endif
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
/* This macro is provided for backward compatibility. */
#ifndef YY_LOCATION_PRINT
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
......@@ -1072,6 +1094,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
YYSTYPE const * const yyvaluep;
#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
if (!yyvaluep)
return;
# ifdef YYPRINT
......@@ -1080,11 +1104,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
# else
YYUSE (yyoutput);
# endif
switch (yytype)
{
default:
break;
}
YYUSE (yytype);
}
......@@ -1121,17 +1141,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
yy_stack_print (bottom, top)
yytype_int16 *bottom;
yytype_int16 *top;
yy_stack_print (yybottom, yytop)
yytype_int16 *yybottom;
yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
for (; yybottom <= yytop; yybottom++)
{
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
YYFPRINTF (stderr, "\n");
}
......@@ -1165,11 +1188,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
fprintf (stderr, " $%d = ", yyi + 1);
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
fprintf (stderr, "\n");
YYFPRINTF (stderr, "\n");
}
}
......@@ -1206,7 +1229,6 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
#if YYERROR_VERBOSE
......@@ -1309,115 +1331,145 @@ yytnamerr (char *yyres, const char *yystr)
}
# endif
/* Copy into YYRESULT an error message about the unexpected token
YYCHAR while in state YYSTATE. Return the number of bytes copied,
including the terminating null byte. If YYRESULT is null, do not
copy anything; just return the number of bytes that would be
copied. As a special case, return 0 if an ordinary "syntax error"
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
size calculation. */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
{
int yyn = yypact[yystate];
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
about the unexpected token YYTOKEN for the state stack whose top is
YYSSP.
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
return 0;
else
{
int yytype = YYTRANSLATE (yychar);
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx;
# if 0
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s");
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
char *yyfmt;
char const *yyf;
static char const yyunexpected[] = "syntax error, unexpected %s";
static char const yyexpecting[] = ", expecting %s";
static char const yyor[] = " or %s";
char yyformat[sizeof yyunexpected
+ sizeof yyexpecting - 1
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
* (sizeof yyor - 1))];
char const *yyprefix = yyexpecting;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 1;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
}
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
not large enough to hold the message. In that case, also set
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
required number of bytes is too large to store. */
static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULL;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
"expected"). */
int yycount = 0;
/* There are many possibilities here to consider:
- Assume YYFAIL is not used. It's too flawed to consider. See
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
for details. YYERROR is fine as it does not invoke this
function.
- If this state is a consistent state with a default action, then
the only way this function was invoked is if the default action
is an error action. In that case, don't check for expected
tokens because there are none.
- The only way there can be no lookahead present (in yychar) is if
this state is a consistent state with a default action. Thus,
detecting the absence of a lookahead is sufficient to determine
that there is no unexpected or expected token to report. In that
case, just report a simple "syntax error".
- Don't assume there isn't a lookahead just because this state is a
consistent state with a default action. There might have been a
previous inconsistent state, consistent state with a non-default
action, or user semantic action that manipulated yychar.
- Of course, the expected token list depends on states to have
correct lookahead information, and it depends on the parser not
to perform extra reductions after fetching a lookahead from the
scanner and before detecting a syntax error. Thus, state merging
(from LALR or IELR) and default reductions corrupt the expected
token list. However, the list is correct for canonical LR with
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
if (yytoken != YYEMPTY)
{
int yyn = yypact[*yyssp];
yyarg[yycount++] = yytname[yytoken];
if (!yypact_value_is_default (yyn))
{
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. In other words, skip the first -YYN actions for
this state because they are default actions. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yyx;
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
&& !yytable_value_is_error (yytable[yyx + yyn]))
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
break;
}
yyarg[yycount++] = yytname[yyx];
{
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
}
}
}
yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
switch (yycount)
{
# define YYCASE_(N, S) \
case N: \
yyformat = S; \
break
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
# undef YYCASE_
}
if (yysize_overflow)
return YYSIZE_MAXIMUM;
{
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
yysize = yysize1;
}
if (yyresult)
{
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
char *yyp = yyresult;
int yyi = 0;
while ((*yyp = *yyf) != '\0')
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
}
}
}
return yysize;
if (*yymsg_alloc < yysize)
{
*yymsg_alloc = 2 * yysize;
if (! (yysize <= *yymsg_alloc
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
return 1;
}
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
{
char *yyp = *yymsg;
int yyi = 0;
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
}
else
{
yyp++;
yyformat++;
}
}
return 0;
}
#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
......@@ -1442,44 +1494,31 @@ yydestruct (yymsg, yytype, yyvaluep)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
break;
}
YYUSE (yytype);
}
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/* The look-ahead symbol. */
/* The lookahead symbol. */
int yychar;
/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
/*----------.
| yyparse. |
`----------*/
......@@ -1506,14 +1545,37 @@ yyparse ()
#endif
#endif
{
int yystate;
int yystate;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* The stacks and their tools:
`yyss': related to states.
`yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs;
YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
/* Lookahead token as an internal (translated) token number. */
int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
......@@ -1521,54 +1583,22 @@ yyparse ()
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
yyssp = yyss = yyssa;
yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
yychar = YYEMPTY; /* Cause a token to be read. */
goto yysetstate;
/*------------------------------------------------------------.
......@@ -1595,7 +1625,6 @@ yyparse ()
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
......@@ -1603,7 +1632,6 @@ yyparse ()
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
yyss = yyss1;
......@@ -1626,9 +1654,8 @@ yyparse ()
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
......@@ -1639,7 +1666,6 @@ yyparse ()
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
......@@ -1649,6 +1675,9 @@ yyparse ()
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
/*-----------.
......@@ -1657,16 +1686,16 @@ yyparse ()
yybackup:
/* Do appropriate processing given the current state. Read a
look-ahead token if we need one and don't already have one. */
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to look-ahead token. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a look-ahead token if don't already have one. */
/* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
......@@ -1692,29 +1721,27 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
if (yytable_value_is_error (yyn))
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the look-ahead token. */
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
/* Discard the shifted token. */
yychar = YYEMPTY;
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
......@@ -1751,6 +1778,7 @@ yyreduce:
switch (yyn)
{
case 3:
/* Line 1787 of yacc.c */
#line 70 "a.y"
{
stmtline = lineno;
......@@ -1758,6 +1786,7 @@ yyreduce:
break;
case 5:
/* Line 1787 of yacc.c */
#line 77 "a.y"
{
if((yyvsp[(1) - (2)].sym)->value != pc)
......@@ -1767,6 +1796,7 @@ yyreduce:
break;
case 7:
/* Line 1787 of yacc.c */
#line 84 "a.y"
{
(yyvsp[(1) - (2)].sym)->type = LLAB;
......@@ -1775,6 +1805,7 @@ yyreduce:
break;
case 9:
/* Line 1787 of yacc.c */
#line 90 "a.y"
{
(yyvsp[(1) - (4)].sym)->type = LVAR;
......@@ -1783,6 +1814,7 @@ yyreduce:
break;
case 10:
/* Line 1787 of yacc.c */
#line 95 "a.y"
{
if((yyvsp[(1) - (4)].sym)->value != (yyvsp[(3) - (4)].lval))
......@@ -1792,6 +1824,7 @@ yyreduce:
break;
case 14:
/* Line 1787 of yacc.c */
#line 109 "a.y"
{
outcode((yyvsp[(1) - (7)].lval), (yyvsp[(2) - (7)].lval), &(yyvsp[(3) - (7)].addr), (yyvsp[(5) - (7)].lval), &(yyvsp[(7) - (7)].addr));
......@@ -1799,6 +1832,7 @@ yyreduce:
break;
case 15:
/* Line 1787 of yacc.c */
#line 113 "a.y"
{
outcode((yyvsp[(1) - (6)].lval), (yyvsp[(2) - (6)].lval), &(yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].lval), &nullgen);
......@@ -1806,6 +1840,7 @@ yyreduce:
break;
case 16:
/* Line 1787 of yacc.c */
#line 117 "a.y"
{
outcode((yyvsp[(1) - (5)].lval), (yyvsp[(2) - (5)].lval), &(yyvsp[(3) - (5)].addr), NREG, &(yyvsp[(5) - (5)].addr));
......@@ -1813,6 +1848,7 @@ yyreduce:
break;
case 17:
/* Line 1787 of yacc.c */
#line 124 "a.y"
{
outcode((yyvsp[(1) - (5)].lval), (yyvsp[(2) - (5)].lval), &(yyvsp[(3) - (5)].addr), NREG, &(yyvsp[(5) - (5)].addr));
......@@ -1820,6 +1856,7 @@ yyreduce:
break;
case 18:
/* Line 1787 of yacc.c */
#line 131 "a.y"
{
outcode((yyvsp[(1) - (5)].lval), (yyvsp[(2) - (5)].lval), &(yyvsp[(3) - (5)].addr), NREG, &(yyvsp[(5) - (5)].addr));
......@@ -1827,6 +1864,7 @@ yyreduce:
break;
case 19:
/* Line 1787 of yacc.c */
#line 138 "a.y"
{
outcode((yyvsp[(1) - (4)].lval), (yyvsp[(2) - (4)].lval), &nullgen, NREG, &(yyvsp[(4) - (4)].addr));
......@@ -1834,6 +1872,7 @@ yyreduce:
break;
case 20:
/* Line 1787 of yacc.c */
#line 142 "a.y"
{
outcode((yyvsp[(1) - (4)].lval), (yyvsp[(2) - (4)].lval), &nullgen, NREG, &(yyvsp[(4) - (4)].addr));
......@@ -1841,6 +1880,7 @@ yyreduce:
break;
case 21:
/* Line 1787 of yacc.c */
#line 149 "a.y"
{
outcode((yyvsp[(1) - (3)].lval), Always, &nullgen, NREG, &(yyvsp[(3) - (3)].addr));
......@@ -1848,6 +1888,7 @@ yyreduce:
break;
case 22:
/* Line 1787 of yacc.c */
#line 156 "a.y"
{
outcode((yyvsp[(1) - (3)].lval), Always, &nullgen, NREG, &(yyvsp[(3) - (3)].addr));
......@@ -1855,6 +1896,7 @@ yyreduce:
break;
case 23:
/* Line 1787 of yacc.c */
#line 163 "a.y"
{
outcode((yyvsp[(1) - (4)].lval), (yyvsp[(2) - (4)].lval), &nullgen, NREG, &(yyvsp[(4) - (4)].addr));
......@@ -1862,6 +1904,7 @@ yyreduce:
break;
case 24:
/* Line 1787 of yacc.c */
#line 170 "a.y"
{
outcode((yyvsp[(1) - (6)].lval), (yyvsp[(2) - (6)].lval), &(yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].lval), &nullgen);
......@@ -1869,6 +1912,7 @@ yyreduce:
break;
case 25:
/* Line 1787 of yacc.c */
#line 177 "a.y"
{
Addr g;
......@@ -1881,6 +1925,7 @@ yyreduce:
break;
case 26:
/* Line 1787 of yacc.c */
#line 186 "a.y"
{
Addr g;
......@@ -1893,6 +1938,7 @@ yyreduce:
break;
case 27:
/* Line 1787 of yacc.c */
#line 198 "a.y"
{
outcode((yyvsp[(1) - (7)].lval), (yyvsp[(2) - (7)].lval), &(yyvsp[(5) - (7)].addr), (yyvsp[(3) - (7)].addr).reg, &(yyvsp[(7) - (7)].addr));
......@@ -1900,6 +1946,7 @@ yyreduce:
break;
case 28:
/* Line 1787 of yacc.c */
#line 202 "a.y"
{
outcode((yyvsp[(1) - (6)].lval), (yyvsp[(2) - (6)].lval), &(yyvsp[(5) - (6)].addr), (yyvsp[(3) - (6)].addr).reg, &(yyvsp[(3) - (6)].addr));
......@@ -1907,6 +1954,7 @@ yyreduce:
break;
case 29:
/* Line 1787 of yacc.c */
#line 206 "a.y"
{
outcode((yyvsp[(1) - (6)].lval), (yyvsp[(2) - (6)].lval), &(yyvsp[(4) - (6)].addr), (yyvsp[(6) - (6)].addr).reg, &(yyvsp[(6) - (6)].addr));
......@@ -1914,6 +1962,7 @@ yyreduce:
break;
case 30:
/* Line 1787 of yacc.c */
#line 213 "a.y"
{
outcode((yyvsp[(1) - (3)].lval), (yyvsp[(2) - (3)].lval), &nullgen, NREG, &nullgen);
......@@ -1921,6 +1970,7 @@ yyreduce:
break;
case 31:
/* Line 1787 of yacc.c */
#line 220 "a.y"
{
(yyvsp[(4) - (4)].addr).type = D_CONST2;
......@@ -1930,6 +1980,7 @@ yyreduce:
break;
case 32:
/* Line 1787 of yacc.c */
#line 226 "a.y"
{
(yyvsp[(6) - (6)].addr).type = D_CONST2;
......@@ -1939,6 +1990,7 @@ yyreduce:
break;
case 33:
/* Line 1787 of yacc.c */
#line 232 "a.y"
{
(yyvsp[(6) - (8)].addr).type = D_CONST2;
......@@ -1948,6 +2000,7 @@ yyreduce:
break;
case 34:
/* Line 1787 of yacc.c */
#line 241 "a.y"
{
outcode((yyvsp[(1) - (6)].lval), Always, &(yyvsp[(2) - (6)].addr), (yyvsp[(4) - (6)].lval), &(yyvsp[(6) - (6)].addr));
......@@ -1955,6 +2008,7 @@ yyreduce:
break;
case 35:
/* Line 1787 of yacc.c */
#line 248 "a.y"
{
outcode((yyvsp[(1) - (4)].lval), (yyvsp[(2) - (4)].lval), &(yyvsp[(3) - (4)].addr), NREG, &nullgen);
......@@ -1962,6 +2016,7 @@ yyreduce:
break;
case 36:
/* Line 1787 of yacc.c */
#line 255 "a.y"
{
outcode((yyvsp[(1) - (3)].lval), Always, &nullgen, NREG, &(yyvsp[(3) - (3)].addr));
......@@ -1969,6 +2024,7 @@ yyreduce:
break;
case 37:
/* Line 1787 of yacc.c */
#line 262 "a.y"
{
outcode((yyvsp[(1) - (5)].lval), (yyvsp[(2) - (5)].lval), &(yyvsp[(3) - (5)].addr), NREG, &(yyvsp[(5) - (5)].addr));
......@@ -1976,6 +2032,7 @@ yyreduce:
break;
case 38:
/* Line 1787 of yacc.c */
#line 266 "a.y"
{
outcode((yyvsp[(1) - (5)].lval), (yyvsp[(2) - (5)].lval), &(yyvsp[(3) - (5)].addr), NREG, &(yyvsp[(5) - (5)].addr));
......@@ -1983,6 +2040,7 @@ yyreduce:
break;
case 39:
/* Line 1787 of yacc.c */
#line 270 "a.y"
{
outcode((yyvsp[(1) - (7)].lval), (yyvsp[(2) - (7)].lval), &(yyvsp[(3) - (7)].addr), (yyvsp[(5) - (7)].lval), &(yyvsp[(7) - (7)].addr));
......@@ -1990,6 +2048,7 @@ yyreduce:
break;
case 40:
/* Line 1787 of yacc.c */
#line 274 "a.y"
{
outcode((yyvsp[(1) - (6)].lval), (yyvsp[(2) - (6)].lval), &(yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].addr).reg, &nullgen);
......@@ -1997,6 +2056,7 @@ yyreduce:
break;
case 41:
/* Line 1787 of yacc.c */
#line 281 "a.y"
{
Addr g;
......@@ -2014,11 +2074,12 @@ yyreduce:
(((yyvsp[(11) - (12)].lval) & 15) << 0) | /* Crm */
(((yyvsp[(12) - (12)].lval) & 7) << 5) | /* coprocessor information */
(1<<4); /* must be set */
outcode(AWORD, Always, &nullgen, NREG, &g);
outcode(AMRC, Always, &nullgen, NREG, &g);
}
break;
case 42:
/* Line 1787 of yacc.c */
#line 303 "a.y"
{
outcode((yyvsp[(1) - (7)].lval), (yyvsp[(2) - (7)].lval), &(yyvsp[(3) - (7)].addr), (yyvsp[(5) - (7)].addr).reg, &(yyvsp[(7) - (7)].addr));
......@@ -2026,6 +2087,7 @@ yyreduce:
break;
case 43:
/* Line 1787 of yacc.c */
#line 311 "a.y"
{
(yyvsp[(7) - (9)].addr).type = D_REGREG2;
......@@ -2035,6 +2097,7 @@ yyreduce:
break;
case 44:
/* Line 1787 of yacc.c */
#line 320 "a.y"
{
outcode((yyvsp[(1) - (2)].lval), Always, &(yyvsp[(2) - (2)].addr), NREG, &nullgen);
......@@ -2042,6 +2105,7 @@ yyreduce:
break;
case 45:
/* Line 1787 of yacc.c */
#line 327 "a.y"
{
if((yyvsp[(2) - (4)].addr).type != D_CONST || (yyvsp[(4) - (4)].addr).type != D_CONST)
......@@ -2051,6 +2115,7 @@ yyreduce:
break;
case 46:
/* Line 1787 of yacc.c */
#line 336 "a.y"
{
if((yyvsp[(2) - (4)].addr).type != D_CONST)
......@@ -2062,6 +2127,7 @@ yyreduce:
break;
case 47:
/* Line 1787 of yacc.c */
#line 347 "a.y"
{
outcode((yyvsp[(1) - (2)].lval), Always, &nullgen, NREG, &nullgen);
......@@ -2069,6 +2135,7 @@ yyreduce:
break;
case 48:
/* Line 1787 of yacc.c */
#line 352 "a.y"
{
(yyval.lval) = Always;
......@@ -2076,6 +2143,7 @@ yyreduce:
break;
case 49:
/* Line 1787 of yacc.c */
#line 356 "a.y"
{
(yyval.lval) = ((yyvsp[(1) - (2)].lval) & ~C_SCOND) | (yyvsp[(2) - (2)].lval);
......@@ -2083,6 +2151,7 @@ yyreduce:
break;
case 50:
/* Line 1787 of yacc.c */
#line 360 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (2)].lval) | (yyvsp[(2) - (2)].lval);
......@@ -2090,6 +2159,7 @@ yyreduce:
break;
case 53:
/* Line 1787 of yacc.c */
#line 369 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2099,6 +2169,7 @@ yyreduce:
break;
case 54:
/* Line 1787 of yacc.c */
#line 375 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2110,6 +2181,7 @@ yyreduce:
break;
case 55:
/* Line 1787 of yacc.c */
#line 383 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2119,6 +2191,7 @@ yyreduce:
break;
case 56:
/* Line 1787 of yacc.c */
#line 390 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2128,6 +2201,7 @@ yyreduce:
break;
case 57:
/* Line 1787 of yacc.c */
#line 396 "a.y"
{
(yyval.addr) = (yyvsp[(2) - (2)].addr);
......@@ -2136,6 +2210,7 @@ yyreduce:
break;
case 58:
/* Line 1787 of yacc.c */
#line 401 "a.y"
{
(yyval.addr) = (yyvsp[(4) - (4)].addr);
......@@ -2144,6 +2219,7 @@ yyreduce:
break;
case 59:
/* Line 1787 of yacc.c */
#line 406 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2153,6 +2229,7 @@ yyreduce:
break;
case 61:
/* Line 1787 of yacc.c */
#line 415 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2162,6 +2239,7 @@ yyreduce:
break;
case 62:
/* Line 1787 of yacc.c */
#line 421 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2171,6 +2249,7 @@ yyreduce:
break;
case 63:
/* Line 1787 of yacc.c */
#line 429 "a.y"
{
(yyval.lval) = 1 << (yyvsp[(1) - (1)].lval);
......@@ -2178,6 +2257,7 @@ yyreduce:
break;
case 64:
/* Line 1787 of yacc.c */
#line 433 "a.y"
{
int i;
......@@ -2190,6 +2270,7 @@ yyreduce:
break;
case 65:
/* Line 1787 of yacc.c */
#line 442 "a.y"
{
(yyval.lval) = (1<<(yyvsp[(1) - (3)].lval)) | (yyvsp[(3) - (3)].lval);
......@@ -2197,6 +2278,7 @@ yyreduce:
break;
case 69:
/* Line 1787 of yacc.c */
#line 451 "a.y"
{
(yyval.addr) = (yyvsp[(1) - (4)].addr);
......@@ -2205,6 +2287,7 @@ yyreduce:
break;
case 70:
/* Line 1787 of yacc.c */
#line 456 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2214,6 +2297,7 @@ yyreduce:
break;
case 71:
/* Line 1787 of yacc.c */
#line 462 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2223,6 +2307,7 @@ yyreduce:
break;
case 72:
/* Line 1787 of yacc.c */
#line 468 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2232,6 +2317,7 @@ yyreduce:
break;
case 76:
/* Line 1787 of yacc.c */
#line 479 "a.y"
{
(yyval.addr) = (yyvsp[(1) - (1)].addr);
......@@ -2241,6 +2327,7 @@ yyreduce:
break;
case 77:
/* Line 1787 of yacc.c */
#line 487 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2251,6 +2338,7 @@ yyreduce:
break;
case 79:
/* Line 1787 of yacc.c */
#line 497 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2261,6 +2349,7 @@ yyreduce:
break;
case 81:
/* Line 1787 of yacc.c */
#line 507 "a.y"
{
(yyval.addr) = (yyvsp[(1) - (4)].addr);
......@@ -2270,6 +2359,7 @@ yyreduce:
break;
case 86:
/* Line 1787 of yacc.c */
#line 520 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2279,6 +2369,7 @@ yyreduce:
break;
case 87:
/* Line 1787 of yacc.c */
#line 528 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2288,6 +2379,7 @@ yyreduce:
break;
case 88:
/* Line 1787 of yacc.c */
#line 536 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2298,6 +2390,7 @@ yyreduce:
break;
case 89:
/* Line 1787 of yacc.c */
#line 545 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2307,6 +2400,7 @@ yyreduce:
break;
case 90:
/* Line 1787 of yacc.c */
#line 551 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2316,6 +2410,7 @@ yyreduce:
break;
case 91:
/* Line 1787 of yacc.c */
#line 557 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2325,6 +2420,7 @@ yyreduce:
break;
case 92:
/* Line 1787 of yacc.c */
#line 563 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2334,6 +2430,7 @@ yyreduce:
break;
case 93:
/* Line 1787 of yacc.c */
#line 571 "a.y"
{
if((yyval.lval) < 0 || (yyval.lval) >= 16)
......@@ -2343,6 +2440,7 @@ yyreduce:
break;
case 94:
/* Line 1787 of yacc.c */
#line 577 "a.y"
{
if((yyval.lval) < 0 || (yyval.lval) >= 32)
......@@ -2352,6 +2450,7 @@ yyreduce:
break;
case 96:
/* Line 1787 of yacc.c */
#line 586 "a.y"
{
(yyval.lval) = REGPC;
......@@ -2359,6 +2458,7 @@ yyreduce:
break;
case 97:
/* Line 1787 of yacc.c */
#line 590 "a.y"
{
if((yyvsp[(3) - (4)].lval) < 0 || (yyvsp[(3) - (4)].lval) >= NREG)
......@@ -2368,6 +2468,7 @@ yyreduce:
break;
case 99:
/* Line 1787 of yacc.c */
#line 599 "a.y"
{
(yyval.lval) = REGSP;
......@@ -2375,6 +2476,7 @@ yyreduce:
break;
case 101:
/* Line 1787 of yacc.c */
#line 606 "a.y"
{
if((yyvsp[(3) - (4)].lval) < 0 || (yyvsp[(3) - (4)].lval) >= NREG)
......@@ -2384,6 +2486,7 @@ yyreduce:
break;
case 104:
/* Line 1787 of yacc.c */
#line 618 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2393,6 +2496,7 @@ yyreduce:
break;
case 105:
/* Line 1787 of yacc.c */
#line 624 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2402,6 +2506,7 @@ yyreduce:
break;
case 106:
/* Line 1787 of yacc.c */
#line 632 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2413,6 +2518,7 @@ yyreduce:
break;
case 107:
/* Line 1787 of yacc.c */
#line 640 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2424,6 +2530,7 @@ yyreduce:
break;
case 108:
/* Line 1787 of yacc.c */
#line 648 "a.y"
{
(yyval.addr) = nullgen;
......@@ -2435,6 +2542,7 @@ yyreduce:
break;
case 109:
/* Line 1787 of yacc.c */
#line 657 "a.y"
{
(yyval.lval) = 0;
......@@ -2442,6 +2550,7 @@ yyreduce:
break;
case 110:
/* Line 1787 of yacc.c */
#line 661 "a.y"
{
(yyval.lval) = (yyvsp[(2) - (2)].lval);
......@@ -2449,6 +2558,7 @@ yyreduce:
break;
case 111:
/* Line 1787 of yacc.c */
#line 665 "a.y"
{
(yyval.lval) = -(yyvsp[(2) - (2)].lval);
......@@ -2456,6 +2566,7 @@ yyreduce:
break;
case 116:
/* Line 1787 of yacc.c */
#line 677 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (1)].sym)->value;
......@@ -2463,6 +2574,7 @@ yyreduce:
break;
case 117:
/* Line 1787 of yacc.c */
#line 681 "a.y"
{
(yyval.lval) = -(yyvsp[(2) - (2)].lval);
......@@ -2470,6 +2582,7 @@ yyreduce:
break;
case 118:
/* Line 1787 of yacc.c */
#line 685 "a.y"
{
(yyval.lval) = (yyvsp[(2) - (2)].lval);
......@@ -2477,6 +2590,7 @@ yyreduce:
break;
case 119:
/* Line 1787 of yacc.c */
#line 689 "a.y"
{
(yyval.lval) = ~(yyvsp[(2) - (2)].lval);
......@@ -2484,6 +2598,7 @@ yyreduce:
break;
case 120:
/* Line 1787 of yacc.c */
#line 693 "a.y"
{
(yyval.lval) = (yyvsp[(2) - (3)].lval);
......@@ -2491,6 +2606,7 @@ yyreduce:
break;
case 121:
/* Line 1787 of yacc.c */
#line 698 "a.y"
{
(yyval.lval) = 0;
......@@ -2498,6 +2614,7 @@ yyreduce:
break;
case 122:
/* Line 1787 of yacc.c */
#line 702 "a.y"
{
(yyval.lval) = (yyvsp[(2) - (2)].lval);
......@@ -2505,6 +2622,7 @@ yyreduce:
break;
case 124:
/* Line 1787 of yacc.c */
#line 709 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval);
......@@ -2512,6 +2630,7 @@ yyreduce:
break;
case 125:
/* Line 1787 of yacc.c */
#line 713 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval);
......@@ -2519,6 +2638,7 @@ yyreduce:
break;
case 126:
/* Line 1787 of yacc.c */
#line 717 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval);
......@@ -2526,6 +2646,7 @@ yyreduce:
break;
case 127:
/* Line 1787 of yacc.c */
#line 721 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval);
......@@ -2533,6 +2654,7 @@ yyreduce:
break;
case 128:
/* Line 1787 of yacc.c */
#line 725 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval);
......@@ -2540,6 +2662,7 @@ yyreduce:
break;
case 129:
/* Line 1787 of yacc.c */
#line 729 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval);
......@@ -2547,6 +2670,7 @@ yyreduce:
break;
case 130:
/* Line 1787 of yacc.c */
#line 733 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval);
......@@ -2554,6 +2678,7 @@ yyreduce:
break;
case 131:
/* Line 1787 of yacc.c */
#line 737 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval);
......@@ -2561,6 +2686,7 @@ yyreduce:
break;
case 132:
/* Line 1787 of yacc.c */
#line 741 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval);
......@@ -2568,6 +2694,7 @@ yyreduce:
break;
case 133:
/* Line 1787 of yacc.c */
#line 745 "a.y"
{
(yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval);
......@@ -2575,10 +2702,21 @@ yyreduce:
break;
/* Line 1267 of yacc.c. */
#line 2580 "y.tab.c"
/* Line 1787 of yacc.c */
#line 2707 "y.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
......@@ -2587,7 +2725,6 @@ yyreduce:
*++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
......@@ -2607,6 +2744,10 @@ yyreduce:
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
......@@ -2614,37 +2755,36 @@ yyerrlab:
#if ! YYERROR_VERBOSE
yyerror (YY_("syntax error"));
#else
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
{
YYSIZE_T yyalloc = 2 * yysize;
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
yyalloc = YYSTACK_ALLOC_MAXIMUM;
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
if (yymsg)
yymsg_alloc = yyalloc;
else
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
}
}
if (0 < yysize && yysize <= yymsg_alloc)
{
(void) yysyntax_error (yymsg, yystate, yychar);
yyerror (yymsg);
}
else
{
yyerror (YY_("syntax error"));
if (yysize != 0)
goto yyexhaustedlab;
}
char const *yymsgp = YY_("syntax error");
int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
else if (yysyntax_error_status == 1)
{
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
if (!yymsg)
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
yysyntax_error_status = 2;
}
else
{
yysyntax_error_status = YYSYNTAX_ERROR;
yymsgp = yymsg;
}
}
yyerror (yymsgp);
if (yysyntax_error_status == 2)
goto yyexhaustedlab;
}
# undef YYSYNTAX_ERROR
#endif
}
......@@ -2652,7 +2792,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse look-ahead token after an
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
......@@ -2669,7 +2809,7 @@ yyerrlab:
}
}
/* Else will try to reuse look-ahead token after shifting the error
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
......@@ -2703,7 +2843,7 @@ yyerrlab1:
for (;;)
{
yyn = yypact[yystate];
if (yyn != YYPACT_NINF)
if (!yypact_value_is_default (yyn))
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
......@@ -2726,10 +2866,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
......@@ -2753,7 +2892,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
#ifndef yyoverflow
#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
......@@ -2764,9 +2903,14 @@ yyexhaustedlab:
#endif
yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
}
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
......@@ -2790,4 +2934,3 @@ yyreturn:
}
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
......@@ -29,10 +26,20 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
......@@ -141,24 +148,41 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 39 "a.y"
{
/* Line 2053 of yacc.c */
#line 39 "a.y"
Sym *sym;
int32 lval;
double dval;
char sval[8];
Addr addr;
}
/* Line 1529 of yacc.c. */
#line 157 "y.tab.h"
YYSTYPE;
/* Line 2053 of yacc.c */
#line 166 "y.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE yylval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_YY_Y_TAB_H_INCLUDED */
......@@ -200,6 +200,8 @@ enum as
ACHECKNIL,
AFATVARDEF,
AMRC, // MRC/MCR
ALAST,
};
......
......@@ -92,6 +92,7 @@ progedit(Link *ctxt, Prog *p)
{
char literal[64];
LSym *s;
LSym *tlsfallback;
p->from.class = 0;
p->to.class = 0;
......@@ -105,6 +106,25 @@ progedit(Link *ctxt, Prog *p)
break;
}
// Replace TLS register fetches on older ARM procesors.
switch(p->as) {
case AMRC:
// If the instruction matches MRC 15, 0, <reg>, C13, C0, 3, replace it.
if(ctxt->goarm < 7 && (p->to.offset & 0xffff0fff) == 0xee1d0f70) {
tlsfallback = linklookup(ctxt, "runtime.read_tls_fallback", 0);
// BL runtime.read_tls_fallback(SB)
p->as = ABL;
p->to.type = D_BRANCH;
p->to.sym = tlsfallback;
p->to.offset = 0;
} else {
// Otherwise, MRC/MCR instructions need no further treatment.
p->as = AWORD;
}
break;
}
// Rewrite float constants to values stored in memory.
switch(p->as) {
case AMOVF:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment