diff options
author | JF Bastien <jfb@chromium.org> | 2016-01-06 15:32:35 -0800 |
---|---|---|
committer | JF Bastien <jfb@chromium.org> | 2016-01-06 15:32:35 -0800 |
commit | d7632fc6d76289ab2d66f54cb8eb87049b743818 (patch) | |
tree | 21e72be74c9c6d51c2aeb8f5bbd0997124f636f1 /test/torture-s/struct-aliasing-1.c.s | |
parent | 004bb9433e8e6143968530f9f0f60102aa5f7715 (diff) | |
download | binaryen-d7632fc6d76289ab2d66f54cb8eb87049b743818.tar.gz binaryen-d7632fc6d76289ab2d66f54cb8eb87049b743818.tar.bz2 binaryen-d7632fc6d76289ab2d66f54cb8eb87049b743818.zip |
Add test/torture-s
Diffstat (limited to 'test/torture-s/struct-aliasing-1.c.s')
-rw-r--r-- | test/torture-s/struct-aliasing-1.c.s | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/torture-s/struct-aliasing-1.c.s b/test/torture-s/struct-aliasing-1.c.s new file mode 100644 index 000000000..9255db25d --- /dev/null +++ b/test/torture-s/struct-aliasing-1.c.s @@ -0,0 +1,56 @@ + .text + .file "/b/build/slave/linux/build/src/buildbot/work/gcc/gcc/testsuite/gcc.c-torture/execute/struct-aliasing-1.c" + .globl foo + .type foo,@function +foo: # @foo + .param i32, i32 + .result i32 + .local i32 +# BB#0: # %entry + i32.load $2=, 0($1) + i32.const $push0=, 0 + i32.store $discard=, 0($0), $pop0 + i32.load $push1=, 0($1) + i32.add $push2=, $pop1, $2 + return $pop2 +func_end0: + .size foo, func_end0-foo + + .globl main + .type main,@function +main: # @main + .result i32 + .local i32, i32, i32, i32, i32, i32 +# BB#0: # %entry + i32.const $0=, __stack_pointer + i32.load $0=, 0($0) + i32.const $1=, 16 + i32.sub $5=, $0, $1 + i32.const $1=, __stack_pointer + i32.store $5=, 0($1), $5 + i32.const $3=, 12 + i32.add $3=, $5, $3 + i32.const $4=, 12 + i32.add $4=, $5, $4 + block BB1_2 + i32.call $push2=, foo, $3, $4 + i32.const $push0=, 1 + i32.store $push1=, 12($5), $pop0 + i32.ne $push3=, $pop2, $pop1 + br_if $pop3, BB1_2 +# BB#1: # %if.end + i32.const $push4=, 0 + i32.const $2=, 16 + i32.add $5=, $5, $2 + i32.const $2=, __stack_pointer + i32.store $5=, 0($2), $5 + return $pop4 +BB1_2: # %if.then + call abort + unreachable +func_end1: + .size main, func_end1-main + + + .ident "clang version 3.8.0 " + .section ".note.GNU-stack","",@progbits |