mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-04 00:29:28 +00:00

Passes to fix three hardware errata that appear on some LEON processor variants. The instructions FSMULD, FMULS and FDIVS do not work as expected on some LEON processors. This change allows those instructions to be substituted for alternatives instruction sequences that are known to work. These passes only run when selected individually, or as part of a processor defintion. They are not included in general SPARC processor compilations for non-LEON processors or for those LEON processors that do not have these hardware errata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273108 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
717 B
LLVM
Executable File
21 lines
717 B
LLVM
Executable File
; RUN: llc %s -O0 -march=sparc -mcpu=leon2 -o - | FileCheck %s
|
|
; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -o - | FileCheck %s
|
|
; RUN: llc %s -O0 -march=sparc -mcpu=leon4 -o - | FileCheck %s
|
|
|
|
; CHECK-LABEL: smac_test:
|
|
; CHECK: smac %o1, %o0, %o0
|
|
define i32 @smac_test(i16* %a, i16* %b) {
|
|
entry:
|
|
; %0 = tail call i32 asm sideeffect "smac $2, $1, $0", "={r2},{r3},{r4}"(i16* %a, i16* %b)
|
|
%0 = tail call i32 asm sideeffect "smac $2, $1, $0", "=r,rI,r"(i16* %a, i16* %b)
|
|
ret i32 %0
|
|
}
|
|
|
|
; CHECK-LABEL: umac_test:
|
|
; CHECK: umac %o1, %o0, %o0
|
|
define i32 @umac_test(i16* %a, i16* %b) {
|
|
entry:
|
|
%0 = tail call i32 asm sideeffect "umac $2, $1, $0", "=r,rI,r"(i16* %a, i16* %b)
|
|
ret i32 %0
|
|
}
|