summaryrefslogtreecommitdiff
blob: 91f9a6f60fae4a79057de72be5d4e9f54bf9062c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From e50b9ef8b910fa642ef158f6642e60d54d7ad740 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 7 Dec 2019 02:34:14 -0800
Subject: [PATCH] powerpc64: Use memcpy to help platforms with no __int128.
 (#534)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/powerpc/ffi_linux64.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c
index 7364770..4d50878 100644
--- a/src/powerpc/ffi_linux64.c
+++ b/src/powerpc/ffi_linux64.c
@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
                     {
                       if (vecarg_count < NUM_VEC_ARG_REGISTERS64
                           && i < nfixedargs)
-                        *vec_base.f128++ = *arg.f128++;
+		        memcpy (vec_base.f128++, arg.f128, sizeof (float128));
                       else
-                        *next_arg.f128 = *arg.f128++;
+		        memcpy (next_arg.f128, arg.f128++, sizeof (float128));
                       if (++next_arg.f128 == gpr_end.f128)
                         next_arg.f128 = rest.f128;
                       vecarg_count++;
@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
                   do
                     {
                       if (pvec < end_pvec && i < nfixedargs)
-                        *to.f128 = *pvec++;
+		        memcpy (to.f128, pvec++, sizeof (float128));
                       else
-                        *to.f128 = *from.f128;
+		        memcpy (to.f128, from.f128, sizeof (float128));
                       to.f128++;
                       from.f128++;
                     }
-- 
2.26.0