diff -urN libffcall/ffcall/avcall/avcall.h.in libffcall.ppc64le/ffcall/avcall/avcall.h.in
--- libffcall/ffcall/avcall/avcall.h.in	2010-07-21 04:59:27.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall/avcall.h.in	2015-07-22 07:06:20.797694603 +0900
@@ -60,6 +60,9 @@
 #ifndef __powerpc64__
 #undef __powerpc64__
 #endif
+#ifndef __powerpc64le__
+#undef __powerpc64le__
+#endif
 #ifndef __s390__
 #undef __s390__
 #endif
@@ -286,7 +289,7 @@
 #endif
 
   /* These are for internal use only */
-#if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)
+#if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || (defined(__powerpc64__) && defined(__powerpc64le__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)
   __AV_REGISTER_STRUCT_RETURN	= 1<<9,
 #endif
 #if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__)
@@ -600,12 +603,18 @@
 #define __av_start_struct3(LIST)  \
   ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)
 #endif
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) && !defined(__powerpc64le__)
 #define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
   0
 #define __av_start_struct3(LIST)  \
   0
 #endif
+#if defined(__powerpc64__) && defined(__powerpc64le__)
+#define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
+  ((TYPE_SIZE) <= 16)
+#define __av_start_struct3(LIST)  \
+  ((LIST).flags |= __AV_REGISTER_STRUCT_RETURN, 0)
+#endif
 #if defined(__sparc64__) || defined(__ia64__)
 #define __av_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
   ((TYPE_SIZE) <= 32)
@@ -643,6 +652,7 @@
 #define __av_start_struct4(LIST,TYPE_SIZE)				\
    (*(LIST).aptr++ = (__avword)((LIST).raddr), 0)
 #endif
+
 #if defined(__mips__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__)
 #define __av_start_struct4(LIST,TYPE_SIZE)				\
    (*(LIST).aptr++ = (__avword)((LIST).raddr),				\
@@ -1006,13 +1016,21 @@
  * float registers, but we also push them into the corresponding int
  * registers in case of varargs.
  */
-
+#if defined(__powerpc64le__)
+#define av_float(LIST,VAL)						\
+  ((LIST).aptr >= __av_eptr(LIST)					\
+   ? -1 : (*(float*)(LIST).aptr++ = (float)(VAL), 			\
+	   (LIST).faptr < &(LIST).fargs[13] &&				\
+		(*(LIST).faptr++ = (double)(float)(VAL)),		\
+	   0))
+#else
 #define av_float(LIST,VAL)						\
   (++(LIST).aptr > __av_eptr(LIST)					\
    ? -1 : (((float*)(LIST).aptr)[-1] = (float)(VAL),			\
 	   (LIST).faptr < &(LIST).fargs[13] &&				\
 		(*(LIST).faptr++ = (double)(float)(VAL)),		\
 	   0))
+#endif
 
 #define av_double(LIST,VAL)						\
   (++(LIST).aptr > __av_eptr(LIST)					\
@@ -1247,12 +1265,16 @@
      __av_struct_leftadjusted(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL) \
    : /* gcc passes small structures right-adjusted. */			\
      __av_struct_rightadjusted(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL))
-#endif
-#if defined(__powerpc64__)
+#else
+#if defined(__powerpc64le__)
+#define __av_struct(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL)		\
+  __av_struct_leftadjusted(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL)
+#else
 #define __av_struct(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL)		\
   __av_struct_rightadjusted(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL)
 #endif
 #endif
+#endif
 #if defined(__s390__)
 #define __av_struct_rightadjusted(LIST,TYPE,TYPE_SIZE,TYPE_ALIGN,ASSIGN,VAL)\
   (((LIST).aptr =							\
diff -urN libffcall/ffcall/avcall/avcall-powerpc64.c libffcall.ppc64le/ffcall/avcall/avcall-powerpc64.c
--- libffcall/ffcall/avcall/avcall-powerpc64.c	2006-04-23 01:54:28.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall/avcall-powerpc64.c	2015-07-22 07:01:59.482922396 +0900
@@ -5,6 +5,7 @@
   Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
   Copyright 2000 Adam Fedor, <fedor@gnu.org>
   Copyright 2004 Paul Guyot, <pguyot@kallisys.net>
+  Copyright 2015 Masanor Mitsugi <mitsugi@linux.vnet.ibm.com>
 
   This is free software distributed under the GNU General Public
   Licence described in the file COPYING. Contact the author if
diff -urN libffcall/ffcall/avcall/avcall-powerpc64le.c libffcall.ppc64le/ffcall/avcall/avcall-powerpc64le.c
--- libffcall/ffcall/avcall/avcall-powerpc64le.c	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall/avcall-powerpc64le.c	2015-07-22 07:04:47.498415727 +0900
@@ -0,0 +1,205 @@
+#ifndef _avcall_powerpc64le_c				/*-*- C -*-*/
+#define _avcall_powerpc64le_c
+/**
+  Copyright 1993 Bill Triggs, <Bill.Triggs@inrialpes.fr>
+  Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
+  Copyright 2000 Adam Fedor, <fedor@gnu.org>
+  Copyright 2004 Paul Guyot, <pguyot@kallisys.net>
+  Copyright 2015 Masanori Mitsugi, <mitsugi@linux.vnet.ibm.com>
+
+  This is free software distributed under the GNU General Public
+  Licence described in the file COPYING. Contact the author if
+  you don't have this or can't live with it. There is ABSOLUTELY
+  NO WARRANTY, explicit or implied, on this software.
+**/
+/*----------------------------------------------------------------------
+  !!! THIS ROUTINE MUST BE COMPILED gcc -O !!!
+
+  Foreign function interface for a 64-bit PowerPC with gcc
+
+  This calls a C function with an argument list built up using macros
+  defined in avcall.h.
+
+  PowerPC64 Little Endian Argument Passing Conventions:
+
+  All arguments, except the first 8 words, are passed on the stack with
+  word alignment. The first 13 doubles and floats are also passed in
+  floating-point-registers.
+  To return a structure, the called function copies the value to space
+  pointed to by its first argument, and all other arguments are shifted
+  down by one.
+
+  The ELF v2 argument passing conventions are used:
+  - the first 13 doubles and floats are passed in FP registers,
+    and when they do, there is still room allocated for them in the
+    argument sequence (integer regs or stack).
+  - Structures are passed in the argument sequence. But structures
+    containing floats or doubles are passed in FP registers?!
+
+  Compile this routine with gcc -O (or -O2 -fno-omit-frame-pointer or -g -O)
+  to get the right register variables. For other compilers use the
+  pre-compiled assembler version.
+  ----------------------------------------------------------------------*/
+#include "avcall.h.in"
+
+#define STACK_OFFSET 12
+
+#define RETURN(TYPE,VAL)	(*(TYPE*)l->raddr = (TYPE)(VAL))
+
+register double farg1	__asm__("fr1");
+register double farg2	__asm__("fr2");
+register double farg3	__asm__("fr3");
+register double farg4	__asm__("fr4");
+register double farg5	__asm__("fr5");
+register double farg6	__asm__("fr6");
+register double farg7	__asm__("fr7");
+register double farg8	__asm__("fr8");
+register double farg9	__asm__("fr9");
+register double farg10	__asm__("fr10");
+register double farg11	__asm__("fr11");
+register double farg12	__asm__("fr12");
+register double farg13	__asm__("fr13");
+
+int
+__builtin_avcall(av_alist* l)
+{
+  register __avword*	sp	__asm__("r1");  /* C names for registers */
+/*register __avword	iret	__asm__("r3"); */
+  register __avword	iret2	__asm__("r4");
+  register float	fret	__asm__("fr1");
+  register double	dret	__asm__("fr1");
+
+  __avword space[__AV_ALIST_WORDS];	/* space for callee's stack frame */
+  __avword* argframe = sp + STACK_OFFSET;/* stack offset for argument list */
+  int arglen = l->aptr - l->args;
+  __avword i;
+
+  for (i = 8; i < arglen; i++) /* push function args onto stack */
+    argframe[i-8] = l->args[i];
+
+  /* pass first 13 floating-point args in registers */
+  arglen = l->faptr - l->fargs;
+  if (arglen == 0) goto fargs0;
+  else if (arglen == 1) goto fargs1;
+  else if (arglen == 2) goto fargs2;
+  else if (arglen == 3) goto fargs3;
+  else if (arglen == 4) goto fargs4;
+  else if (arglen == 5) goto fargs5;
+  else if (arglen == 6) goto fargs6;
+  else if (arglen == 7) goto fargs7;
+  else if (arglen == 8) goto fargs8;
+  else if (arglen == 9) goto fargs9;
+  else if (arglen == 10) goto fargs10;
+  else if (arglen == 11) goto fargs11;
+  else if (arglen == 12) goto fargs12;
+  else if (arglen == 13) goto fargs13;
+  fargs13: farg13 = l->fargs[12];
+  fargs12: farg12 = l->fargs[11];
+  fargs11: farg11 = l->fargs[10];
+  fargs10: farg10 = l->fargs[9];
+  fargs9: farg9 = l->fargs[8];
+  fargs8: farg8 = l->fargs[7];
+  fargs7: farg7 = l->fargs[6];
+  fargs6: farg6 = l->fargs[5];
+  fargs5: farg5 = l->fargs[4];
+  fargs4: farg4 = l->fargs[3];
+  fargs3: farg3 = l->fargs[2];
+  fargs2: farg2 = l->fargs[1];
+  fargs1: farg1 = l->fargs[0];
+  fargs0: ;
+				/* call function, pass 8 args in registers */
+  i = (*l->func)(l->args[0], l->args[1], l->args[2], l->args[3],
+		 l->args[4], l->args[5], l->args[6], l->args[7]);
+
+  /* save return value */
+  if (l->rtype == __AVvoid) {
+  } else
+  if (l->rtype == __AVword) {
+    RETURN(__avword, i);
+  } else
+  if (l->rtype == __AVchar) {
+    RETURN(char, i);
+  } else
+  if (l->rtype == __AVschar) {
+    RETURN(signed char, i);
+  } else
+  if (l->rtype == __AVuchar) {
+    RETURN(unsigned char, i);
+  } else
+  if (l->rtype == __AVshort) {
+    RETURN(short, i);
+  } else
+  if (l->rtype == __AVushort) {
+    RETURN(unsigned short, i);
+  } else
+  if (l->rtype == __AVint) {
+    RETURN(int, i);
+  } else
+  if (l->rtype == __AVuint) {
+    RETURN(unsigned int, i);
+  } else
+  if (l->rtype == __AVlong) {
+    RETURN(long, i);
+  } else
+  if (l->rtype == __AVulong) {
+    RETURN(unsigned long, i);
+  } else
+  if (l->rtype == __AVlonglong) {
+    RETURN(long long, i);
+  } else
+  if (l->rtype == __AVulonglong) {
+    RETURN(unsigned long long, i);
+  } else
+  if (l->rtype == __AVfloat) {
+    RETURN(float, fret);
+  } else
+  if (l->rtype == __AVdouble) {
+    RETURN(double, dret);
+  } else
+  if (l->rtype == __AVvoidp) {
+    RETURN(void*, i);
+  } else
+  if (l->rtype == __AVstruct) {
+    if (l->flags & __AV_REGISTER_STRUCT_RETURN) {
+      /* Return structs of size <= 16 in registers. */
+      if (l->rsize > 0 && l->rsize <= 16) {
+        if (l->rsize >= 1)
+          ((unsigned char *)l->raddr)[0] = (unsigned char)(i);
+        if (l->rsize >= 2)
+          ((unsigned char *)l->raddr)[1] = (unsigned char)(i>>8);
+        if (l->rsize >= 3)
+          ((unsigned char *)l->raddr)[2] = (unsigned char)(i>>16);
+        if (l->rsize >= 4)
+          ((unsigned char *)l->raddr)[3] = (unsigned char)(i>>24);
+        if (l->rsize >= 5)
+          ((unsigned char *)l->raddr)[4] = (unsigned char)(i>>32);
+        if (l->rsize >= 6)
+          ((unsigned char *)l->raddr)[5] = (unsigned char)(i>>40);
+        if (l->rsize >= 7)
+          ((unsigned char *)l->raddr)[6] = (unsigned char)(i>>48);
+        if (l->rsize >= 8)
+          ((unsigned char *)l->raddr)[7] = (unsigned char)(i>>56);
+        if (l->rsize >= 9) {
+          ((unsigned char *)l->raddr)[8] = (unsigned char)(iret2);
+          if (l->rsize >= 10)
+            ((unsigned char *)l->raddr)[9] = (unsigned char)(iret2>>8);
+          if (l->rsize >= 11)
+            ((unsigned char *)l->raddr)[10] = (unsigned char)(iret2>>16);
+          if (l->rsize >= 12)
+            ((unsigned char *)l->raddr)[11] = (unsigned char)(iret2>>24);
+          if (l->rsize >= 13)
+            ((unsigned char *)l->raddr)[12] = (unsigned char)(iret2>>32);
+          if (l->rsize >= 14)
+            ((unsigned char *)l->raddr)[13] = (unsigned char)(iret2>>40);
+          if (l->rsize >= 15)
+            ((unsigned char *)l->raddr)[14] = (unsigned char)(iret2>>48);
+          if (l->rsize >= 16)
+            ((unsigned char *)l->raddr)[15] = (unsigned char)(iret2>>56);
+        }
+      }
+    }
+  }
+  return 0;
+}
+
+#endif /*_avcall_powerpc64le_c */
diff -urN libffcall/ffcall/avcall/avcall-powerpc64le.s libffcall.ppc64le/ffcall/avcall/avcall-powerpc64le.s
--- libffcall/ffcall/avcall/avcall-powerpc64le.s	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall/avcall-powerpc64le.s	2015-07-22 06:57:53.489561142 +0900
@@ -0,0 +1,286 @@
+	.file	"avcall-powerpc64le.c"
+	.abiversion 2
+	.section	".toc","aw"
+	.section	".text"
+	.align 2
+	.p2align 4,,15
+	.globl __builtin_avcall
+	.type	__builtin_avcall, @function
+__builtin_avcall:
+0:	addis 2,12,.TOC.-0b@ha
+	addi 2,2,.TOC.-0b@l
+	.localentry	__builtin_avcall,.-__builtin_avcall
+	mflr 0
+	addi 9,3,48
+	std 31,-8(1)
+	mr 31,3
+	std 0,16(1)
+	stdu 1,-2192(1)
+	ld 10,40(3)
+	subf 9,9,10
+	sradi 9,9,3
+	extsw 9,9
+	cmpwi 7,9,8
+	ble- 7,.L5
+	sldi 8,9,3
+	addi 7,1,24
+	addi 10,3,104
+	addi 9,1,88
+	add 7,7,8
+	.p2align 4,,15
+.L6:
+	ldu 8,8(10)
+	stdu 8,8(9)
+	cmpld 7,9,7
+	bne+ 7,.L6
+.L5:
+	ld 10,2096(31)
+	addi 9,31,2104
+	subf 9,9,10
+	sradi 9,9,3
+	extsw. 10,9
+	beq 0,.L3
+	cmpwi 7,10,1
+	beq 7,.L7
+	cmpwi 7,10,2
+	beq 7,.L8
+	cmpwi 7,10,3
+	beq 7,.L9
+	cmpwi 7,10,4
+	beq 7,.L10
+	cmpwi 7,10,5
+	beq 7,.L11
+	cmpwi 7,10,6
+	beq 7,.L12
+	cmpwi 7,10,7
+	beq 7,.L13
+	cmpwi 7,10,8
+	beq 7,.L14
+	cmpwi 7,10,9
+	beq 7,.L15
+	cmpwi 7,10,10
+	beq 7,.L16
+	cmpwi 7,10,11
+	beq 7,.L17
+	cmpwi 7,10,12
+	beq 7,.L18
+.L19:
+	lfd 13,2200(31)
+.L18:
+	lfd 12,2192(31)
+.L17:
+	lfd 11,2184(31)
+.L16:
+	lfd 10,2176(31)
+.L15:
+	lfd 9,2168(31)
+.L14:
+	lfd 8,2160(31)
+.L13:
+	lfd 7,2152(31)
+.L12:
+	lfd 6,2144(31)
+.L11:
+	lfd 5,2136(31)
+.L10:
+	lfd 4,2128(31)
+.L9:
+	lfd 3,2120(31)
+.L8:
+	lfd 2,2112(31)
+.L7:
+	lfd 1,2104(31)
+.L3:
+	ld 11,0(31)
+	ld 9,96(31)
+	ld 3,48(31)
+	ld 4,56(31)
+	ld 5,64(31)
+	ld 6,72(31)
+	ld 7,80(31)
+	ld 8,88(31)
+	ld 10,104(31)
+	std 2,24(1)
+	mtctr 11
+	mr 12,11
+	bctrl
+	ld 2,24(1)
+	lwz 9,24(31)
+	cmplwi 7,9,1
+	beq 7,.L21
+	cmpdi 7,9,0
+	beq 7,.L62
+	cmplwi 7,9,2
+	beq 7,.L59
+	cmplwi 7,9,3
+	beq 7,.L59
+	cmplwi 7,9,4
+	beq 7,.L59
+	cmplwi 7,9,5
+	beq 7,.L60
+	cmplwi 7,9,6
+	beq 7,.L60
+	cmplwi 7,9,7
+	beq 7,.L61
+	cmplwi 7,9,8
+	beq 7,.L61
+	cmplwi 7,9,9
+	beq 7,.L62
+	cmplwi 7,9,10
+	beq 7,.L62
+	cmplwi 7,9,11
+	beq 7,.L62
+	cmplwi 7,9,12
+	beq 7,.L62
+	cmplwi 7,9,13
+	beq 7,.L64
+	cmplwi 7,9,14
+	beq 7,.L65
+	cmplwi 7,9,15
+	beq 7,.L62
+	cmplwi 7,9,16
+	bne 7,.L21
+	lwz 9,8(31)
+	rldicl. 10,9,55,63
+	beq 0,.L21
+	ld 9,32(31)
+	addi 9,9,-1
+	cmpldi 7,9,15
+	bgt 7,.L21
+	ld 9,16(31)
+	stb 3,0(9)
+	ld 9,32(31)
+	cmpldi 7,9,1
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,3,8
+	stb 10,1(9)
+	ld 9,32(31)
+	cmpldi 7,9,2
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,3,16
+	stb 10,2(9)
+	ld 9,32(31)
+	cmpldi 7,9,3
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,3,24
+	stb 10,3(9)
+	ld 9,32(31)
+	cmpldi 7,9,4
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,3,32
+	stb 10,4(9)
+	ld 9,32(31)
+	cmpldi 7,9,5
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,3,40
+	stb 10,5(9)
+	ld 9,32(31)
+	cmpldi 7,9,6
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,3,48
+	stb 10,6(9)
+	ld 9,32(31)
+	cmpldi 7,9,7
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 3,3,56
+	stb 3,7(9)
+	ld 9,32(31)
+	cmpldi 7,9,8
+	ble 7,.L21
+	ld 9,16(31)
+	stb 4,8(9)
+	ld 9,32(31)
+	cmpldi 7,9,9
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,4,8
+	stb 10,9(9)
+	ld 9,32(31)
+	cmpldi 7,9,10
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,4,16
+	stb 10,10(9)
+	ld 9,32(31)
+	cmpldi 7,9,11
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,4,24
+	stb 10,11(9)
+	ld 9,32(31)
+	cmpldi 7,9,12
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,4,32
+	stb 10,12(9)
+	ld 9,32(31)
+	cmpldi 7,9,13
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,4,40
+	stb 10,13(9)
+	ld 9,32(31)
+	cmpldi 7,9,14
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 10,4,48
+	stb 10,14(9)
+	ld 9,32(31)
+	cmpldi 7,9,15
+	ble 7,.L21
+	ld 9,16(31)
+	sradi 4,4,56
+	stb 4,15(9)
+.L21:
+	addi 1,1,2192
+	li 3,0
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+.L62:
+	ld 9,16(31)
+	addi 1,1,2192
+	std 3,0(9)
+	li 3,0
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+.L59:
+	ld 9,16(31)
+	addi 1,1,2192
+	stb 3,0(9)
+	li 3,0
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+.L60:
+	ld 9,16(31)
+	sth 3,0(9)
+	b .L21
+.L61:
+	ld 9,16(31)
+	stw 3,0(9)
+	b .L21
+.L65:
+	ld 9,16(31)
+	stfd 1,0(9)
+	b .L21
+.L64:
+	ld 9,16(31)
+	stfs 1,0(9)
+	b .L21
+	.long 0
+	.byte 0,0,0,1,128,1,0,0
+	.size	__builtin_avcall,.-__builtin_avcall
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
diff -urN libffcall/ffcall/avcall/Makefile.devel libffcall.ppc64le/ffcall/avcall/Makefile.devel
--- libffcall/ffcall/avcall/Makefile.devel	2009-04-30 04:15:22.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall/Makefile.devel	2015-07-22 06:57:53.489561142 +0900
@@ -9,7 +9,7 @@
 SED = sed
 ROFF_MAN = groff -Tascii -mandoc
 
-all : avcall-i386-macro.S avcall-i386-msvc.c avcall-i386-mingw32.c avcall.h.msvc avcall.h.mingw32 avcall-m68k.mit.S avcall-m68k.mot.s avcall-m68k-amiga.s avcall-mips.S avcall-mipsn32.S avcall-mips64.S avcall-sparc.S avcall-sparc64.S avcall-alpha.s avcall-hppa.s avcall-arm.S avcall-armel.S avcall-powerpc-aix.old.s avcall-powerpc-aix.new.s avcall-powerpc-sysv4.s avcall-powerpc-macos.s avcall-powerpc64.s avcall-m88k.s avcall-convex.s avcall-ia64.s avcall-x86_64.s avcall.man
+all : avcall-i386-macro.S avcall-i386-msvc.c avcall-i386-mingw32.c avcall.h.msvc avcall.h.mingw32 avcall-m68k.mit.S avcall-m68k.mot.s avcall-m68k-amiga.s avcall-mips.S avcall-mipsn32.S avcall-mips64.S avcall-sparc.S avcall-sparc64.S avcall-alpha.s avcall-hppa.s avcall-arm.S avcall-armel.S avcall-powerpc-aix.old.s avcall-powerpc-aix.new.s avcall-powerpc-sysv4.s avcall-powerpc-macos.s avcall-powerpc64.s avcall-powerpc64le.s avcall-m88k.s avcall-convex.s avcall-ia64.s avcall-x86_64.s avcall.man
 
 avcall-i386-macro.S : avcall-i386.c avcall.h.in asmi386.sh
 	$(GCC) -V 2.7.2 -b i486-linuxaout $(GCCFLAGS) -D__i386__ -fno-omit-frame-pointer -S avcall-i386.c -o avcall-i386.s
@@ -101,6 +101,9 @@
 avcall-powerpc64.s : avcall-powerpc64.c avcall.h.in
 	/cross/powerpc64-linux-tools/bin/powerpc64-linux-gcc $(GCCFLAGS) -D__powerpc64__ -S avcall-powerpc64.c -o avcall-powerpc64.s
 
+avcall-powerpc64le.s : avcall-powerpc64le.c avcall.h.in
+	$(GCC) $(GCCFLAGS) -D__powerpc64__ -D__powerpc64le__ -S avcall-powerpc64le.c -o avcall-powerpc64le.s
+
 avcall-m88k.s : avcall-m88k.c avcall.h.in
 	$(GCC) -V 2.95.2 -b m88k-dgux $(GCCFLAGS) -D__m88k__ -S avcall-m88k.c -o avcall-m88k.s
 
diff -urN libffcall/ffcall/avcall/Makefile.in libffcall.ppc64le/ffcall/avcall/Makefile.in
--- libffcall/ffcall/avcall/Makefile.in	2012-04-25 00:22:21.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall/Makefile.in	2015-07-22 06:57:53.489561142 +0900
@@ -141,6 +141,9 @@
 avcall-powerpc64.lo : $(srcdir)/avcall-powerpc64.s
 	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/avcall-powerpc64.s
 
+avcall-powerpc64le.lo : $(srcdir)/avcall-powerpc64le.s
+	$(LIBTOOL_COMPILE) $(CC) -g @GCC_X_NONE@ -c $(srcdir)/avcall-powerpc64le.s
+
 avcall-m88k.lo : $(srcdir)/avcall-m88k.s
 	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/avcall-m88k.s
 
diff -urN libffcall/ffcall/avcall-powerpc64.c libffcall.ppc64le/ffcall/avcall-powerpc64.c
--- libffcall/ffcall/avcall-powerpc64.c	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/avcall-powerpc64.c	2006-04-23 01:54:28.000000000 +0900
@@ -0,0 +1,167 @@
+#ifndef _avcall_powerpc64_c				/*-*- C -*-*/
+#define _avcall_powerpc64_c
+/**
+  Copyright 1993 Bill Triggs, <Bill.Triggs@inrialpes.fr>
+  Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
+  Copyright 2000 Adam Fedor, <fedor@gnu.org>
+  Copyright 2004 Paul Guyot, <pguyot@kallisys.net>
+
+  This is free software distributed under the GNU General Public
+  Licence described in the file COPYING. Contact the author if
+  you don't have this or can't live with it. There is ABSOLUTELY
+  NO WARRANTY, explicit or implied, on this software.
+**/
+/*----------------------------------------------------------------------
+  !!! THIS ROUTINE MUST BE COMPILED gcc -O !!!
+
+  Foreign function interface for a 64-bit PowerPC with gcc
+
+  This calls a C function with an argument list built up using macros
+  defined in avcall.h.
+
+  PowerPC64 Argument Passing Conventions:
+
+  All arguments, except the first 8 words, are passed on the stack with
+  word alignment. The first 13 doubles and floats are also passed in
+  floating-point-registers.
+  To return a structure, the called function copies the value to space
+  pointed to by its first argument, and all other arguments are shifted
+  down by one.
+
+  The AIX argument passing conventions are used:
+  - the first 13 doubles and floats are passed in FP registers,
+    and when they do, there is still room allocated for them in the
+    argument sequence (integer regs or stack).
+  - Structures are passed in the argument sequence. But structures
+    containing floats or doubles are passed in FP registers?!
+
+  Compile this routine with gcc -O (or -O2 -fno-omit-frame-pointer or -g -O)
+  to get the right register variables. For other compilers use the
+  pre-compiled assembler version.
+  ----------------------------------------------------------------------*/
+#include "avcall.h.in"
+
+#define STACK_OFFSET 14
+
+#define RETURN(TYPE,VAL)	(*(TYPE*)l->raddr = (TYPE)(VAL))
+
+register double farg1	__asm__("fr1");
+register double farg2	__asm__("fr2");
+register double farg3	__asm__("fr3");
+register double farg4	__asm__("fr4");
+register double farg5	__asm__("fr5");
+register double farg6	__asm__("fr6");
+register double farg7	__asm__("fr7");
+register double farg8	__asm__("fr8");
+register double farg9	__asm__("fr9");
+register double farg10	__asm__("fr10");
+register double farg11	__asm__("fr11");
+register double farg12	__asm__("fr12");
+register double farg13	__asm__("fr13");
+
+int
+__builtin_avcall(av_alist* l)
+{
+  register __avword*	sp	__asm__("r1");  /* C names for registers */
+/*register __avword	iret	__asm__("r3"); */
+  register __avword	iret2	__asm__("r4");
+  register float	fret	__asm__("fr1");
+  register double	dret	__asm__("fr1");
+
+  __avword space[__AV_ALIST_WORDS];	/* space for callee's stack frame */
+  __avword* argframe = sp + STACK_OFFSET;/* stack offset for argument list */
+  int arglen = l->aptr - l->args;
+  __avword i;
+
+  for (i = 8; i < arglen; i++) /* push function args onto stack */
+    argframe[i-8] = l->args[i];
+
+  /* pass first 13 floating-point args in registers */
+  arglen = l->faptr - l->fargs;
+  if (arglen == 0) goto fargs0;
+  else if (arglen == 1) goto fargs1;
+  else if (arglen == 2) goto fargs2;
+  else if (arglen == 3) goto fargs3;
+  else if (arglen == 4) goto fargs4;
+  else if (arglen == 5) goto fargs5;
+  else if (arglen == 6) goto fargs6;
+  else if (arglen == 7) goto fargs7;
+  else if (arglen == 8) goto fargs8;
+  else if (arglen == 9) goto fargs9;
+  else if (arglen == 10) goto fargs10;
+  else if (arglen == 11) goto fargs11;
+  else if (arglen == 12) goto fargs12;
+  else if (arglen == 13) goto fargs13;
+  fargs13: farg13 = l->fargs[12];
+  fargs12: farg12 = l->fargs[11];
+  fargs11: farg11 = l->fargs[10];
+  fargs10: farg10 = l->fargs[9];
+  fargs9: farg9 = l->fargs[8];
+  fargs8: farg8 = l->fargs[7];
+  fargs7: farg7 = l->fargs[6];
+  fargs6: farg6 = l->fargs[5];
+  fargs5: farg5 = l->fargs[4];
+  fargs4: farg4 = l->fargs[3];
+  fargs3: farg3 = l->fargs[2];
+  fargs2: farg2 = l->fargs[1];
+  fargs1: farg1 = l->fargs[0];
+  fargs0: ;
+				/* call function, pass 8 args in registers */
+  i = (*l->func)(l->args[0], l->args[1], l->args[2], l->args[3],
+		 l->args[4], l->args[5], l->args[6], l->args[7]);
+
+  /* save return value */
+  if (l->rtype == __AVvoid) {
+  } else
+  if (l->rtype == __AVword) {
+    RETURN(__avword, i);
+  } else
+  if (l->rtype == __AVchar) {
+    RETURN(char, i);
+  } else
+  if (l->rtype == __AVschar) {
+    RETURN(signed char, i);
+  } else
+  if (l->rtype == __AVuchar) {
+    RETURN(unsigned char, i);
+  } else
+  if (l->rtype == __AVshort) {
+    RETURN(short, i);
+  } else
+  if (l->rtype == __AVushort) {
+    RETURN(unsigned short, i);
+  } else
+  if (l->rtype == __AVint) {
+    RETURN(int, i);
+  } else
+  if (l->rtype == __AVuint) {
+    RETURN(unsigned int, i);
+  } else
+  if (l->rtype == __AVlong) {
+    RETURN(long, i);
+  } else
+  if (l->rtype == __AVulong) {
+    RETURN(unsigned long, i);
+  } else
+  if (l->rtype == __AVlonglong) {
+    RETURN(long long, i);
+  } else
+  if (l->rtype == __AVulonglong) {
+    RETURN(unsigned long long, i);
+  } else
+  if (l->rtype == __AVfloat) {
+    RETURN(float, fret);
+  } else
+  if (l->rtype == __AVdouble) {
+    RETURN(double, dret);
+  } else
+  if (l->rtype == __AVvoidp) {
+    RETURN(void*, i);
+  } else
+  if (l->rtype == __AVstruct) {
+    /* __AV_PCC_STRUCT_RETURN and __AV_REGISTER_STRUCT_RETURN are ignored */
+  }
+  return 0;
+}
+
+#endif /*_avcall_powerpc64_c */
diff -urN libffcall/ffcall/build-aux/config.guess libffcall.ppc64le/ffcall/build-aux/config.guess
--- libffcall/ffcall/build-aux/config.guess	2007-10-21 09:52:31.000000000 +0900
+++ libffcall.ppc64le/ffcall/build-aux/config.guess	2015-07-22 06:57:53.490561038 +0900
@@ -911,6 +911,9 @@
     ppc64:Linux:*:*)
 	echo powerpc64-unknown-linux-gnu
 	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-gnu
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
diff -urN libffcall/ffcall/callback/trampoline_r/Makefile.devel libffcall.ppc64le/ffcall/callback/trampoline_r/Makefile.devel
--- libffcall/ffcall/callback/trampoline_r/Makefile.devel	2009-04-28 01:44:13.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/trampoline_r/Makefile.devel	2015-07-22 06:57:53.490561038 +0900
@@ -61,6 +61,9 @@
 proto-powerpc64-aix.s : proto64.c
 	/cross/powerpc64-linux-tools/bin/powerpc64-linux-gcc $(GCCFLAGS) -D__powerpc64__ -S proto64.c -o $@
 
+proto-powerpc64le.s : proto64.c
+	$(GCC) $(GCCFLAGS) -D__powerpc64__ -D__powerpc64le__ -S proto64.c -o $@
+
 proto-m88k.s : proto.c
 	$(GCC) -V 2.95.2 -b m88k-dgux $(GCCFLAGS) -D__m88k__ -S proto.c -o $@
 
diff -urN libffcall/ffcall/callback/trampoline_r/Makefile.in libffcall.ppc64le/ffcall/callback/trampoline_r/Makefile.in
--- libffcall/ffcall/callback/trampoline_r/Makefile.in	2012-04-25 00:22:21.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/trampoline_r/Makefile.in	2015-07-22 06:57:53.490561038 +0900
@@ -82,6 +82,12 @@
 tramp-powerpc64.s : $(srcdir)/tramp-powerpc64.new.S
 	$(CPP) $(srcdir)/tramp-powerpc64.new.S > tramp-powerpc64.s
 
+tramp-powerpc64le.lo : tramp-powerpc64le.s
+	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c tramp-powerpc64le.s
+
+tramp-powerpc64le.s : $(srcdir)/tramp-powerpc64le.new.S
+	$(CPP) $(srcdir)/tramp-powerpc64le.new.S > tramp-powerpc64le.s
+
 tramp-ia64.lo : $(srcdir)/tramp-ia64.s
 	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/tramp-ia64.s
 
diff -urN libffcall/ffcall/callback/trampoline_r/proto-powerpc64le.s libffcall.ppc64le/ffcall/callback/trampoline_r/proto-powerpc64le.s
--- libffcall/ffcall/callback/trampoline_r/proto-powerpc64le.s	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/trampoline_r/proto-powerpc64le.s	2015-07-22 06:57:53.491560933 +0900
@@ -0,0 +1,53 @@
+	.file	"proto64.c"
+	.abiversion 2
+	.section	".toc","aw"
+	.section	".text"
+	.align 2
+	.p2align 4,,15
+	.globl tramp
+	.type	tramp, @function
+tramp:
+0:	addis 2,12,.TOC.-0b@ha
+	addi 2,2,.TOC.-0b@l
+	.localentry	tramp,.-tramp
+	mflr 0
+	lis 12,0xbabe
+	lis 11,0x7355
+	ori 12,12,48832
+	ori 11,11,18193
+	sldi 12,12,32
+	sldi 11,11,32
+	oris 12,12,0xdea0
+	ori 12,12,65451
+	oris 11,11,0x4362
+	mtctr 12
+	std 0,16(1)
+	stdu 1,-96(1)
+	ori 11,11,8533
+	std 2,24(1)
+	bctrl
+	ld 2,24(1)
+	addi 1,1,96
+	ld 0,16(1)
+	mtlr 0
+	blr
+	.long 0
+	.byte 0,0,0,1,128,0,0,0
+	.size	tramp,.-tramp
+	.align 2
+	.p2align 4,,15
+	.globl jump
+	.type	jump, @function
+jump:
+	lis 9,0xbabe
+	ori 9,9,48832
+	sldi 9,9,32
+	oris 9,9,0xdea0
+	ori 9,9,65451
+	mtctr 9
+	bctr
+	.long 0
+	.byte 0,0,0,0,0,0,0,0
+	.size	jump,.-jump
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
diff -urN libffcall/ffcall/callback/trampoline_r/trampoline.c libffcall.ppc64le/ffcall/callback/trampoline_r/trampoline.c
--- libffcall/ffcall/callback/trampoline_r/trampoline.c	2009-04-28 00:24:05.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/trampoline_r/trampoline.c	2015-07-22 06:59:21.936342193 +0900
@@ -27,8 +27,8 @@
 #define __powerpcaix__  /* AIX ABI, just a closure. */
 #endif
 #endif
-#if defined(__powerpc64__)
-/* The only ABI on powerpc64 known so far is the AIX ABI. */
+#if defined(__powerpc64__) && !defined(__powerpc64le__)
+/* The ABI on powerpc64 other than powerpc64le is the AIX ABI. */
 #define __powerpc64aix__  /* AIX ABI, just a closure. */
 #endif
 #if defined(__hppanew__)
@@ -286,6 +286,10 @@
 #define TRAMP_LENGTH 40
 #define TRAMP_ALIGN 8
 #endif
+#ifdef __powerpc64le__
+#define TRAMP_LENGTH 32
+#define TRAMP_ALIGN 8
+#endif
 #ifdef __m88k__
 #define TRAMP_LENGTH 20
 #define TRAMP_ALIGN 8
@@ -873,6 +877,31 @@
 #define tramp_data(function)  \
   ((long *) function)[3]
 #endif
+#ifdef __powerpc64le__
+  /* function:
+   *    ld      r11,16(r12)
+   *    ld      r12,24(r12)
+   *    mtctr   r12
+   *    bctr
+   *    .quad <data>
+   *    .quad <address>
+   */
+  *(int *)  (function + 0) = 0xE96C0010;  /* ld  r11,16(r12) */
+  *(int *)  (function + 4) = 0xE98C0018;  /* ld  r12,24(r12) */
+  *(int *)  (function + 8) = 0x7D8903A6;  /* mtctr r12       */
+  *(int *)  (function +12) = 0x4E800420;  /* bctr            */
+  *(long *) (function +16) = (long) data;
+  *(long *) (function +24) = (long) address;
+#define is_tramp(function)  \
+  *(unsigned int *) (function + 0) == 0xE96C0010 && \
+  *(unsigned int *) (function + 4) == 0xE98C0018 && \
+  *(unsigned int *) (function + 8) == 0x7D8903A6 && \
+  *(unsigned int *) (function +12) == 0x4E800420
+#define tramp_address(function)  \
+  ((long *) function)[3]
+#define tramp_data(function)  \
+  ((long *) function)[2]
+#endif
 #ifdef __m88k__
   /* function:
    *    or.u    #r11,#r0,hi16(<data>)		5D 60 hi16(<data>)
@@ -1044,7 +1073,7 @@
    * cache. The freshly built trampoline is visible to the data cache, but not
    * maybe not to the instruction cache. This is hairy.
    */
-#if !(defined(__hppanew__) || defined(__powerpcaix__) || defined(__powerpc64aix__) || defined(__ia64__))
+#if !(defined(__hppanew__) || defined(__powerpcaix__) || defined(__powerpc64aix__) || defined(__powerpc64le__) || defined(__ia64__))
   /* Only needed if we really set up machine instructions. */
 #ifdef __i386__
 #if defined(_WIN32)
diff -urN libffcall/ffcall/callback/trampoline_r/trampoline_r.h.in libffcall.ppc64le/ffcall/callback/trampoline_r/trampoline_r.h.in
--- libffcall/ffcall/callback/trampoline_r/trampoline_r.h.in	2010-07-21 05:48:04.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/trampoline_r/trampoline_r.h.in	2015-07-22 06:57:53.491560933 +0900
@@ -53,6 +53,9 @@
 #ifndef __powerpc64__
 #undef __powerpc64__
 #endif
+#ifndef __powerpc64le__
+#undef __powerpc64le__
+#endif
 #ifndef __s390__
 #undef __s390__
 #endif
diff -urN libffcall/ffcall/callback/trampoline_r/tramp-powerpc64le.new.S libffcall.ppc64le/ffcall/callback/trampoline_r/tramp-powerpc64le.new.S
--- libffcall/ffcall/callback/trampoline_r/tramp-powerpc64le.new.S	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/trampoline_r/tramp-powerpc64le.new.S	2015-07-22 07:10:57.027914450 +0900
@@ -0,0 +1,25 @@
+/* Trampoline for powerpc64 CPU with ELF v2 calling convention */
+
+/*
+ * Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
+ * Copyright 2015 Masanori Mitsugi, <mitsugi@linux.vnet.ibm.com>
+ *
+ * This is free software distributed under the GNU General Public Licence
+ * described in the file COPYING. Contact the author if you don't have this
+ * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
+ * on this software.
+ */
+
+/* Available registers: r0, r12, r11, r10, r9, r8, r7, r6, r5, r4, r3. */
+/* However, r0 is special in that it cannot be used as a base register. */
+/* And r3...r10 should not be clobbered because they contain the first 8
+ * integer arguments to the function being called. */
+
+	.globl tramp_r
+tramp_r:
+0:      ld  11,1f-0b(12)  /* get data */
+        ld  12,2f-0b(12)  /* get function */
+        mtctr 12
+        bctr
+1:      .quad 0x7355471143622155 /* data */
+2:      .quad 0xbabebec0dea0ffab /* function */
diff -urN libffcall/ffcall/callback/vacall_r/Makefile.devel libffcall.ppc64le/ffcall/callback/vacall_r/Makefile.devel
--- libffcall/ffcall/callback/vacall_r/Makefile.devel	2009-10-17 03:09:06.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/vacall_r/Makefile.devel	2015-07-22 06:57:53.492560829 +0900
@@ -92,6 +92,9 @@
 vacall-powerpc64.s : vacall-powerpc64.c vacall_r.h.in
 	/cross/powerpc64-linux-tools/bin/powerpc64-linux-gcc $(GCCFLAGS) -D__powerpc64__ -S vacall-powerpc64.c -o vacall-powerpc64.s
 
+vacall-powerpc64le.s : vacall-powerpc64le.c vacall_r.h.in
+	$(GCC) $(GCCFLAGS) -D__powerpc64__ -D__powerpc64le__ -S vacall-powerpc64le.c -o vacall-powerpc64le.s
+
 vacall-m88k.s : vacall-m88k.c vacall_r.h.in
 	$(GCC) -V 2.95.2 -b m88k-dgux $(GCCFLAGS) -D__m88k__ -S vacall-m88k.c -o vacall-m88k.s
 
diff -urN libffcall/ffcall/callback/vacall_r/Makefile.in libffcall.ppc64le/ffcall/callback/vacall_r/Makefile.in
--- libffcall/ffcall/callback/vacall_r/Makefile.in	2012-04-25 00:22:24.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/vacall_r/Makefile.in	2015-07-22 06:57:53.492560829 +0900
@@ -143,6 +143,9 @@
 vacall-powerpc64.lo : $(srcdir)/vacall-powerpc64.s
 	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-powerpc64.s
 
+vacall-powerpc64le.lo : $(srcdir)/vacall-powerpc64le.s
+	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-powerpc64le.s
+
 vacall-m88k.lo : $(srcdir)/vacall-m88k.s
 	$(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-m88k.s
 
diff -urN libffcall/ffcall/callback/vacall_r/vacall-powerpc64le.c libffcall.ppc64le/ffcall/callback/vacall_r/vacall-powerpc64le.c
--- libffcall/ffcall/callback/vacall_r/vacall-powerpc64le.c	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/vacall_r/vacall-powerpc64le.c	2015-07-22 07:09:49.808917789 +0900
@@ -0,0 +1,175 @@
+/* vacall function for powerpc64le CPU */
+
+/*
+ * Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
+ * Copyright 2000 Adam Fedor, <fedor@gnu.org>
+ * Copyright 2004 Paul Guyot, <pguyot@kallisys.net>
+ * Copyright 2015 Masanori Mitsugi, <mitsugi@linux.vnet.ibm.com>
+ *
+ * This is free software distributed under the GNU General Public Licence
+ * described in the file COPYING. Contact the author if you don't have this
+ * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
+ * on this software.
+ */
+
+#ifndef REENTRANT
+#include "vacall.h.in"
+#else /* REENTRANT */
+#include "vacall_r.h.in"
+#endif
+
+#ifdef REENTRANT
+#define __vacall __vacall_r
+register struct { void (*vacall_function) (void*,va_alist); void* arg; }
+         *		env	__asm__("r11");
+#endif
+register double		farg1	__asm__("fr1");
+register double		farg2	__asm__("fr2");
+register double		farg3	__asm__("fr3");
+register double		farg4	__asm__("fr4");
+register double		farg5	__asm__("fr5");
+register double		farg6	__asm__("fr6");
+register double		farg7	__asm__("fr7");
+register double		farg8	__asm__("fr8");
+register double		farg9	__asm__("fr9");
+register double		farg10	__asm__("fr10");
+register double		farg11	__asm__("fr11");
+register double		farg12	__asm__("fr12");
+register double		farg13	__asm__("fr13");
+register __vaword	iret	__asm__("r3");
+register __vaword	iret2	__asm__("r4");
+register float		fret	__asm__("fr1");
+register double		dret	__asm__("fr1");
+
+void /* the return type is variable, not void! */
+__vacall (__vaword word1, __vaword word2, __vaword word3, __vaword word4,
+          __vaword word5, __vaword word6, __vaword word7, __vaword word8,
+          __vaword firstword)
+{
+  __va_alist list;
+  /* When a parameter is passed in a register,
+   * stack space is still allocated for it.
+   */
+  /* Move the arguments passed in registers to their stack locations. */
+  (&firstword)[-8] = word1;
+  (&firstword)[-7] = word2;
+  (&firstword)[-6] = word3;
+  (&firstword)[-5] = word4;
+  (&firstword)[-4] = word5;
+  (&firstword)[-3] = word6;
+  (&firstword)[-2] = word7;
+  (&firstword)[-1] = word8;
+  list.farg[0] = farg1;
+  list.farg[1] = farg2;
+  list.farg[2] = farg3;
+  list.farg[3] = farg4;
+  list.farg[4] = farg5;
+  list.farg[5] = farg6;
+  list.farg[6] = farg7;
+  list.farg[7] = farg8;
+  list.farg[8] = farg9;
+  list.farg[9] = farg10;
+  list.farg[10] = farg11;
+  list.farg[11] = farg12;
+  list.farg[12] = farg13;
+  /* Prepare the va_alist. */
+  list.flags = 0;
+  list.aptr = (long)(&firstword - 8);
+  list.raddr = (void*)0;
+  list.rtype = __VAvoid;
+  list.memfargptr = &list.farg[0];
+  /* Call vacall_function. The macros do all the rest. */
+#ifndef REENTRANT
+  (*vacall_function) (&list);
+#else /* REENTRANT */
+  (*env->vacall_function) (env->arg,&list);
+#endif
+  /* Put return value into proper register. */
+  if (list.rtype == __VAvoid) {
+  } else
+  if (list.rtype == __VAchar) {
+    iret = list.tmp._char;
+  } else
+  if (list.rtype == __VAschar) {
+    iret = list.tmp._schar;
+  } else
+  if (list.rtype == __VAuchar) {
+    iret = list.tmp._uchar;
+  } else
+  if (list.rtype == __VAshort) {
+    iret = list.tmp._short;
+  } else
+  if (list.rtype == __VAushort) {
+    iret = list.tmp._ushort;
+  } else
+  if (list.rtype == __VAint) {
+    iret = list.tmp._int;
+  } else
+  if (list.rtype == __VAuint) {
+    iret = list.tmp._uint;
+  } else
+  if (list.rtype == __VAlong) {
+    iret = list.tmp._long;
+  } else
+  if (list.rtype == __VAulong) {
+    iret = list.tmp._ulong;
+  } else
+  if (list.rtype == __VAlonglong) {
+    iret = list.tmp._long;
+  } else
+  if (list.rtype == __VAulonglong) {
+    iret = list.tmp._ulong;
+  } else
+  if (list.rtype == __VAfloat) {
+    fret = list.tmp._float;
+  } else
+  if (list.rtype == __VAdouble) {
+    dret = list.tmp._double;
+  } else
+  if (list.rtype == __VAvoidp) {
+    iret = (long)list.tmp._ptr;
+  } else
+  if (list.rtype == __VAstruct) {
+    if (list.flags & __VA_PCC_STRUCT_RETURN) {
+      iret = (long) list.raddr;
+    } else {
+      if (list.flags & __VA_REGISTER_STRUCT_RETURN) {
+        /* Return structs of size <= 16 in registers. */
+        if (list.rsize > 0 && list.rsize <= 16) {
+          iret = (__vaword)((unsigned char *) list.raddr)[0];
+          if (list.rsize >= 2)
+            iret |= (__vaword)((unsigned char *) list.raddr)[1] << 8;
+          if (list.rsize >= 3)
+            iret |= (__vaword)((unsigned char *) list.raddr)[2] << 16;
+          if (list.rsize >= 4)
+            iret |= (__vaword)((unsigned char *) list.raddr)[3] << 24;
+          if (list.rsize >= 5)
+            iret |= (__vaword)((unsigned char *) list.raddr)[4] << 32;
+          if (list.rsize >= 6)
+            iret |= (__vaword)((unsigned char *) list.raddr)[5] << 40;
+          if (list.rsize >= 7)
+            iret |= (__vaword)((unsigned char *) list.raddr)[6] << 48;
+          if (list.rsize >= 8)
+            iret |= (__vaword)((unsigned char *) list.raddr)[7] << 56;
+          if (list.rsize >= 9) {
+            iret2 = (__vaword)((unsigned char *) list.raddr)[8];
+            if (list.rsize >= 10)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[9] << 8;
+            if (list.rsize >= 11)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[10] << 16;
+            if (list.rsize >= 12)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[11] << 24;
+            if (list.rsize >= 13)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[12] << 32;
+            if (list.rsize >= 14)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[13] << 40;
+            if (list.rsize >= 15)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[14] << 48;
+            if (list.rsize >= 16)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[15] << 56;
+          }
+        }
+      }
+    }
+  }
+}
diff -urN libffcall/ffcall/callback/vacall_r/vacall-powerpc64le.s libffcall.ppc64le/ffcall/callback/vacall_r/vacall-powerpc64le.s
--- libffcall/ffcall/callback/vacall_r/vacall-powerpc64le.s	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/vacall_r/vacall-powerpc64le.s	2015-07-22 06:57:53.493560725 +0900
@@ -0,0 +1,235 @@
+	.file	"vacall-powerpc64le.c"
+	.abiversion 2
+	.section	".toc","aw"
+	.section	".text"
+	.align 2
+	.p2align 4,,15
+	.globl __vacall_r
+	.type	__vacall_r, @function
+__vacall_r:
+0:	addis 2,12,.TOC.-0b@ha
+	addi 2,2,.TOC.-0b@l
+	.localentry	__vacall_r,.-__vacall_r
+	mflr 0
+	std 31,-8(1)
+	li 12,0
+	std 0,16(1)
+	stdu 1,-304(1)
+	ld 0,0(11)
+	std 3,336(1)
+	ld 3,8(11)
+	std 9,384(1)
+	li 9,0
+	std 4,344(1)
+	addi 4,1,32
+	std 12,48(1)
+	stw 12,56(1)
+	mtctr 0
+	stw 9,32(1)
+	addi 9,1,336
+	std 5,352(1)
+	std 6,360(1)
+	std 7,368(1)
+	mr 12,0
+	std 9,40(1)
+	addi 9,1,96
+	std 8,376(1)
+	std 10,392(1)
+	stfd 1,96(1)
+	std 9,88(1)
+	stfd 2,104(1)
+	stfd 3,112(1)
+	stfd 4,120(1)
+	stfd 5,128(1)
+	stfd 6,136(1)
+	stfd 7,144(1)
+	stfd 8,152(1)
+	stfd 9,160(1)
+	stfd 10,168(1)
+	stfd 11,176(1)
+	stfd 12,184(1)
+	stfd 13,192(1)
+	std 2,24(1)
+	bctrl
+	ld 2,24(1)
+	lwz 9,56(1)
+	cmpdi 7,9,0
+	beq 7,.L1
+	cmplwi 7,9,1
+	beq 7,.L6
+	cmplwi 7,9,2
+	beq 7,.L72
+	cmplwi 7,9,3
+	beq 7,.L6
+	cmplwi 7,9,4
+	beq 7,.L73
+	cmplwi 7,9,5
+	beq 7,.L74
+	cmplwi 7,9,6
+	beq 7,.L75
+	cmplwi 7,9,7
+	beq 7,.L76
+	addi 10,9,-8
+	cmplwi 7,10,3
+	ble 7,.L14
+	cmplwi 7,9,12
+	beq 7,.L77
+	cmplwi 7,9,13
+	beq 7,.L78
+	cmplwi 7,9,14
+	beq 7,.L14
+	cmplwi 7,9,15
+	bne 7,.L1
+	lwz 9,32(1)
+	rldicl. 10,9,0,63
+	bne 0,.L79
+	rldicl. 10,9,54,63
+	beq 0,.L1
+	ld 9,64(1)
+	addi 10,9,-1
+	cmpldi 7,10,15
+	bgt 7,.L1
+	ld 10,48(1)
+	cmpldi 7,9,1
+	lbz 8,0(10)
+	mr 3,8
+	beq 7,.L1
+	lbz 7,1(10)
+	cmpldi 7,9,2
+	sldi 7,7,8
+	or 8,7,8
+	mr 3,8
+	beq 7,.L1
+	lbz 7,2(10)
+	cmpldi 7,9,3
+	sldi 7,7,16
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,3(10)
+	cmpldi 7,9,4
+	sldi 7,7,24
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,4(10)
+	cmpldi 7,9,5
+	sldi 7,7,32
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,5(10)
+	cmpldi 7,9,6
+	sldi 7,7,40
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,6(10)
+	cmpldi 7,9,7
+	sldi 7,7,48
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,7(10)
+	cmpldi 7,9,8
+	sldi 7,7,56
+	or 3,8,7
+	beq- 7,.L1
+	cmpldi 7,9,9
+	lbz 8,8(10)
+	mr 4,8
+	beq 7,.L1
+	lbz 7,9(10)
+	cmpldi 7,9,10
+	sldi 7,7,8
+	or 8,7,8
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,10(10)
+	cmpldi 7,9,11
+	sldi 7,7,16
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,11(10)
+	cmpldi 7,9,12
+	sldi 7,7,24
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,12(10)
+	cmpldi 7,9,13
+	sldi 7,7,32
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,13(10)
+	cmpldi 7,9,14
+	sldi 7,7,40
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,14(10)
+	cmpldi 7,9,16
+	sldi 7,7,48
+	or 8,8,7
+	mr 4,8
+	bne- 7,.L1
+	lbz 9,15(10)
+	sldi 9,9,56
+	or 4,8,9
+	.p2align 4,,15
+.L1:
+	addi 1,1,304
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+	.p2align 4,,15
+.L6:
+	lbz 3,72(1)
+	addi 1,1,304
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+	.p2align 4,,15
+.L72:
+	lbz 9,72(1)
+	extsb 3,9
+	b .L1
+	.p2align 4,,15
+.L14:
+	ld 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L73:
+	lha 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L74:
+	lhz 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L75:
+	lwa 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L77:
+	lfs 1,72(1)
+	b .L1
+	.p2align 4,,15
+.L76:
+	lwz 3,72(1)
+	b .L1
+.L78:
+	lfd 1,72(1)
+	b .L1
+.L79:
+	ld 3,48(1)
+	b .L1
+	.long 0
+	.byte 0,0,0,1,128,1,0,0
+	.size	__vacall_r,.-__vacall_r
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
diff -urN libffcall/ffcall/callback/vacall_r/vacall_r.h.in libffcall.ppc64le/ffcall/callback/vacall_r/vacall_r.h.in
--- libffcall/ffcall/callback/vacall_r/vacall_r.h.in	2009-10-17 03:09:06.000000000 +0900
+++ libffcall.ppc64le/ffcall/callback/vacall_r/vacall_r.h.in	2015-07-22 06:57:53.493560725 +0900
@@ -53,6 +53,9 @@
 #ifndef __powerpc64__
 #undef __powerpc64__
 #endif
+#ifndef __powerpc64le__
+#undef __powerpc64le__
+#endif
 #ifndef __s390__
 #undef __s390__
 #endif
@@ -288,7 +291,7 @@
 #endif
 
   /* These are for internal use only */
-#if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)
+#if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || (defined(__powerpc64__) && defined(__powerpc64le__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)
   __VA_REGISTER_STRUCT_RETURN	= 1<<10,
 #endif
 #if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__)
@@ -551,12 +554,18 @@
     && ((LIST)->flags |= __VA_REGISTER_DOUBLESTRUCT_RETURN),			\
    0)
 #endif
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) && !defined(__powerpc64le__)
 #define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
   0
 #define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE)  \
   0
 #endif
+#if defined(__powerpc64__) && defined(__powerpc64le__)
+#define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
+  ((TYPE_SIZE) <= 16)
+#define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE)  \
+  ((LIST)->flags |= __VA_REGISTER_STRUCT_RETURN, 0)
+#endif
 #if defined(__sparc64__) || defined(__ia64__)
 #define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
   ((TYPE_SIZE) <= 32)
@@ -714,12 +723,12 @@
    (LIST)->aptr + ((-(TYPE_SIZE)) & 3)					\
   )
 #endif
-#if defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__ARMEL__) || ((defined(__mipsn32__) || defined(__mips64__)) && defined(_MIPSEL))
+#if defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__ARMEL__) || ((defined(__mipsn32__) || defined(__mips64__)) && defined(_MIPSEL)) || (defined(__powerpc64__) && defined(__powerpc64le__))
 /* little endian -> small args < 1 word are adjusted to the left */
 #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN)  \
   __va_arg_leftadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)
 #endif
-#if defined(__m68k__) || ((defined(__mipsn32__) || defined(__mips64__)) && defined(_MIPSEB)) || defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || (defined(__arm__) && !defined(__ARMEL__)) || defined(__powerpc__) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__s390__)
+#if defined(__m68k__) || ((defined(__mipsn32__) || defined(__mips64__)) && defined(_MIPSEB)) || defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || (defined(__arm__) && !defined(__ARMEL__)) || ((defined(__powerpc__) || defined(__powerpc64__)) && !defined(__powerpc64le__)) || defined(__m88k__) || defined(__convex__) || defined(__s390__)
 /* big endian -> small args < 1 word are adjusted to the right */
 #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN)  \
   __va_arg_rightadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)
@@ -974,12 +983,22 @@
 #endif
 #if defined(__powerpc64__)
 /* The first 13 floating-point args have been stored elsewhere. */
+#if defined(__powerpc64le__)
+#define va_arg_float(LIST)  \
+  ((LIST)->aptr += sizeof(__vaword),                                    \
+   ((LIST)->memfargptr < &(LIST)->farg[13]                              \
+    ? (float) *((LIST)->memfargptr++)                                   \
+    : *(float*)((LIST)->aptr - sizeof(__vaword))                        \
+  ))
+#else
 #define va_arg_float(LIST)  \
   ((LIST)->aptr += sizeof(__vaword),					\
    ((LIST)->memfargptr < &(LIST)->farg[13]				\
     ? (float) *((LIST)->memfargptr++)					\
     : *(float*)((LIST)->aptr - sizeof(float))				\
   ))
+#endif
+
 #define va_arg_double(LIST)  \
   (__va_align_double(LIST)						\
    (LIST)->aptr += sizeof(double),					\
diff -urN libffcall/ffcall/trampoline/Makefile.devel libffcall.ppc64le/ffcall/trampoline/Makefile.devel
--- libffcall/ffcall/trampoline/Makefile.devel	2009-04-28 01:44:14.000000000 +0900
+++ libffcall.ppc64le/ffcall/trampoline/Makefile.devel	2015-07-22 06:57:53.493560725 +0900
@@ -58,6 +58,9 @@
 proto-powerpc64-aix.s : proto64.c
 	/cross/powerpc64-linux-tools/bin/powerpc64-linux-gcc $(GCCFLAGS) -D__powerpc64__ -S proto64.c -o $@
 
+proto-powerpc64le.s : proto64.c
+	$(GCC) $(GCCFLAGS) -D__powerpc64__ -D__powerpc64le__ -S proto64.c -o $@
+
 proto-m88k.s : proto.c
 	$(GCC) -V 2.95.2 -b m88k-dgux $(GCCFLAGS) -D__m88k__ -S proto.c -o $@
 
diff -urN libffcall/ffcall/trampoline/Makefile.in libffcall.ppc64le/ffcall/trampoline/Makefile.in
--- libffcall/ffcall/trampoline/Makefile.in	2010-09-04 04:07:24.000000000 +0900
+++ libffcall.ppc64le/ffcall/trampoline/Makefile.in	2015-07-22 06:57:53.494560621 +0900
@@ -74,6 +74,12 @@
 tramp-powerpc64.s : $(srcdir)/tramp-powerpc64.new.S
 	$(CPP) $(srcdir)/tramp-powerpc64.new.S > tramp-powerpc64.s
 
+tramp-powerpc64le.o : tramp-powerpc64le.s
+	$(CC) @GCC_X_NONE@ -c tramp-powerpc64le.s
+
+tramp-powerpc64le.s : $(srcdir)/tramp-powerpc64le.new.S
+	$(CPP) $(srcdir)/tramp-powerpc64le.new.S > tramp-powerpc64le.s
+
 tramp-ia64.o : $(srcdir)/tramp-ia64.s
 	$(CC) @GCC_X_NONE@ -c $(srcdir)/tramp-ia64.s
 
diff -urN libffcall/ffcall/trampoline/proto-powerpc64le.s libffcall.ppc64le/ffcall/trampoline/proto-powerpc64le.s
--- libffcall/ffcall/trampoline/proto-powerpc64le.s	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/trampoline/proto-powerpc64le.s	2015-07-22 06:57:53.494560621 +0900
@@ -0,0 +1,59 @@
+	.file	"proto64.c"
+	.abiversion 2
+	.section	".toc","aw"
+	.section	".text"
+	.align 2
+	.p2align 4,,15
+	.globl tramp
+	.type	tramp, @function
+tramp:
+0:	addis 2,12,.TOC.-0b@ha
+	addi 2,2,.TOC.-0b@l
+	.localentry	tramp,.-tramp
+	mflr 0
+	lis 9,0x1234
+	lis 10,0x7355
+	ori 9,9,22136
+	ori 10,10,18193
+	lis 12,0xbabe
+	sldi 9,9,32
+	sldi 10,10,32
+	ori 12,12,48832
+	oris 9,9,0x1357
+	std 0,16(1)
+	stdu 1,-96(1)
+	oris 10,10,0x4362
+	sldi 12,12,32
+	ori 9,9,34661
+	ori 10,10,8533
+	oris 12,12,0xdea0
+	ori 12,12,65451
+	std 10,0(9)
+	mtctr 12
+	std 2,24(1)
+	bctrl
+	ld 2,24(1)
+	addi 1,1,96
+	ld 0,16(1)
+	mtlr 0
+	blr
+	.long 0
+	.byte 0,0,0,1,128,0,0,0
+	.size	tramp,.-tramp
+	.align 2
+	.p2align 4,,15
+	.globl jump
+	.type	jump, @function
+jump:
+	lis 9,0xbabe
+	ori 9,9,48832
+	sldi 9,9,32
+	oris 9,9,0xdea0
+	ori 9,9,65451
+	mtctr 9
+	bctr
+	.long 0
+	.byte 0,0,0,0,0,0,0,0
+	.size	jump,.-jump
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
diff -urN libffcall/ffcall/trampoline/trampoline.c libffcall.ppc64le/ffcall/trampoline/trampoline.c
--- libffcall/ffcall/trampoline/trampoline.c	2008-09-27 05:19:37.000000000 +0900
+++ libffcall.ppc64le/ffcall/trampoline/trampoline.c	2015-07-22 06:57:53.494560621 +0900
@@ -27,8 +27,8 @@
 #define __powerpcaix__  /* AIX ABI, just a closure. */
 #endif
 #endif
-#if defined(__powerpc64__)
-/* The only ABI on powerpc64 known so far is the AIX ABI. */
+#if defined(__powerpc64__) && !defined(__powerpc64le__)
+/* The ABI on powerpc64 other than powerpc64le is the AIX ABI. */
 #define __powerpc64aix__  /* AIX ABI, just a closure. */
 #endif
 #if defined(__hppanew__)
@@ -290,6 +290,10 @@
 #define TRAMP_LENGTH 48
 #define TRAMP_ALIGN 8
 #endif
+#ifdef __powerpc64le__
+#define TRAMP_LENGTH 64
+#define TRAMP_ALIGN 8
+#endif
 #ifdef __m88k__
 #define TRAMP_LENGTH 32
 #define TRAMP_ALIGN 8
@@ -986,6 +990,49 @@
 #define tramp_data(function)  \
   ((long *) function)[4]
 #endif
+#ifdef __powerpc64le__
+  /* function:
+   *	std	r3,56(r12)
+   *    ld      r3,32(r12)
+   *    ld	r11,40(r12)
+   *	std	r11,0(r3)
+   *    ld      r3,56(r12)
+   *	ld	r12,48(r12)
+   *	mtctr	r12
+   *	bctr	
+   *    .quad <variable>
+   *    .quad <data>
+   *    .quad <address>
+   *    .quad 0
+   */
+  *(int *)  (function + 0) = 0xF86C0038;  /* std r3,56(r12)  */
+  *(int *)  (function + 4) = 0xE86C0020;  /* ld  r3,32(r12)  */
+  *(int *)  (function + 8) = 0xE96C0028;  /* ld  r11,40(r12) */
+  *(int *)  (function +12) = 0xF9630000;  /* ld  r11,0(r3)   */
+  *(int *)  (function +16) = 0xE86C0038;  /* ld  r3,56(r12)  */
+  *(int *)  (function +20) = 0xE98C0030;  /* ld  r12,48(r12) */
+  *(int *)  (function +24) = 0x7D8903A6;  /* mtctr r12       */
+  *(int *)  (function +28) = 0x4E800420;  /* bctr            */
+  *(long *) (function +32) = (long) variable;
+  *(long *) (function +40) = (long) data;
+  *(long *) (function +48) = (long) address;
+  *(long *) (function +56) = (long) 0x0L;
+#define is_tramp(function)  \
+  *(unsigned int *) (function + 0) == 0xF86C0038 && \
+  *(unsigned int *) (function + 4) == 0xE86C0020 && \
+  *(unsigned int *) (function + 8) == 0xE96C0028 && \
+  *(unsigned int *) (function +12) == 0xF9630000 && \
+  *(unsigned int *) (function +16) == 0xE86C0038 && \
+  *(unsigned int *) (function +20) == 0xE98C0030 && \
+  *(unsigned int *) (function +24) == 0x7D8903A6 && \
+  *(unsigned int *) (function +28) == 0x4E800420
+#define tramp_address(function)  \
+  ((long *) function)[6]
+#define tramp_variable(function)  \
+  ((long *) function)[4]
+#define tramp_data(function)  \
+  ((long *) function)[5]
+#endif
 #ifdef __m88k__
   /* function:
    *    or.u    #r13,#r0,hi16(<variable>)	5D A0 hi16(<variable>)
@@ -1199,7 +1246,7 @@
    * cache. The freshly built trampoline is visible to the data cache, but not
    * maybe not to the instruction cache. This is hairy.
    */
-#if !(defined(__hppanew__) || defined(__powerpcaix__) || defined(__powerpc64aix__) || defined(__ia64__))
+#if !(defined(__hppanew__) || defined(__powerpcaix__) || defined(__powerpc64aix__) || defined(__powerpc64le__) || defined(__ia64__))
   /* Only needed if we really set up machine instructions. */
 #ifdef __i386__
 #if defined(_WIN32)
diff -urN libffcall/ffcall/trampoline/trampoline.h.in libffcall.ppc64le/ffcall/trampoline/trampoline.h.in
--- libffcall/ffcall/trampoline/trampoline.h.in	2010-07-21 05:48:04.000000000 +0900
+++ libffcall.ppc64le/ffcall/trampoline/trampoline.h.in	2015-07-22 06:57:53.494560621 +0900
@@ -53,6 +53,9 @@
 #ifndef __powerpc64__
 #undef __powerpc64__
 #endif
+#ifndef __powerpc64le__
+#undef __powerpc64le__
+#endif
 #ifndef __s390__
 #undef __s390__
 #endif
diff -urN libffcall/ffcall/trampoline/tramp-powerpc64le.new.S libffcall.ppc64le/ffcall/trampoline/tramp-powerpc64le.new.S
--- libffcall/ffcall/trampoline/tramp-powerpc64le.new.S	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/trampoline/tramp-powerpc64le.new.S	2015-07-22 07:08:39.660226459 +0900
@@ -0,0 +1,31 @@
+/* Trampoline for powerpc64le CPU with ELF v2 calling convention */
+
+/*
+ * Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
+ * Copyright 2015 Masanori Mitsugi, <mitsugi@linux.vnet.ibm.com>
+ *
+ * This is free software distributed under the GNU General Public Licence
+ * described in the file COPYING. Contact the author if you don't have this
+ * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
+ * on this software.
+ */
+
+/* Available registers: r0, r12, r11, r10, r9, r8, r7, r6, r5, r4, r3. */
+/* However, r0 is special in that it cannot be used as a base register. */
+/* And r3...r10 should not be clobbered because they contain the first 8
+ * integer arguments to the function being called. */
+
+	.globl tramp
+tramp:
+0:	std  3,4f-0b(12)  /* save r3 */
+	ld   3,1f-0b(12)  /* get variable */
+	ld  11,2f-0b(12)  /* get data */
+	std 11,0(3)       /* Put data into variable */
+	ld   3,4f-0b(12)  /* restore r3 */
+	ld  12,3f-0b(12)  /* get function */
+	mtctr 12
+	bctr
+1:	.quad 0x1234567813578765 /* variable */
+2:	.quad 0x7355471143622155 /* data */
+3:	.quad 0xbabebec0dea0ffab /* function */
+4:	.quad 0x0		 /* r3 save */
diff -urN libffcall/ffcall/vacall/Makefile.devel libffcall.ppc64le/ffcall/vacall/Makefile.devel
--- libffcall/ffcall/vacall/Makefile.devel	2009-10-17 03:09:06.000000000 +0900
+++ libffcall.ppc64le/ffcall/vacall/Makefile.devel	2015-07-22 06:57:53.495560517 +0900
@@ -87,6 +87,9 @@
 vacall-powerpc64.s : vacall-powerpc64.c vacall.h.in
 	/cross/powerpc64-linux-tools/bin/powerpc64-linux-gcc $(GCCFLAGS) -D__powerpc64__ -S vacall-powerpc64.c -o vacall-powerpc64.s
 
+vacall-powerpc64le.s : vacall-powerpc64le.c vacall.h.in
+	$(GCC) $(GCCFLAGS) -D__powerpc64__ -D__powerpc64le__ -S vacall-powerpc64le.c -o vacall-powerpc64le.s
+
 vacall-m88k.s : vacall-m88k.c vacall.h.in
 	$(GCC) -V 2.95.2 -b m88k-dgux $(GCCFLAGS) -D__m88k__ -S vacall-m88k.c -o vacall-m88k.s
 
diff -urN libffcall/ffcall/vacall/Makefile.in libffcall.ppc64le/ffcall/vacall/Makefile.in
--- libffcall/ffcall/vacall/Makefile.in	2010-09-04 04:07:24.000000000 +0900
+++ libffcall.ppc64le/ffcall/vacall/Makefile.in	2015-07-22 06:57:53.495560517 +0900
@@ -125,6 +125,9 @@
 vacall-powerpc64.o : $(srcdir)/vacall-powerpc64.s
 	$(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-powerpc64.s
 
+vacall-powerpc64le.o : $(srcdir)/vacall-powerpc64le.s
+	$(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-powerpc64le.s
+
 vacall-m88k.o : $(srcdir)/vacall-m88k.s
 	$(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-m88k.s
 
diff -urN libffcall/ffcall/vacall/vacall.h.in libffcall.ppc64le/ffcall/vacall/vacall.h.in
--- libffcall/ffcall/vacall/vacall.h.in	2009-10-17 03:09:06.000000000 +0900
+++ libffcall.ppc64le/ffcall/vacall/vacall.h.in	2015-07-22 07:06:15.025296041 +0900
@@ -53,6 +53,9 @@
 #ifndef __powerpc64__
 #undef __powerpc64__
 #endif
+#ifndef __powerpc64le__
+#undef __powerpc64le__
+#endif
 #ifndef __s390__
 #undef __s390__
 #endif
@@ -289,7 +292,7 @@
 #endif
 
   /* These are for internal use only */
-#if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)
+#if defined(__i386__) || defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc64__) || defined(__alpha__) || defined(__arm__) || (defined(__powerpc__) && !defined(__powerpc64__)) || (defined(__powerpc64__) && defined(__powerpc64le__)) || defined(__convex__) || defined(__ia64__) || defined(__x86_64__) || defined(__s390__)
   __VA_REGISTER_STRUCT_RETURN	= 1<<10,
 #endif
 #if defined(__mips__) && !defined(__mipsn32__) && !defined(__mips64__)
@@ -552,12 +555,18 @@
     && ((LIST)->flags |= __VA_REGISTER_DOUBLESTRUCT_RETURN),			\
    0)
 #endif
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) && !defined(__powerpc64le__)
 #define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
   0
 #define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE)  \
   0
 #endif
+#if defined(__powerpc64__) && defined(__powerpc64le__)
+#define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
+  ((TYPE_SIZE) <= 16)
+#define __va_start_struct1(LIST,TYPE_SIZE,TYPE_ALIGN,TYPE_SPLITTABLE)  \
+  ((LIST)->flags |= __VA_REGISTER_STRUCT_RETURN, 0)
+#endif
 #if defined(__sparc64__) || defined(__ia64__)
 #define __va_reg_struct_return(LIST,TYPE_SIZE,TYPE_SPLITTABLE)  \
   ((TYPE_SIZE) <= 32)
@@ -715,12 +724,12 @@
    (LIST)->aptr + ((-(TYPE_SIZE)) & 3)					\
   )
 #endif
-#if defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__ARMEL__)
+#if defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__ARMEL__) || (defined(__powerpc64__) && defined(__powerpc64le__))
 /* little endian -> small args < 1 word are adjusted to the left */
 #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN)  \
   __va_arg_leftadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)
 #endif
-#if defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || (defined(__arm__) && !defined(__ARMEL__)) || defined(__powerpc__) || defined(__powerpc64__) || defined(__m88k__) || defined(__convex__) || defined(__s390__)
+#if defined(__m68k__) || defined(__mipsn32__) || defined(__mips64__) || defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || (defined(__arm__) && !defined(__ARMEL__)) || ((defined(__powerpc__) || defined(__powerpc64__)) && !defined(__powerpc64le__)) || defined(__m88k__) || defined(__convex__) || defined(__s390__)
 /* big endian -> small args < 1 word are adjusted to the right */
 #define __va_arg_adjusted(LIST,TYPE_SIZE,TYPE_ALIGN)  \
   __va_arg_rightadjusted(LIST,TYPE_SIZE,TYPE_ALIGN)
@@ -969,12 +978,22 @@
 #endif
 #if defined(__powerpc64__)
 /* The first 13 floating-point args have been stored elsewhere. */
+#if defined(__powerpc64le__)
+#define va_arg_float(LIST)  \
+  ((LIST)->aptr += sizeof(__vaword),					\
+   ((LIST)->memfargptr < &(LIST)->farg[13]				\
+    ? (float) *((LIST)->memfargptr++)					\
+    : *(float*)((LIST)->aptr - sizeof(__vaword))			\
+  ))
+#else
 #define va_arg_float(LIST)  \
   ((LIST)->aptr += sizeof(__vaword),					\
    ((LIST)->memfargptr < &(LIST)->farg[13]				\
     ? (float) *((LIST)->memfargptr++)					\
     : *(float*)((LIST)->aptr - sizeof(float))				\
   ))
+#endif
+
 #define va_arg_double(LIST)  \
   (__va_align_double(LIST)						\
    (LIST)->aptr += sizeof(double),					\
diff -urN libffcall/ffcall/vacall/vacall-powerpc64le.c libffcall.ppc64le/ffcall/vacall/vacall-powerpc64le.c
--- libffcall/ffcall/vacall/vacall-powerpc64le.c	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/vacall/vacall-powerpc64le.c	2015-07-22 07:06:59.560655833 +0900
@@ -0,0 +1,175 @@
+/* vacall function for powerpc64le CPU */
+
+/*
+ * Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
+ * Copyright 2000 Adam Fedor, <fedor@gnu.org>
+ * Copyright 2004 Paul Guyot, <pguyot@kallisys.net>
+ * Copyright 2015 Masanori Mitsugi, <mitsugi@linux.vnet.ibm.com>
+ *
+ * This is free software distributed under the GNU General Public Licence
+ * described in the file COPYING. Contact the author if you don't have this
+ * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
+ * on this software.
+ */
+
+#ifndef REENTRANT
+#include "vacall.h.in"
+#else /* REENTRANT */
+#include "vacall_r.h.in"
+#endif
+
+#ifdef REENTRANT
+#define __vacall __vacall_r
+register struct { void (*vacall_function) (void*,va_alist); void* arg; }
+         *		env	__asm__("r11");
+#endif
+register double		farg1	__asm__("fr1");
+register double		farg2	__asm__("fr2");
+register double		farg3	__asm__("fr3");
+register double		farg4	__asm__("fr4");
+register double		farg5	__asm__("fr5");
+register double		farg6	__asm__("fr6");
+register double		farg7	__asm__("fr7");
+register double		farg8	__asm__("fr8");
+register double		farg9	__asm__("fr9");
+register double		farg10	__asm__("fr10");
+register double		farg11	__asm__("fr11");
+register double		farg12	__asm__("fr12");
+register double		farg13	__asm__("fr13");
+register __vaword	iret	__asm__("r3");
+register __vaword	iret2	__asm__("r4");
+register float		fret	__asm__("fr1");
+register double		dret	__asm__("fr1");
+
+void /* the return type is variable, not void! */
+__vacall (__vaword word1, __vaword word2, __vaword word3, __vaword word4,
+          __vaword word5, __vaword word6, __vaword word7, __vaword word8,
+          __vaword firstword)
+{
+  __va_alist list;
+  /* When a parameter is passed in a register,
+   * stack space is still allocated for it.
+   */
+  /* Move the arguments passed in registers to their stack locations. */
+  (&firstword)[-8] = word1;
+  (&firstword)[-7] = word2;
+  (&firstword)[-6] = word3;
+  (&firstword)[-5] = word4;
+  (&firstword)[-4] = word5;
+  (&firstword)[-3] = word6;
+  (&firstword)[-2] = word7;
+  (&firstword)[-1] = word8;
+  list.farg[0] = farg1;
+  list.farg[1] = farg2;
+  list.farg[2] = farg3;
+  list.farg[3] = farg4;
+  list.farg[4] = farg5;
+  list.farg[5] = farg6;
+  list.farg[6] = farg7;
+  list.farg[7] = farg8;
+  list.farg[8] = farg9;
+  list.farg[9] = farg10;
+  list.farg[10] = farg11;
+  list.farg[11] = farg12;
+  list.farg[12] = farg13;
+  /* Prepare the va_alist. */
+  list.flags = 0;
+  list.aptr = (long)(&firstword - 8);
+  list.raddr = (void*)0;
+  list.rtype = __VAvoid;
+  list.memfargptr = &list.farg[0];
+  /* Call vacall_function. The macros do all the rest. */
+#ifndef REENTRANT
+  (*vacall_function) (&list);
+#else /* REENTRANT */
+  (*env->vacall_function) (env->arg,&list);
+#endif
+  /* Put return value into proper register. */
+  if (list.rtype == __VAvoid) {
+  } else
+  if (list.rtype == __VAchar) {
+    iret = list.tmp._char;
+  } else
+  if (list.rtype == __VAschar) {
+    iret = list.tmp._schar;
+  } else
+  if (list.rtype == __VAuchar) {
+    iret = list.tmp._uchar;
+  } else
+  if (list.rtype == __VAshort) {
+    iret = list.tmp._short;
+  } else
+  if (list.rtype == __VAushort) {
+    iret = list.tmp._ushort;
+  } else
+  if (list.rtype == __VAint) {
+    iret = list.tmp._int;
+  } else
+  if (list.rtype == __VAuint) {
+    iret = list.tmp._uint;
+  } else
+  if (list.rtype == __VAlong) {
+    iret = list.tmp._long;
+  } else
+  if (list.rtype == __VAulong) {
+    iret = list.tmp._ulong;
+  } else
+  if (list.rtype == __VAlonglong) {
+    iret = list.tmp._long;
+  } else
+  if (list.rtype == __VAulonglong) {
+    iret = list.tmp._ulong;
+  } else
+  if (list.rtype == __VAfloat) {
+    fret = list.tmp._float;
+  } else
+  if (list.rtype == __VAdouble) {
+    dret = list.tmp._double;
+  } else
+  if (list.rtype == __VAvoidp) {
+    iret = (long)list.tmp._ptr;
+  } else
+  if (list.rtype == __VAstruct) {
+    if (list.flags & __VA_PCC_STRUCT_RETURN) {
+      iret = (long) list.raddr;
+    } else {
+      if (list.flags & __VA_REGISTER_STRUCT_RETURN) {
+        /* Return structs of size <= 16 in registers. */
+        if (list.rsize > 0 && list.rsize <= 16) {
+          iret = (__vaword)((unsigned char *) list.raddr)[0];
+          if (list.rsize >= 2)
+            iret |= (__vaword)((unsigned char *) list.raddr)[1] << 8;
+          if (list.rsize >= 3)
+            iret |= (__vaword)((unsigned char *) list.raddr)[2] << 16;
+          if (list.rsize >= 4)
+            iret |= (__vaword)((unsigned char *) list.raddr)[3] << 24;
+          if (list.rsize >= 5)
+            iret |= (__vaword)((unsigned char *) list.raddr)[4] << 32;
+          if (list.rsize >= 6)
+            iret |= (__vaword)((unsigned char *) list.raddr)[5] << 40;
+          if (list.rsize >= 7)
+            iret |= (__vaword)((unsigned char *) list.raddr)[6] << 48;
+          if (list.rsize >= 8)
+            iret |= (__vaword)((unsigned char *) list.raddr)[7] << 56;
+          if (list.rsize >= 9) {
+            iret2 = (__vaword)((unsigned char *) list.raddr)[8];
+            if (list.rsize >= 10)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[9] << 8;
+            if (list.rsize >= 11)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[10] << 16;
+            if (list.rsize >= 12)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[11] << 24;
+            if (list.rsize >= 13)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[12] << 32;
+            if (list.rsize >= 14)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[13] << 40;
+            if (list.rsize >= 15)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[14] << 48;
+            if (list.rsize >= 16)
+              iret2 |= (__vaword)((unsigned char *) list.raddr)[15] << 56;
+          }
+        }
+      }
+    }
+  }
+}
diff -urN libffcall/ffcall/vacall/vacall-powerpc64le.s libffcall.ppc64le/ffcall/vacall/vacall-powerpc64le.s
--- libffcall/ffcall/vacall/vacall-powerpc64le.s	1970-01-01 09:00:00.000000000 +0900
+++ libffcall.ppc64le/ffcall/vacall/vacall-powerpc64le.s	2015-07-22 06:57:53.496560412 +0900
@@ -0,0 +1,240 @@
+	.file	"vacall-powerpc64le.c"
+	.abiversion 2
+	.section	".toc","aw"
+	.section	".text"
+	.section	".toc","aw"
+.LC0:
+	.quad	vacall_function
+	.section	".text"
+	.align 2
+	.p2align 4,,15
+	.globl __vacall
+	.type	__vacall, @function
+__vacall:
+0:	addis 2,12,.TOC.-0b@ha
+	addi 2,2,.TOC.-0b@l
+	.localentry	__vacall,.-__vacall
+	mflr 0
+	std 31,-8(1)
+	addis 11,2,.LC0@toc@ha		# gpr load fusion, type long
+	ld 11,.LC0@toc@l(11)
+	std 0,16(1)
+	stdu 1,-304(1)
+	li 0,0
+	ld 11,0(11)
+	std 9,384(1)
+	li 9,0
+	stfd 1,96(1)
+	std 3,336(1)
+	std 4,344(1)
+	addi 3,1,32
+	stw 9,32(1)
+	addi 9,1,336
+	std 5,352(1)
+	mtctr 11
+	std 6,360(1)
+	std 7,368(1)
+	mr 12,11
+	std 9,40(1)
+	addi 9,1,96
+	std 8,376(1)
+	std 10,392(1)
+	stfd 2,104(1)
+	std 9,88(1)
+	stfd 3,112(1)
+	stfd 4,120(1)
+	stfd 5,128(1)
+	stfd 6,136(1)
+	stfd 7,144(1)
+	stfd 8,152(1)
+	stfd 9,160(1)
+	stfd 10,168(1)
+	stfd 11,176(1)
+	stfd 12,184(1)
+	stfd 13,192(1)
+	std 0,48(1)
+	stw 0,56(1)
+	std 2,24(1)
+	bctrl
+	ld 2,24(1)
+	lwz 9,56(1)
+	cmpdi 7,9,0
+	beq 7,.L1
+	cmplwi 7,9,1
+	beq 7,.L6
+	cmplwi 7,9,2
+	beq 7,.L72
+	cmplwi 7,9,3
+	beq 7,.L6
+	cmplwi 7,9,4
+	beq 7,.L73
+	cmplwi 7,9,5
+	beq 7,.L74
+	cmplwi 7,9,6
+	beq 7,.L75
+	cmplwi 7,9,7
+	beq 7,.L76
+	addi 10,9,-8
+	cmplwi 7,10,3
+	ble 7,.L14
+	cmplwi 7,9,12
+	beq 7,.L77
+	cmplwi 7,9,13
+	beq 7,.L78
+	cmplwi 7,9,14
+	beq 7,.L14
+	cmplwi 7,9,15
+	bne 7,.L1
+	lwz 9,32(1)
+	rldicl. 10,9,0,63
+	bne 0,.L79
+	rldicl. 31,9,54,63
+	beq 0,.L1
+	ld 9,64(1)
+	addi 10,9,-1
+	cmpldi 7,10,15
+	bgt 7,.L1
+	ld 10,48(1)
+	cmpldi 7,9,1
+	lbz 8,0(10)
+	mr 3,8
+	beq 7,.L1
+	lbz 7,1(10)
+	cmpldi 7,9,2
+	sldi 7,7,8
+	or 8,7,8
+	mr 3,8
+	beq 7,.L1
+	lbz 7,2(10)
+	cmpldi 7,9,3
+	sldi 7,7,16
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,3(10)
+	cmpldi 7,9,4
+	sldi 7,7,24
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,4(10)
+	cmpldi 7,9,5
+	sldi 7,7,32
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,5(10)
+	cmpldi 7,9,6
+	sldi 7,7,40
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,6(10)
+	cmpldi 7,9,7
+	sldi 7,7,48
+	or 8,8,7
+	mr 3,8
+	beq- 7,.L1
+	lbz 7,7(10)
+	cmpldi 7,9,8
+	sldi 7,7,56
+	or 3,8,7
+	beq- 7,.L1
+	cmpldi 7,9,9
+	lbz 8,8(10)
+	mr 4,8
+	beq 7,.L1
+	lbz 7,9(10)
+	cmpldi 7,9,10
+	sldi 7,7,8
+	or 8,7,8
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,10(10)
+	cmpldi 7,9,11
+	sldi 7,7,16
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,11(10)
+	cmpldi 7,9,12
+	sldi 7,7,24
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,12(10)
+	cmpldi 7,9,13
+	sldi 7,7,32
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,13(10)
+	cmpldi 7,9,14
+	sldi 7,7,40
+	or 8,8,7
+	mr 4,8
+	beq- 7,.L1
+	lbz 7,14(10)
+	cmpldi 7,9,16
+	sldi 7,7,48
+	or 8,8,7
+	mr 4,8
+	bne- 7,.L1
+	lbz 9,15(10)
+	sldi 9,9,56
+	or 4,8,9
+	.p2align 4,,15
+.L1:
+	addi 1,1,304
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+	.p2align 4,,15
+.L6:
+	lbz 3,72(1)
+	addi 1,1,304
+	ld 0,16(1)
+	ld 31,-8(1)
+	mtlr 0
+	blr
+	.p2align 4,,15
+.L72:
+	lbz 9,72(1)
+	extsb 3,9
+	b .L1
+	.p2align 4,,15
+.L14:
+	ld 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L73:
+	lha 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L74:
+	lhz 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L75:
+	lwa 3,72(1)
+	b .L1
+	.p2align 4,,15
+.L77:
+	lfs 1,72(1)
+	b .L1
+	.p2align 4,,15
+.L76:
+	lwz 3,72(1)
+	b .L1
+.L78:
+	lfd 1,72(1)
+	b .L1
+.L79:
+	ld 3,48(1)
+	b .L1
+	.long 0
+	.byte 0,0,0,1,128,1,0,0
+	.size	__vacall,.-__vacall
+	.ident	"GCC: (GNU) 4.8.3 20140911 (Red Hat 4.8.3-9)"
+	.section	.note.GNU-stack,"",@progbits
