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