Chromium Code Reviews| Index: tests_lit/llvm2ice_tests/64bit.pnacl.ll |
| diff --git a/tests_lit/llvm2ice_tests/64bit.pnacl.ll b/tests_lit/llvm2ice_tests/64bit.pnacl.ll |
| index 241c4ecc526fdfa828d20f81906c4524787d68e6..c7faab70cfbe80511a710a5b53e22a89b9dbe3f0 100644 |
| --- a/tests_lit/llvm2ice_tests/64bit.pnacl.ll |
| +++ b/tests_lit/llvm2ice_tests/64bit.pnacl.ll |
| @@ -26,6 +26,16 @@ |
| ; RUN: | %if --need=target_ARM32 --need=allow_dump \ |
| ; RUN: --command FileCheck --check-prefix ARM32 --check-prefix ARM32-OM1 %s |
| +; TODO(rkotler): Stop skipping unimplemented parts (via --skip-unimplemented) |
| +; once enough infrastructure is in. Also, switch to --filetype=obj |
| +; when possible. |
| +; RUN: %if --need=target_MIPS32 --need=allow_dump \ |
| +; RUN: --command %p2i --filetype=asm --assemble \ |
| +; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \ |
|
Jim Stichnoth
2016/01/31 05:29:47
Nit: there are two spaces between "--args" and "-O
rkotlerimgtec
2016/01/31 21:06:12
Done.
|
| +; RUN: -allow-externally-defined-symbols \ |
| +; RUN: | %if --need=target_MIPS32 --need=allow_dump \ |
| +; RUN: --command FileCheck --check-prefix MIPS32 %s |
| + |
| @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| @__fini_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| @__tls_template_start = internal constant [0 x i8] zeroinitializer, align 8 |
| @@ -36,6 +46,9 @@ entry: |
| ret i32 %b |
| } |
| +; MIPS32-LABEL: ignore64BitArg |
| +; MIPS: move v0,a2 |
|
Jim Stichnoth
2016/01/31 05:29:48
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:12
Done.
|
| + |
| define internal i32 @pass64BitArg(i64 %a, i64 %b, i64 %c, i64 %d, i64 %e, i64 %f) { |
| entry: |
| %call = call i32 @ignore64BitArgNoInline(i64 %a, i32 123, i64 %b) |
| @@ -102,6 +115,8 @@ entry: |
| ; ARM32: mov r2, #123 |
| ; ARM32: bl {{.*}} ignore64BitArgNoInline |
| +; MIPS32-LABEL: pass64BitArg |
| + |
| declare i32 @ignore64BitArgNoInline(i64, i32, i64) |
| @@ -167,6 +182,9 @@ entry: |
| ; ARM32: mov {{.*}}, #123 |
| ; ARM32: bl {{.*}} ignore64BitArgNoInline |
| +; MIPS32-LABEL: pass64BitUndefArg |
| +; MIPS: jr ra |
|
Jim Stichnoth
2016/01/31 05:29:47
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:12
Done.
|
| + |
| define internal i64 @return64BitArg(i64 %padding, i64 %a) { |
| entry: |
| ret i64 %a |
| @@ -184,6 +202,11 @@ entry: |
| ; ARM32: mov {{.*}}, r3 |
| ; ARM32: bx lr |
| +; MIPS-LABEL; return64BitArg |
|
Jim Stichnoth
2016/01/31 05:29:47
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:13
Done.
|
| +; MIPS: move v0,a2 |
| +; MIPS: move v1,a3 |
| +; MIPS: jr ra |
| + |
| define internal i64 @return64BitConst() { |
| entry: |
| ret i64 -2401053092306725256 |
| @@ -202,6 +225,13 @@ entry: |
| ; ARM32: movw r1, #48879 ; 0xbeef |
| ; ARM32: movt r1, #57005 ; 0xdead |
| +; MIPS32-LABEL: return64BitConst |
| +; MIPS32: lui v0,0x1234 |
| +; MIPS32: ori v0,v0,0x5678 |
| +; MIPS32: lui v1,0xdead |
| +; MIPS32: ori v1,v1,0xbeef |
| +; MIPS32: jr ra |
| + |
| define internal i64 @add64BitSigned(i64 %a, i64 %b) { |
| entry: |
| %add = add i64 %b, %a |
| @@ -219,6 +249,12 @@ entry: |
| ; ARM32: adds |
| ; ARM32: adc |
| +; MIPS-LABEL: add64BitSigned |
|
Jim Stichnoth
2016/01/31 05:29:47
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:13
Done.
|
| +; MIPS: addu |
| +; MIPS: sltu |
| +; MIPS: addu |
| +; MIPS: addu |
| + |
| define internal i64 @add64BitUnsigned(i64 %a, i64 %b) { |
| entry: |
| %add = add i64 %b, %a |
| @@ -236,6 +272,12 @@ entry: |
| ; ARM32: adds |
| ; ARM32: adc |
| +; MIPS-LABEL: add64BitUnsigned |
|
Jim Stichnoth
2016/01/31 05:29:47
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:12
Done.
|
| +; MIPS: addu |
| +; MIPS: sltu |
| +; MIPS: addu |
| +; MIPS: addu |
| + |
| define internal i64 @sub64BitSigned(i64 %a, i64 %b) { |
| entry: |
| %sub = sub i64 %a, %b |
| @@ -253,6 +295,12 @@ entry: |
| ; ARM32: subs |
| ; ARM32: sbc |
| +; MIPS-LABEL: sub64BitSigned |
|
Jim Stichnoth
2016/01/31 05:29:47
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:13
Done.
|
| +; MIPS: subu |
| +; MIPS: sltu |
| +; MIPS: addu |
| +; MIPS: subu |
| + |
| define internal i64 @sub64BitUnsigned(i64 %a, i64 %b) { |
| entry: |
| %sub = sub i64 %a, %b |
| @@ -270,6 +318,12 @@ entry: |
| ; ARM32: subs |
| ; ARM32: sbc |
| +; MIPS-LABEL: sub64BitUnsigned |
|
Jim Stichnoth
2016/01/31 05:29:47
There is no "--check-prefix MIPS" so this check li
rkotlerimgtec
2016/01/31 21:06:12
Done.
|
| +; MIPS: subu |
| +; MIPS: sltu |
| +; MIPS: addu |
| +; MIPS: subu |
| + |
| define internal i64 @mul64BitSigned(i64 %a, i64 %b) { |
| entry: |
| %mul = mul i64 %b, %a |
| @@ -604,6 +658,10 @@ entry: |
| ; ARM32: and |
| ; ARM32: and |
| +; MIPS32-LABEL: and64BitSigned |
| +; MIPS32: and |
| +; MIPS32: and |
| + |
| define internal i64 @and64BitUnsigned(i64 %a, i64 %b) { |
| entry: |
| %and = and i64 %b, %a |
| @@ -621,6 +679,10 @@ entry: |
| ; ARM32: and |
| ; ARM32: and |
| +; MIPS32-LABEL: and64BitUnsigned |
| +; MIPS32: and |
| +; MIPS32: and |
| + |
| define internal i64 @or64BitSigned(i64 %a, i64 %b) { |
| entry: |
| %or = or i64 %b, %a |
| @@ -638,6 +700,10 @@ entry: |
| ; ARM32: orr |
| ; ARM32: orr |
| +; MIPS32-LABEL: or64BitSigned |
| +; MIPS32: or |
| +; MIPS32: or |
| + |
| define internal i64 @or64BitUnsigned(i64 %a, i64 %b) { |
| entry: |
| %or = or i64 %b, %a |
| @@ -655,6 +721,11 @@ entry: |
| ; ARM32: orr |
| ; ARM32: orr |
| +; MIPS32-LABEL: or64BitUnsigned |
| +; MIPS32: or |
| +; MIPS32: or |
| + |
|
Jim Stichnoth
2016/01/31 05:29:47
Two blank lines should be just one.
rkotlerimgtec
2016/01/31 21:06:13
Done.
|
| + |
| define internal i64 @xor64BitSigned(i64 %a, i64 %b) { |
| entry: |
| %xor = xor i64 %b, %a |
| @@ -672,6 +743,11 @@ entry: |
| ; ARM32: eor |
| ; ARM32: eor |
| +; MIPS32-LABEL: xor64BitSigned |
| +; MIPS32: xor |
| +; MIPS32: xor |
| + |
|
Jim Stichnoth
2016/01/31 05:29:47
Two blank lines should be just one.
rkotlerimgtec
2016/01/31 21:06:13
Done.
|
| + |
| define internal i64 @xor64BitUnsigned(i64 %a, i64 %b) { |
| entry: |
| %xor = xor i64 %b, %a |
| @@ -689,6 +765,10 @@ entry: |
| ; ARM32: eor |
| ; ARM32: eor |
| +; MIPS32-LABEL: xor64BitUnsigned |
| +; MIPS32: xor |
| +; MIPS32: xor |
| + |
| define internal i32 @trunc64To32Signed(i64 %padding, i64 %a) { |
| entry: |
| %conv = trunc i64 %a to i32 |