diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-19 14:56:33 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:32 -0400 |
commit | 2c6f6b4b2dbdd94a10a01124ac61724c412fe587 (patch) | |
tree | 44660864f45566ae6812924c0389129de92ce842 /lisc/parse.c | |
parent | 3c3175ca73914e299589b2e38692cd01b349d3d5 (diff) | |
download | roux-2c6f6b4b2dbdd94a10a01124ac61724c412fe587.tar.gz |
add truncation operation
It would be nicer to have some kind of subtyping where a l variable can be used in place of a w variable but it is more complications than a truncation insutruction. In some cases, it might be less efficient than the above solution by requiring two registers instead of one. (I.e when both the truncated variable and the long variable live together.) We have to see what are the usage patterns.
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index 8ffdb74..9f8e7a6 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -20,6 +20,7 @@ OpDesc opdesc[NOp] = { [OAnd] = { "and", 2, 2 }, [OSext] = { "sext", 1, 1 }, [OZext] = { "zext", 1, 1 }, + [OTrunc] = { "trunc", 1, 1 }, [OStorel] = { "storel", 2, 0 }, [OStorew] = { "storew", 2, 0 }, [OStores] = { "stores", 2, 0 }, |