simplified a bit to make the resulting optimizer smaller; Added a

constant w2 that can be used in the patterns instead of 2*w
This commit is contained in:
ceriel
1989-02-02 11:41:31 +00:00
parent 1f60decc07
commit 3690e264bf
9 changed files with 307 additions and 114 deletions

View File

@@ -4,7 +4,7 @@
op1 op2 ... : action
and build a program to recognize then */
%token SFIT, UFIT, ROTATE, PSIZE, WSIZE, DEFINED, UNDEFINED, SAMESIGN;
%token SFIT, UFIT, ROTATE, PSIZE, WSIZE, DWSIZE, DEFINED, UNDEFINED, SAMESIGN;
%token SAMEEXT, SAMENAM, OFFSET, LOGAND, LOGOR, BITAND, BITOR, XOR;
%token MINUS, PLUS, TIMES, DIV, MOD, EQ, NE, LT, LE, GT, GE, NOT, COMP;
%token LSHIFT, RSHIFT, COMMA, OPCODE, INT, UPLUS, UMINUS, PATARG;
@@ -266,6 +266,10 @@ exp(int level; struct exp_node **result;)
{
*result = mkleaf(WSIZE,0);
}
| DWSIZE
{
*result = mkleaf(DWSIZE,0);
}
| INT
{
*result = mkleaf(INT,lastintval);