mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-30 17:02:29 +00:00
c8b398cd6b
Before, only Thumb functions were marked as ".code 16". These ".code x" directives are effective until the next directive of its kind is encountered. Therefore, in code with interleaved ARM and Thumb functions, it was possible to declare a function as ARM and end up with a Thumb function after assembly. A test has been added. An existing test has also been fixed to take this change into account. Reviewers: aschwaighofer, t.p.northover, jmolloy, rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D24337 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281324 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
562 B
LLVM
24 lines
562 B
LLVM
; One file may have multiple functions targeted at different (ARM, Thumb)
|
|
; instruction sets. Passing this information to the linker and the assembler
|
|
; is done through the ".code 16" and ".code 32" directives.
|
|
;
|
|
; RUN: llc -mtriple=arm-arm-none-eabi %s -o - | FileCheck %s
|
|
|
|
define void @ft() #0 {
|
|
; CHECK: .code 16
|
|
; CHECK: .thumb_func
|
|
; CHECK-LABEL: ft:
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
define void @fz() #1 {
|
|
; CHECK: .code 32
|
|
; CHECK-LABEL: fz:
|
|
entry:
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { "target-features"="+thumb-mode" }
|
|
attributes #1 = { "target-features"="-thumb-mode" }
|