mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-23 15:29:51 +00:00
6a2169eb6f
map, this makes sure that we can compile the same code for two different ABIs (hard and soft float) in the same module. Update one testcase accordingly (and fix some confusing naming) and add a new testcase as well with the ordering swapped which would highlight the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218632 91177308-0d34-0410-b5e6-96231b3b80d8
46 lines
1.4 KiB
LLVM
46 lines
1.4 KiB
LLVM
; Check that stubs generation for mips16 hard-float mode does not depend
|
|
; on the function 'use-soft-float' attribute's value.
|
|
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel \
|
|
; RUN: -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s
|
|
|
|
define void @bar_sf() #1 {
|
|
; CHECK: bar_sf:
|
|
entry:
|
|
%call1 = call float @foo(float 1.000000e+00)
|
|
; CHECK: lw $3, %call16(foo)($2)
|
|
; CHECK-NOT: lw $5, %got(__mips16_call_stub_sf_1)($3)
|
|
ret void
|
|
}
|
|
|
|
define void @bar_hf() #0 {
|
|
; CHECK: bar_hf:
|
|
entry:
|
|
%call1 = call float @foo(float 1.000000e+00)
|
|
; CHECK: lw $2, %call16(foo)($3)
|
|
; CHECK: lw $5, %got(__mips16_call_stub_sf_1)($3)
|
|
ret void
|
|
}
|
|
|
|
declare float @foo(float) #2
|
|
|
|
attributes #0 = {
|
|
nounwind
|
|
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
|
|
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
|
|
"no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
|
|
"unsafe-fp-math"="false" "use-soft-float"="false"
|
|
}
|
|
attributes #1 = {
|
|
nounwind
|
|
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
|
|
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
|
|
"no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
|
|
"unsafe-fp-math"="false" "use-soft-float"="true"
|
|
}
|
|
attributes #2 = {
|
|
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
|
|
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
|
|
"no-nans-fp-math"="false" "stack-protector-buffer-size"="8"
|
|
"unsafe-fp-math"="false" "use-soft-float"="true"
|
|
}
|