From 0ea5e60241850c36e11b0567b7f2ec37fd8fe48b Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Wed, 19 Aug 2020 19:10:50 +0100
Subject: [PATCH] Darwin, Arm64 : Additional change for darwincpcs D.4.

We are allowed to pass 16bytes in regs even if the starting reg
is not even-numbered.

(cherry picked from commit 6d8be6105a1366e3e0ea9b9803bcbe37e0351904)
Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
---
 gcc/config/aarch64/aarch64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git gcc/config/aarch64/aarch64.c gcc/config/aarch64/aarch64.c
index 56501b98871..570f25150b8 100644
--- gcc/config/aarch64/aarch64.c
+++ gcc/config/aarch64/aarch64.c
@@ -2755,7 +2755,7 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode)
       if (known_le (GET_MODE_SIZE (mode), 8))
 	return true;
       if (known_le (GET_MODE_SIZE (mode), 16))
-	return (regno & 1) == 0;
+	return (regno & 1) == 0 || TARGET_MACHO; /* darwinpcs D.4 */
     }
   else if (FP_REGNUM_P (regno))
     {
-- 
2.42.1

