From a15bb9cfcbf3f4c992c00b7a8271889bee3d2b5e Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Wed, 27 Nov 2019 14:16:36 -0600 Subject: [PATCH] Codegen: Use GPR regclass for reference types on x86 --- cranelift/codegen/src/isa/x86/abi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cranelift/codegen/src/isa/x86/abi.rs b/cranelift/codegen/src/isa/x86/abi.rs index 4c1925708d..6a1a3cea11 100644 --- a/cranelift/codegen/src/isa/x86/abi.rs +++ b/cranelift/codegen/src/isa/x86/abi.rs @@ -333,7 +333,7 @@ pub fn legalize_signature( /// Get register class for a type appearing in a legalized signature. pub fn regclass_for_abi_type(ty: ir::Type) -> RegClass { - if ty.is_int() || ty.is_bool() { + if ty.is_int() || ty.is_bool() || ty.is_ref() { GPR } else { FPR