mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[Sparc] Use the names .rem and .urem instead of __modsi3 and __umodsi3
Summary: These are the names used in libgcc. Reviewers: venkatra, jyknight, ekedaigle Reviewed By: jyknight Subscribers: joerg, fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D48915 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337164 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1705,6 +1705,9 @@ SparcTargetLowering::SparcTargetLowering(const TargetMachine &TM,
|
||||
|
||||
setOperationAction(ISD::UDIV, MVT::i32, Expand);
|
||||
setLibcallName(RTLIB::UDIV_I32, ".udiv");
|
||||
|
||||
setLibcallName(RTLIB::SREM_I32, ".rem");
|
||||
setLibcallName(RTLIB::UREM_I32, ".urem");
|
||||
}
|
||||
|
||||
if (Subtarget->is64Bit()) {
|
||||
|
||||
@@ -63,3 +63,44 @@ define i8 @test_udiv8(i8 %a, i8 %b) #0 {
|
||||
ret i8 %d
|
||||
}
|
||||
|
||||
define i32 @test_srem32(i32 %a, i32 %b) #0 {
|
||||
; CHECK-LABEL: test_srem32
|
||||
; CHECK: call .rem
|
||||
%d = srem i32 %a, %b
|
||||
ret i32 %d
|
||||
}
|
||||
|
||||
define i16 @test_srem16(i16 %a, i16 %b) #0 {
|
||||
; CHECK-LABEL: test_srem16
|
||||
; CHECK: call .rem
|
||||
%d = srem i16 %a, %b
|
||||
ret i16 %d
|
||||
}
|
||||
|
||||
define i8 @test_srem8(i8 %a, i8 %b) #0 {
|
||||
; CHECK-LABEL: test_srem8
|
||||
; CHECK: call .rem
|
||||
%d = srem i8 %a, %b
|
||||
ret i8 %d
|
||||
}
|
||||
|
||||
define i32 @test_urem32(i32 %a, i32 %b) #0 {
|
||||
; CHECK-LABEL: test_urem32
|
||||
; CHECK: call .urem
|
||||
%d = urem i32 %a, %b
|
||||
ret i32 %d
|
||||
}
|
||||
|
||||
define i16 @test_urem16(i16 %a, i16 %b) #0 {
|
||||
; CHECK-LABEL: test_urem16
|
||||
; CHECK: call .urem
|
||||
%d = urem i16 %a, %b
|
||||
ret i16 %d
|
||||
}
|
||||
|
||||
define i8 @test_urem8(i8 %a, i8 %b) #0 {
|
||||
; CHECK-LABEL: test_urem8
|
||||
; CHECK: call .urem
|
||||
%d = urem i8 %a, %b
|
||||
ret i8 %d
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user