mirror of
git://c9x.me/qbe.git
synced 2026-04-06 18:39:48 +00:00
isel logic was moved to spill
This commit is contained in:
parent
2981a267f4
commit
df0836e475
@ -1,11 +1,6 @@
|
|||||||
#include "lisc.h"
|
#include "lisc.h"
|
||||||
|
|
||||||
/* For x86_64, we have to:
|
/* For x86_64, we have to:
|
||||||
*
|
|
||||||
* - add dummy uses for the second argument
|
|
||||||
* after non-commutative arithmetic
|
|
||||||
* operations (this prevents the reg.
|
|
||||||
* allocator to get 'eax = sub ebx eax')
|
|
||||||
*
|
*
|
||||||
* - check that constants are used only in
|
* - check that constants are used only in
|
||||||
* places allowed by the machine
|
* places allowed by the machine
|
||||||
@ -62,9 +57,7 @@ sel(Ins *i, Fn *fn)
|
|||||||
break;
|
break;
|
||||||
case OAdd:
|
case OAdd:
|
||||||
case OSub:
|
case OSub:
|
||||||
if (!opdesc[i->op].commut
|
case OCopy:
|
||||||
&& rtype(i->arg[1]) != RConst)
|
|
||||||
emit(OCopy, R, i->arg[1], R);
|
|
||||||
emit(i->op, i->to, i->arg[0], i->arg[1]);
|
emit(i->op, i->to, i->arg[0], i->arg[1]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user