2015-10-15 22:34:23 +08:00
|
|
|
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
|
2013-12-10 22:29:38 +08:00
|
|
|
|
2015-10-15 22:34:23 +08:00
|
|
|
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC
|
2013-12-10 22:29:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
@xi = common global i32 0, align 4
|
|
|
|
@x = common global float 0.000000e+00, align 4
|
|
|
|
@xd = common global double 0.000000e+00, align 8
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
define void @it() #0 {
|
|
|
|
entry:
|
|
|
|
%call = call i32 @i(i32 1)
|
|
|
|
store i32 %call, i32* @xi, align 4
|
|
|
|
ret void
|
2013-12-16 04:49:30 +08:00
|
|
|
; PIC: .ent it
|
|
|
|
; STATIC: .ent it
|
|
|
|
; PIC: save $16, $17, $ra, [[FS:[0-9]+]]
|
|
|
|
; STATIC: save $16, $ra, [[FS:[0-9]+]]
|
|
|
|
; PIC: restore $16, $17, $ra, [[FS]]
|
|
|
|
; STATIC: restore $16, $ra, [[FS]]
|
|
|
|
; PIC: .end it
|
|
|
|
; STATIC: .end it
|
2013-12-10 22:29:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @i(i32) #1
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
define void @ft() #0 {
|
|
|
|
entry:
|
|
|
|
%call = call float @f()
|
|
|
|
store float %call, float* @x, align 4
|
|
|
|
ret void
|
2013-12-16 04:49:30 +08:00
|
|
|
; PIC: .ent ft
|
|
|
|
; PIC: save $16, $17, $ra, $18, [[FS:[0-9]+]]
|
|
|
|
; PIC: restore $16, $17, $ra, $18, [[FS]]
|
|
|
|
; PIC: .end ft
|
2013-12-10 22:29:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare float @f() #1
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
define void @dt() #0 {
|
|
|
|
entry:
|
|
|
|
%call = call double @d()
|
|
|
|
store double %call, double* @xd, align 8
|
|
|
|
ret void
|
2013-12-16 04:49:30 +08:00
|
|
|
; PIC: .ent dt
|
|
|
|
; PIC: save $16, $17, $ra, $18, [[FS:[0-9]+]]
|
|
|
|
; PIC: restore $16, $17, $ra, $18, [[FS]]
|
|
|
|
; PIC: .end dt
|
2013-12-10 22:29:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare double @d() #1
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
define void @fft() #0 {
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load float, float* @x, align 4
|
2013-12-10 22:29:38 +08:00
|
|
|
%call = call float @ff(float %0)
|
|
|
|
store float %call, float* @x, align 4
|
|
|
|
ret void
|
2013-12-16 04:49:30 +08:00
|
|
|
; PIC: .ent fft
|
|
|
|
; PIC: save $16, $17, $ra, $18, [[FS:[0-9]+]]
|
|
|
|
; PIC: restore $16, $17, $ra, $18, [[FS]]
|
|
|
|
; PIC: .end fft
|
2013-12-10 22:29:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare float @ff(float) #1
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
define void @vft() #0 {
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load float, float* @x, align 4
|
2013-12-10 22:29:38 +08:00
|
|
|
call void @vf(float %0)
|
|
|
|
ret void
|
2013-12-16 04:49:30 +08:00
|
|
|
; PIC: .ent vft
|
|
|
|
; STATIC: .ent vft
|
|
|
|
; PIC: save $16, $ra, [[FS:[0-9]+]]
|
|
|
|
; STATIC: save $16, $ra, [[FS:[0-9]+]]
|
|
|
|
; PIC: restore $16, $ra, [[FS]]
|
|
|
|
; STATIC: restore $16, $ra, [[FS]]
|
|
|
|
; PIC: .end vft
|
|
|
|
; STATIC: .end vft
|
2013-12-10 22:29:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
declare void @vf(float) #1
|
|
|
|
|
|
|
|
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 = { "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" }
|
|
|
|
|
|
|
|
|