Skip to content

Commit 50736d7

Browse files
committed
Pre-commit test cases
1 parent d980384 commit 50736d7

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; RUN: not llc -mtriple=thumbv6m-none-unknown-eabi < %s 2>&1 | FileCheck %s
2+
3+
; CHECK: error: symbol '__aeabi_uidivmod' is already defined
4+
; FIXME: We want to discard the weak function.
5+
6+
module asm ".global __aeabi_uidivmod"
7+
module asm ".type __aeabi_uidivmod, %function"
8+
module asm "__aeabi_uidivmod:"
9+
module asm "str r0, [r2, #0x060]"
10+
module asm "str r1, [r2, #0x064]"
11+
12+
define weak void @__aeabi_uidivmod() #0 {
13+
tail call void asm sideeffect alignstack "push {lr}\0Asub sp, sp, #4\0Amov r2, sp\0Abl __udivmodsi4\0Aldr r1, [sp]\0Aadd sp, sp, #4\0Apop {pc}", "~{cc},~{memory}"()
14+
unreachable
15+
}
16+
17+
attributes #0 = { naked }

llvm/test/CodeGen/Thumb/asm-fn.ll

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
; RUN: not llc -mtriple=thumbv6m-none-unknown-eabi < %s 2>&1 | FileCheck %s
2+
3+
; CHECK: error: symbol '__aeabi_uidivmod' is already defined
4+
5+
module asm ".global __aeabi_uidivmod"
6+
module asm ".type __aeabi_uidivmod, %function"
7+
module asm "__aeabi_uidivmod:"
8+
module asm "str r0, [r2, #0x060]"
9+
module asm "str r1, [r2, #0x064]"
10+
11+
define void @__aeabi_uidivmod() #0 {
12+
tail call void asm sideeffect alignstack "push {lr}\0Asub sp, sp, #4\0Amov r2, sp\0Abl __udivmodsi4\0Aldr r1, [sp]\0Aadd sp, sp, #4\0Apop {pc}", "~{cc},~{memory}"()
13+
unreachable
14+
}
15+
16+
attributes #0 = { naked }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
; RUN: not llc -mtriple=thumbv6m-none-unknown-eabi < %s 2>&1 | FileCheck %s
2+
3+
; CHECK: error: symbol '__aeabi_uidivmod' is already defined
4+
5+
module asm ".weak __aeabi_uidivmod"
6+
module asm ".type __aeabi_uidivmod, %function"
7+
module asm "__aeabi_uidivmod:"
8+
module asm "str r0, [r2, #0x060]"
9+
module asm "str r1, [r2, #0x064]"
10+
11+
define weak void @__aeabi_uidivmod() #0 {
12+
tail call void asm sideeffect alignstack "push {lr}\0Asub sp, sp, #4\0Amov r2, sp\0Abl __udivmodsi4\0Aldr r1, [sp]\0Aadd sp, sp, #4\0Apop {pc}", "~{cc},~{memory}"()
13+
unreachable
14+
}
15+
16+
attributes #0 = { naked }
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; RUN: not llc -mtriple=thumbv6m-none-unknown-eabi < %s 2>&1 | FileCheck %s
2+
3+
; CHECK: error: symbol '__aeabi_uidivmod' is already defined
4+
; FIXME: We want to discard the weak asm function.
5+
6+
module asm ".weak __aeabi_uidivmod"
7+
module asm ".type __aeabi_uidivmod, %function"
8+
module asm "__aeabi_uidivmod:"
9+
module asm "str r0, [r2, #0x060]"
10+
module asm "str r1, [r2, #0x064]"
11+
12+
define void @__aeabi_uidivmod() #0 {
13+
tail call void asm sideeffect alignstack "push {lr}\0Asub sp, sp, #4\0Amov r2, sp\0Abl __udivmodsi4\0Aldr r1, [sp]\0Aadd sp, sp, #4\0Apop {pc}", "~{cc},~{memory}"()
14+
unreachable
15+
}
16+
17+
attributes #0 = { naked }

0 commit comments

Comments
 (0)