mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
fe2b8b1960
Summary: ... and after all that refactoring, it's possible to distinguish softfloat floating point values from integers so this patch no longer breaks softfloat to do it. Remove direct handling of i32's in the N32/N64 ABI by promoting them to i64. This more closely reflects the ABI documentation and also fixes problems with stack arguments on big-endian targets. We now rely on signext/zeroext annotations (already generated by clang) and the Assert[SZ]ext nodes to avoid the introduction of unnecessary sign/zero extends. It was not possible to convert three tests to use signext/zeroext. These tests are bswap.ll, ctlz-v.ll, ctlz-v.ll. It's not possible to put signext on a vector type so we just accept the sign extends here for now. These tests don't pass the vectors the same way clang does (clang puts multiple elements in the same argument, these map 1 element to 1 argument) so we don't need to worry too much about it. With this patch, all known N32/N64 bugs should be fixed and we now pass the first 10,000 tests generated by ABITest.py. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6117 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221534 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
489 B
LLVM
24 lines
489 B
LLVM
; RUN: llc -march=mips64el -mcpu=mips64r2 -mattr=n64 < %s | FileCheck %s
|
|
|
|
define void @foo(i32* noalias sret %agg.result) nounwind {
|
|
entry:
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: sw {{.*}}, 0($4)
|
|
; CHECK: jr $ra
|
|
; CHECK-NEXT: move $2, $4
|
|
|
|
store i32 42, i32* %agg.result
|
|
ret void
|
|
}
|
|
|
|
define void @bar(i32 signext %v, i32* noalias sret %agg.result) nounwind {
|
|
entry:
|
|
; CHECK-LABEL: bar:
|
|
; CHECK: sw $4, 0($5)
|
|
; CHECK: jr $ra
|
|
; CHECK-NEXT: move $2, $5
|
|
|
|
store i32 %v, i32* %agg.result
|
|
ret void
|
|
}
|