diff options
author | jgravelle-google <jgravelle@google.com> | 2016-10-19 16:49:36 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-10-19 16:49:36 -0700 |
commit | 00354666afcc5c9fa489c446e23febe7efbcd311 (patch) | |
tree | 536247b027b8383c669ca8fb60deb7709072d664 /test/printf.c | |
parent | f08f75cf2fe1b6b8275f7f7fd4356919616ba95c (diff) | |
download | binaryen-00354666afcc5c9fa489c446e23febe7efbcd311.tar.gz binaryen-00354666afcc5c9fa489c446e23febe7efbcd311.tar.bz2 binaryen-00354666afcc5c9fa489c446e23febe7efbcd311.zip |
Add support for i64.store[N] (#789)
* Add support for i64.store[N]
Previously storing i64 in the interpreter assumed an 8byte store. Stores
like i64.store8 would then use the special-case i64 storing code, when
they could just use the i32.store8 code.
* Add printf test for interpreter
* Update wasm.js
Diffstat (limited to 'test/printf.c')
-rw-r--r-- | test/printf.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/printf.c b/test/printf.c new file mode 100644 index 000000000..ca1b1797f --- /dev/null +++ b/test/printf.c @@ -0,0 +1,20 @@ +#include <stdio.h> + +int main() { + int a = 12345; + unsigned b = 123456; + long c = 1234567; + unsigned long d = 12345678; + long long e = 1234567891011; + unsigned long long f = 123456789101112; + + printf( + "int a = %d\n" + "unsigned b = %u\n" + "long c = %ld\n" + "unsigned long d = %lu\n" + "long long e = %lld\n" + "unsigned long long f = %llu\n" + , a, b, c, d, e, f); + return 0; +} |