summaryrefslogtreecommitdiff
path: root/src/passes/I64ToI32Lowering.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* remap {get,set}_local indices (#1486)Nathan Froyd2018-03-231-7/+16
| | | | | | | | | | When lowering i64 values in a function, we create new local variables for all of the i64 local variables, one local for the low bits, and one for the high bits. We create a mapping between the old locals and the new as well. During translation, when we encountered a `get_local` that didn't have type `i64`, we skipped it, on the supposition that there was nothing to do. But that's not true; the local it was getting may have been remapped to a new index in the lowered function, and we need to account for that change. Similar logic holds for `set_local`.
* add the highbits global to the IR (#1483)Nathan Froyd2018-03-201-0/+9
| | | | | We were using the global to return 64-bit values from functions, but said global wasn't actually present in the IR. This omission caused the generated code to fail validation.
* fix and implement more unary ops (#1442)Nathan Froyd2018-02-261-8/+120
| | | | | | | | | | | | | | | | | | * add tests for i32.popcnt * lower i64.popcnt * add tests for i64.extend_u/i32 * lower i64.extend_s/i32 * fix lowering i64.eqz * lower i64.eqz more efficiently * add tests for i32.clz/i32.ctz * lower i64.clz/i64.ctz
* implement lowering for i64 subtraction (#1429)Nathan Froyd2018-02-141-8/+58
| | | | | | | | | * fix lowering of i64 adds We're not permitted to reuse the input as temporary variables for the results. Weird things happen otherwise. * add support for lowering i64 subtraction
* add wasm2asm lowering for 64-bit signed comparisons (#1421)Nathan Froyd2018-02-141-1/+50
| | | Plus some tests, to make sure we implemented things correctly.
* Rename WasmType => Type (#1398)Alon Zakai2018-02-021-6/+6
| | | | * rename WasmType to Type. it's in the wasm:: namespace anyhow, and without Wasm- it fits in better alongside Index, Address, Expression, Module, etc.
* I64ToI32Lowwering: Skip not applicable globals (#1374)Daniel Wirtz2018-01-191-0/+2
| | | Currently, whenever a global is used, wasm2asm fails with an assertion error here. While this PR doesn't implement anything, it allows the use of non-i64 globals that aren't lowered anyway.
* Fix binaryen.js's wasm2asm (#1257)Alon Zakai2017-11-011-0/+2
| | | | * fix wasm2asm in binaryen.js, the function locals may not all have names, so add them as necessary
* Refactor i64 lowering to use RAII temp vars (#1177)Thomas Lively2017-09-231-173/+190
| | | | | | * Refactor i64 lowering to use RAII temp vars * Always generate trampoline blocks for Switch lowering
* i64 to i32 lowering for wasm2asm (#1134)Thomas Lively2017-09-011-0/+1197