summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/abi/call/csky.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_target/src/abi/call/csky.rs')
-rw-r--r--compiler/rustc_target/src/abi/call/csky.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/abi/call/csky.rs b/compiler/rustc_target/src/abi/call/csky.rs
index 706493b0a..8b4328db5 100644
--- a/compiler/rustc_target/src/abi/call/csky.rs
+++ b/compiler/rustc_target/src/abi/call/csky.rs
@@ -7,6 +7,10 @@
use crate::abi::call::{ArgAbi, FnAbi, Reg, Uniform};
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.
// Otherwise, aggregate will be returned indirectly.
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>) {
+ if !arg.layout.is_sized() {
+ // Not touching this...
+ return;
+ }
// For argument type, the first 4*XLen parts of aggregate will be passed
// in registers, and the rest will be passed in stack.
// So we can coerce to integers directly and let backend handle it correctly.