Commit 2031252f authored by Shenghou Ma's avatar Shenghou Ma

5a, 5l: add PLD (preload data) instruction

        Supported in ARMv5TE and above, excluding ARMv5TExP.
        For CL 5990066.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5999044
parent 9feddd0b
......@@ -52,7 +52,7 @@
%token <lval> LTYPE6 LTYPE7 LTYPE8 LTYPE9 LTYPEA
%token <lval> LTYPEB LTYPEC LTYPED LTYPEE LTYPEF
%token <lval> LTYPEG LTYPEH LTYPEI LTYPEJ LTYPEK
%token <lval> LTYPEL LTYPEM LTYPEN LTYPEBX
%token <lval> LTYPEL LTYPEM LTYPEN LTYPEBX LTYPEPLD
%token <lval> LCONST LSP LSB LFP LPC
%token <lval> LTYPEX LR LREG LF LFREG LC LCREG LPSR LFCR
%token <lval> LCOND LS LAT
......@@ -301,6 +301,13 @@ inst:
$7.offset = $9;
outcode($1, $2, &$3, $5.reg, &$7);
}
/*
* PLD
*/
| LTYPEPLD reg
{
outcode($1, Always, &$2, NREG, &nullgen);
}
/*
* END
*/
......
......@@ -403,6 +403,8 @@ struct
"MCR", LTYPEJ, 0,
"MRC", LTYPEJ, 1,
"PLD", LTYPEPLD, APLD,
0
};
......
This diff is collapsed.
......@@ -63,28 +63,29 @@
LTYPEM = 279,
LTYPEN = 280,
LTYPEBX = 281,
LCONST = 282,
LSP = 283,
LSB = 284,
LFP = 285,
LPC = 286,
LTYPEX = 287,
LR = 288,
LREG = 289,
LF = 290,
LFREG = 291,
LC = 292,
LCREG = 293,
LPSR = 294,
LFCR = 295,
LCOND = 296,
LS = 297,
LAT = 298,
LFCONST = 299,
LSCONST = 300,
LNAME = 301,
LLAB = 302,
LVAR = 303
LTYPEPLD = 282,
LCONST = 283,
LSP = 284,
LSB = 285,
LFP = 286,
LPC = 287,
LTYPEX = 288,
LR = 289,
LREG = 290,
LF = 291,
LFREG = 292,
LC = 293,
LCREG = 294,
LPSR = 295,
LFCR = 296,
LCOND = 297,
LS = 298,
LAT = 299,
LFCONST = 300,
LSCONST = 301,
LNAME = 302,
LLAB = 303,
LVAR = 304
};
#endif
/* Tokens. */
......@@ -112,28 +113,29 @@
#define LTYPEM 279
#define LTYPEN 280
#define LTYPEBX 281
#define LCONST 282
#define LSP 283
#define LSB 284
#define LFP 285
#define LPC 286
#define LTYPEX 287
#define LR 288
#define LREG 289
#define LF 290
#define LFREG 291
#define LC 292
#define LCREG 293
#define LPSR 294
#define LFCR 295
#define LCOND 296
#define LS 297
#define LAT 298
#define LFCONST 299
#define LSCONST 300
#define LNAME 301
#define LLAB 302
#define LVAR 303
#define LTYPEPLD 282
#define LCONST 283
#define LSP 284
#define LSB 285
#define LFP 286
#define LPC 287
#define LTYPEX 288
#define LR 289
#define LREG 290
#define LF 291
#define LFREG 292
#define LC 293
#define LCREG 294
#define LPSR 295
#define LFCR 296
#define LCOND 297
#define LS 298
#define LAT 299
#define LFCONST 300
#define LSCONST 301
#define LNAME 302
#define LLAB 303
#define LVAR 304
......@@ -154,7 +156,7 @@ typedef union YYSTYPE
/* Line 1676 of yacc.c */
#line 158 "y.tab.h"
#line 160 "y.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
......@@ -184,6 +184,8 @@ enum as
ALDREXD,
ASTREXD,
APLD,
ALAST,
};
......
......@@ -1429,6 +1429,9 @@ if(debug['G']) print("%ux: %s: arm %d\n", (uint32)(p->pc), p->from.sym->name, p-
break;
o2 = oshr(p->from.reg, 0, REGTMP, p->scond);
break;
case 95: /* PLD reg */
o1 = 0xf5d0f000;
o1 |= p->from.reg << 16;
}
out[0] = o1;
......
......@@ -232,5 +232,7 @@ Optab optab[] =
{ ALDREXD, C_SOREG,C_NONE, C_REG, 91, 4, 0 },
{ ASTREXD, C_SOREG,C_REG, C_REG, 92, 4, 0 },
{ APLD, C_REG, C_NONE, C_NONE, 95, 4, 0 },
{ AXXX, C_NONE, C_NONE, C_NONE, 0, 4, 0 },
};
......@@ -843,6 +843,7 @@ buildop(void)
case ALDREXD:
case ASTREXD:
case ATST:
case APLD:
break;
}
}
......
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