From fff56af6421a1a3e357bcaad99f2ea084d72a7a8 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Thu, 24 Sep 2020 14:58:53 +0930
Subject: [PATCH] Re: [RS6000] Power10 libffi fixes

Adding a nop broke ffi_closure_LINUX64!

	* src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Correct
	location of .Lret.
---
 libffi/src/powerpc/linux64_closure.S | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libffi/src/powerpc/linux64_closure.S b/libffi/src/powerpc/linux64_closure.S
index 3e30db361905..5663bb402236 100644
--- a/libffi/src/powerpc/linux64_closure.S
+++ b/libffi/src/powerpc/linux64_closure.S
@@ -159,15 +159,17 @@ ffi_closure_LINUX64:
 # if defined _CALL_LINUX || _CALL_ELF == 2
 #  ifdef __PCREL__
 	bl ffi_closure_helper_LINUX64@notoc
+.Lret:
 #  else
 	bl ffi_closure_helper_LINUX64
+.Lret:
 	nop
 #  endif
 # else
 	bl .ffi_closure_helper_LINUX64
+.Lret:
 	nop
 # endif
-.Lret:
 
 	# now r3 contains the return type
 	# so use it to look up in a table
-- 
GitLab