Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1018)

Unified Diff: src/cmd/8a/a.y

Issue 7548043: code review 7548043: cmd/6a, cmd/8a, cmd/6l, cmd/8l: add AES instructions (Closed)
Patch Set: diff -r 5327829ff1e4 https://go.googlecode.com/hg/ Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/6l/span.c ('k') | src/cmd/8a/lex.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/8a/a.y
===================================================================
--- a/src/cmd/8a/a.y
+++ b/src/cmd/8a/a.y
@@ -54,7 +54,7 @@
%left '*' '/' '%'
%token <lval> LTYPE0 LTYPE1 LTYPE2 LTYPE3 LTYPE4
%token <lval> LTYPEC LTYPED LTYPEN LTYPER LTYPET LTYPES LTYPEM LTYPEI LTYPEG LTYPEXC
-%token <lval> LCONST LFP LPC LSB
+%token <lval> LTYPEX LCONST LFP LPC LSB
%token <lval> LBREG LLREG LSREG LFREG LXREG
%token <dval> LFCONST
%token <sval> LSCONST LSP
@@ -63,7 +63,7 @@
%type <con2> con2
%type <gen> mem imm imm2 reg nam rel rem rim rom omem nmem
%type <gen2> nonnon nonrel nonrem rimnon rimrem remrim
-%type <gen2> spec1 spec2 spec3 spec4 spec5 spec6 spec7 spec8 spec9
+%type <gen2> spec1 spec2 spec3 spec4 spec5 spec6 spec7 spec8 spec9 spec10
%%
prog:
| prog
@@ -117,6 +117,7 @@
| LTYPEI spec7 { outcode($1, &$2); }
| LTYPEG spec8 { outcode($1, &$2); }
| LTYPEXC spec9 { outcode($1, &$2); }
+| LTYPEX spec10 { outcode($1, &$2); }
nonnon:
{
@@ -296,6 +297,16 @@
$$.to.offset = $5;
}
+spec10: /* PINSRD */
+ imm ',' rem ',' reg
+ {
+ $$.from = $3;
+ $$.to = $5;
+ if($1.type != D_CONST)
+ yyerror("illegal constant");
+ $$.to.offset = $1.offset;
+ }
+
rem:
reg
| mem
« no previous file with comments | « src/cmd/6l/span.c ('k') | src/cmd/8a/lex.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b