summaryrefslogtreecommitdiff
path: root/src/inc/gcinfotypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/gcinfotypes.h')
-rw-r--r--src/inc/gcinfotypes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/inc/gcinfotypes.h b/src/inc/gcinfotypes.h
index c08dd79c16..cd7afa4f93 100644
--- a/src/inc/gcinfotypes.h
+++ b/src/inc/gcinfotypes.h
@@ -289,6 +289,13 @@ inline bool IsValidReturnRegister(size_t regNo)
;
}
+inline bool IsStructReturnKind(ReturnKind returnKind)
+{
+ // Two bits encode integer/ref/float return-kinds.
+ // Encodings needing more than two bits are (non-scalar) struct-returns.
+ return returnKind > 3;
+}
+
// Helpers for combining/extracting individual ReturnKinds from/to Struct ReturnKinds.
// Encoding is two bits per register