48788287b8
When a rule `uses REG ... yields %a`, the result %a is always a temporary, never a regvar. If the EM code uses _stl_ to put the result in a regvar, then ncg emits _mr_ to move %a to the regvar. There are two ways to put the result in the regvar without %a: 1. Yield a token, as in `yields {MUL_RR, %2, %1}`, so that _stl_ can move the token to the regvar without using %a. 2. Provide a pattern, like `sli stl`, that just puts the result in `{LOCAL, $2}` and not %a. Allow some tokens, like SUM_RIS and XEQ, onto the stack; and add tokens like MUL_RR, and patterns like `sli stl`. Delete patterns for `stl lol` and `sdl ldl` to avoid an extra temporary %a when the local is a regvar. Delete `lal sti lal loi` because it would emit wrong code. |
||
---|---|---|
.. | ||
mach.c | ||
mach.h | ||
table |