diff options
author | Dan Gohman <sunfish@mozilla.com> | 2016-01-06 14:06:17 -0800 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2016-01-06 14:06:17 -0800 |
commit | 1deb9c22d62c853ae3701fdae0e605436c9ed648 (patch) | |
tree | 94521d820f0cd32dd8b2a8f23cc258561278808f | |
parent | ea5e4f70785f3a8f3039e1d59ba4378caa665ed0 (diff) | |
download | binaryen-1deb9c22d62c853ae3701fdae0e605436c9ed648.tar.gz binaryen-1deb9c22d62c853ae3701fdae0e605436c9ed648.tar.bz2 binaryen-1deb9c22d62c853ae3701fdae0e605436c9ed648.zip |
Add tests for more assembler constructs that LLVM may use soon.
This adds tests for the kinds of assembly constructs produced by
-ffunction-sections, -fdata-sections, -fvisibility=hidden,
-fvisibility=protected, and -fvisibility=internal.
-rw-r--r-- | test/dot_s/function-data-sections.s | 53 | ||||
-rw-r--r-- | test/dot_s/visibilities.s | 24 |
2 files changed, 77 insertions, 0 deletions
diff --git a/test/dot_s/function-data-sections.s b/test/dot_s/function-data-sections.s new file mode 100644 index 000000000..68942b1af --- /dev/null +++ b/test/dot_s/function-data-sections.s @@ -0,0 +1,53 @@ + .text + .section .text.foo,"ax",@progbits + .globl foo + .type foo,@function +foo: + return +func_end0: + .size foo, func_end0-foo + + .section .text.bar,"ax",@progbits + .globl bar + .type bar,@function +bar: + .param i32 + .result i32 + return $0 +func_end1: + .size bar, func_end1-bar + + .section .text.qux,"ax",@progbits + .globl qux + .type qux,@function +qux: + .param f64, f64 + .result f64 + f64.add $push0=, $0, $1 + return $pop0 +func_end2: + .size qux, func_end2-qux + + .type aaa,@object + .section .bss.aaa,"aw",@nobits + .globl aaa + .align 2 +aaa: + .int32 0 + .size aaa, 4 + + .type bbb,@object + .section .data.bbb,"aw",@progbits + .globl bbb + .align 2 +bbb: + .int32 1 + .size bbb, 4 + + .type ccc,@object + .section .data.ccc,"aw",@progbits + .globl ccc + .align 2 +ccc: + .int32 1075000115 + .size ccc, 4 diff --git a/test/dot_s/visibilities.s b/test/dot_s/visibilities.s new file mode 100644 index 000000000..288073be0 --- /dev/null +++ b/test/dot_s/visibilities.s @@ -0,0 +1,24 @@ + .text + .hidden foo + .globl foo + .type foo,@function +foo: + return +func_end0: + .size foo, func_end0-foo + + .protected bar + .globl bar + .type bar,@function +bar: + return +func_end1: + .size bar, func_end1-bar + + .internal qux + .globl qux + .type qux,@function +qux: + return +func_end2: + .size qux, func_end2-qux |