diff options
| author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-07 13:46:44 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-07 13:46:44 -0500 |
| commit | cebec4dd4739712530111c6211129ef2ee948c5c (patch) | |
| tree | 496284040d586d37df41d21873d46e1deb575654 /lisc/isel.c | |
| parent | 9de2a588da1d4879984992dcd03b75bd0bac8035 (diff) | |
| download | roux-cebec4dd4739712530111c6211129ef2ee948c5c.tar.gz | |
add new cast instruction
Diffstat (limited to 'lisc/isel.c')
| -rw-r--r-- | lisc/isel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisc/isel.c b/lisc/isel.c index 6834d17..2c05b22 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -129,6 +129,13 @@ argcls(Ins *i, int n) return KWIDE(i->cls) ? Kl : Kw; case OSitof: return KWIDE(i->cls) ? Kd : Ks; + case OCast: + switch (i->cls) { + case Kw: return Ks; + case Kl: return Kd; + case Ks: return Kw; + case Kd: return Kl; + } default: if (OCmpw <= i->op && i->op <= OCmpd1) diag("isel: invalid call to argcls"); @@ -295,6 +302,9 @@ sel(Ins i, ANum *an, Fn *fn) case OOr: case OXor: case OXTest: + case OFtosi: + case OSitof: + case OCast: case_OExt: Emit: emiti(i); @@ -373,6 +383,7 @@ flagi(Ins *i0, Ins *i) case OTruncd: case OFtosi: case OSitof: + case OCast: ; } return 0; |
