test and fix some more targets
This commit is contained in:
parent
3589798281
commit
0865a2ec78
@ -7,6 +7,10 @@
|
|||||||
use crate::abi::call::{ArgAbi, FnAbi, Reg, Uniform};
|
use crate::abi::call::{ArgAbi, FnAbi, Reg, Uniform};
|
||||||
|
|
||||||
fn classify_ret<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
fn classify_ret<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||||
|
if !arg.layout.is_sized() {
|
||||||
|
// Not touching this...
|
||||||
|
return;
|
||||||
|
}
|
||||||
// For return type, aggregate which <= 2*XLen will be returned in registers.
|
// For return type, aggregate which <= 2*XLen will be returned in registers.
|
||||||
// Otherwise, aggregate will be returned indirectly.
|
// Otherwise, aggregate will be returned indirectly.
|
||||||
if arg.layout.is_aggregate() {
|
if arg.layout.is_aggregate() {
|
||||||
@ -24,6 +28,10 @@ fn classify_ret<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||||
|
if !arg.layout.is_sized() {
|
||||||
|
// Not touching this...
|
||||||
|
return;
|
||||||
|
}
|
||||||
// For argument type, the first 4*XLen parts of aggregate will be passed
|
// For argument type, the first 4*XLen parts of aggregate will be passed
|
||||||
// in registers, and the rest will be passed in stack.
|
// in registers, and the rest will be passed in stack.
|
||||||
// So we can coerce to integers directly and let backend handle it correctly.
|
// So we can coerce to integers directly and let backend handle it correctly.
|
||||||
|
@ -9,6 +9,10 @@ fn classify_ret<Ty>(ret: &mut ArgAbi<'_, Ty>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||||
|
if !arg.layout.is_sized() {
|
||||||
|
// Not touching this...
|
||||||
|
return;
|
||||||
|
}
|
||||||
if arg.layout.is_aggregate() {
|
if arg.layout.is_aggregate() {
|
||||||
arg.make_indirect_byval(None);
|
arg.make_indirect_byval(None);
|
||||||
} else {
|
} else {
|
||||||
|
@ -46,6 +46,15 @@
|
|||||||
// revisions: wasi
|
// revisions: wasi
|
||||||
//[wasi] compile-flags: --target wasm32-wasi
|
//[wasi] compile-flags: --target wasm32-wasi
|
||||||
//[wasi] needs-llvm-components: webassembly
|
//[wasi] needs-llvm-components: webassembly
|
||||||
|
// revisions: csky
|
||||||
|
//[csky] compile-flags: --target csky-unknown-linux-gnuabiv2
|
||||||
|
//[csky] needs-llvm-components: csky
|
||||||
|
// revisions: bpf
|
||||||
|
//[bpf] compile-flags: --target bpfeb-unknown-none
|
||||||
|
//[bpf] needs-llvm-components: bpf
|
||||||
|
// revisions: m68k
|
||||||
|
//[m68k] compile-flags: --target m68k-unknown-linux-gnu
|
||||||
|
//[m68k] needs-llvm-components: m68k
|
||||||
// FIXME: disabled on nvptx64 since the target ABI fails the sanity check
|
// FIXME: disabled on nvptx64 since the target ABI fails the sanity check
|
||||||
// see https://github.com/rust-lang/rust/issues/117480
|
// see https://github.com/rust-lang/rust/issues/117480
|
||||||
/* revisions: nvptx64
|
/* revisions: nvptx64
|
||||||
|
Loading…
Reference in New Issue
Block a user