1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

Build and pass all test cases on a multiprocessor HP-UX.

* configure.ac, check/Makefile.am, doc/Makefile.am: Do not
	explicitly link to -ldl, but instead autodetect the library
	with dlopen, dlsym, etc.

	* check/lightning.c: Add workaround to apparently buggy
	getopt in HP-UX that sets optind to the wrong index, and
	use RTLD_NEXT on HP-UX instead of RTLD_DEFAULT to dlsym
	global symbols.

	* include/lightning.h: Rework definitions of wordsize and
	byte order to detect proper values on HP-UX.

	* lib/lightning.c: Minor correction to use MAP_ANONYMOUS
	instead of MAP_ANON on HP-UX.

	* lib/jit_hppa.c: Float arguments must be passed on integer
	registers on HP-UX, not only for varargs functions.
	  Add code to properly clear instruction cache. This was
	not required on Debian hppa port, but may have been working
	by accident.

	* lib/jit_hppa-cpu.c: Follow pattern of HP-UX binaries and
	use bve,n instead of bv,n to return from functions.

	* lib/jit_hppa-fpu.c: For some reason "fst? frX,rX,(rY)" did
	not work on the tested computer	(HP-UX B.11.23 U 9000/785 HP-UX)
	so the code was changed, at first for __hpux only to add the
	base and offset register and use the instruction with an
	immediate (zero) offset.
This commit is contained in:
pcpa 2013-06-09 18:31:50 -03:00
parent 3e5a12f747
commit e82e5be448
10 changed files with 244 additions and 30 deletions

View file

@ -27,32 +27,48 @@
#include <stdint.h>
#include <string.h>
#ifndef __WORDSIZE
# if defined(_AIX)
# define __WORDSIZE (__SIZEOF_POINTER__ << 3)
# else
# define __WORDSIZE WORDSIZE
# endif
#ifdef __hpux
# include <machine/param.h>
#endif
#ifndef __BYTE_ORDER
# if defined(_AIX)
# define __BYTE_ORDER __BYTE_ORDER__
#ifndef __WORDSIZE
# if defined(WORDSIZE)
# define __WORDSIZE WORDSIZE
# elif defined(__SIZEOF_POINTER__)
# define __WORDSIZE (__SIZEOF_POINTER__ << 3)
# elif defined(_ILP32)
# define __WORDSIZE 32
# else
# define __BYTE_ORDER BYTE_ORDER
# error cannot figure __WORDSIZE
# endif
#endif
#ifndef __LITTLE_ENDIAN
# if defined(_AIX)
# if defined(LITTLE_ENDIAN)
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# elif defined(__ORDER_LITTLE_ENDIAN__)
# define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
# else
# define __LITTLE_ENDIAN LITTLE_ENDIAN
# define __LITTLE_ENDIAN 1234
# endif
#endif
#ifndef __BIG_ENDIAN
# if defined(_AIX)
# if defined(BIG_ENDIAN)
# define __BIG_ENDIAN BIG_ENDIAN
# elif defined(__ORDER_BIG_ENDIAN__)
# define __BIG_ENDIAN __ORDER_BIG_ENDIAN__
# else
# define __BIG_ENDIAN BIG_ENDIAN
# define __BIG_ENDIAN 4321
# endif
#endif
#ifndef __BYTE_ORDER
# if defined(BYTE_ORDER)
# define __BYTE_ORDER BYTE_ORDER
# elif defined(__BYTE_ORDER__)
# define __BYTE_ORDER __BYTE_ORDER__
# elif defined(_BIG_ENDIAN)
# define __BYTE_ORDER __BIG_ENDIAN
# else
# error cannot figure __BYTE_ORDER
# endif
#endif