mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
c5e99819f4
Hard float for mips16 means essentially to compile as soft float but to use a runtime library for soft float that is written with native mips32 floating point instructions (those runtime routines run in mips32 hard float mode). The patch reviewed by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195123 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
896 B
LLVM
21 lines
896 B
LLVM
; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mcpu=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=static16
|
|
|
|
; Function Attrs: nounwind
|
|
define double @my_mul(double %a, double %b) #0 {
|
|
entry:
|
|
%a.addr = alloca double, align 8
|
|
%b.addr = alloca double, align 8
|
|
store double %a, double* %a.addr, align 8
|
|
store double %b, double* %b.addr, align 8
|
|
%0 = load double* %a.addr, align 8
|
|
%1 = load double* %b.addr, align 8
|
|
%mul = fmul double %0, %1
|
|
ret double %mul
|
|
}
|
|
|
|
; static16: .ent __fn_stub_my_mul
|
|
; static16: .set reorder
|
|
; static16-NEXT: #NO_APP
|
|
; static16: .end __fn_stub_my_mul
|
|
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"="true" }
|