Re: Trouble building 2.49.60 beta on Fedora - powerpc64
Bruno Haible <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <1585616.Smch9tqlbR@omega> |
Jerry James wrote: > the s390x, ppc64 and ppc64le builds all fail with this message: > > ../src/lispbibl.d:2987:2: error: #error CLISP has not been ported to > this platform - oint_type_len undefined > #error CLISP has not been ported to this platform - oint_type_len undefined For powerpc64 and powerpc64le, please use the attached patch. Bruno ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel
powerpc64.diff
(text/x-patch, 5 KB)
diff -r e0751ab32db9 src/lispbibl.d
--- a/src/lispbibl.d Sun Aug 20 21:58:05 2017 +0200
+++ b/src/lispbibl.d Sun Aug 20 23:53:08 2017 +0200
@@ -2921,6 +2921,25 @@
#define oint_data_len oint_addr_len
#define oint_data_mask oint_addr_mask
#endif
+ #if defined(POWERPC64)
+ /* UNIX_LINUX:
+ CODE_ADDRESS_RANGE 0x0000000010000000UL
+ MALLOC_ADDRESS_RANGE 0x0000010028000000UL (varies a bit)
+ SHLIB_ADDRESS_RANGE 0x00003FFFA0000000UL
+ STACK_ADDRESS_RANGE 0x00003FFFD1000000UL
+ Virtual address limit (= 2^(MMAP_FIXED_ADDRESS_HIGHEST_BIT+1)-1)
+ 0x00003FFFFFFFFFFFUL
+ Bits 63..56 = type code, Bits 55..0 = address */
+ #define oint_type_shift 56
+ #define oint_type_len 8
+ #define oint_type_mask 0xFF00000000000000UL
+ #define oint_addr_shift 0
+ #define oint_addr_len 56
+ #define oint_addr_mask 0x00FFFFFFFFFFFFFFUL
+ #define oint_data_shift oint_addr_shift
+ #define oint_data_len oint_addr_len
+ #define oint_data_mask oint_addr_mask
+ #endif
#endif
#elif defined(WIDE_SOFT)
/* separate one 32-bit word for typcode and address. */
@@ -3391,26 +3410,32 @@
#define typecode(expr) ((expr).u.both.type)
#endif
/* Furthermore you can do accesses in memory without shift: */
- #if !defined(WIDE) && (((oint_type_shift==24) && BIG_ENDIAN_P) || ((oint_type_shift==0) && !BIG_ENDIAN_P))
+ #if !defined(WIDE) && (oint_type_len==8) && (((oint_type_shift==24) && BIG_ENDIAN_P) || ((oint_type_shift==0) && !BIG_ENDIAN_P))
#define mtypecode(expr) (*(tint*)&(expr))
#define fast_mtypecode
- #elif !defined(WIDE) && (((oint_type_shift==24) && !BIG_ENDIAN_P) || ((oint_type_shift==0) && BIG_ENDIAN_P))
+ #elif !defined(WIDE) && (oint_type_len==8) && (((oint_type_shift==24) && !BIG_ENDIAN_P) || ((oint_type_shift==0) && BIG_ENDIAN_P))
#define mtypecode(expr) (*((tint*)&(expr)+3))
#define fast_mtypecode
#elif defined(WIDE)
#ifdef WIDE_STRUCT
#define mtypecode(expr) ((expr).u.both.type)
+ #elif (oint_type_len==8)
+ #if ((oint_type_shift==56) && BIG_ENDIAN_P) || ((oint_type_shift==0) && !BIG_ENDIAN_P)
+ #define mtypecode(expr) (*(tint*)&(expr))
+ #elif ((oint_type_shift==0) && BIG_ENDIAN_P) || ((oint_type_shift==56) && !BIG_ENDIAN_P)
+ #define mtypecode(expr) (*((tint*)&(expr)+7))
+ #endif
#elif (oint_type_len==16)
- #if (oint_type_shift==0) == BIG_ENDIAN_P
+ #if ((oint_type_shift==48) && BIG_ENDIAN_P) || ((oint_type_shift==0) && !BIG_ENDIAN_P)
+ #define mtypecode(expr) (*(tint*)&(expr))
+ #elif ((oint_type_shift==0) && BIG_ENDIAN_P) || ((oint_type_shift==48) && !BIG_ENDIAN_P)
#define mtypecode(expr) (*((tint*)&(expr)+3))
- #else /* (oint_type_shift==48) == BIG_ENDIAN_P */
- #define mtypecode(expr) (*(tint*)&(expr))
#endif
#elif (oint_type_len==32)
- #if (oint_type_shift==0) == BIG_ENDIAN_P
+ #if ((oint_type_shift==32) && BIG_ENDIAN_P) || ((oint_type_shift==0) && !BIG_ENDIAN_P)
+ #define mtypecode(expr) (*(tint*)&(expr))
+ #elif ((oint_type_shift==0) && BIG_ENDIAN_P) || ((oint_type_shift==32) && !BIG_ENDIAN_P)
#define mtypecode(expr) (*((tint*)&(expr)+1))
- #else /* (oint_type_shift==32) == BIG_ENDIAN_P */
- #define mtypecode(expr) (*(tint*)&(expr))
#endif
#endif
#define fast_mtypecode
diff -r e0751ab32db9 src/spvw.d
--- a/src/spvw.d Sun Aug 20 21:58:05 2017 +0200
+++ b/src/spvw.d Sun Aug 20 23:53:08 2017 +0200
@@ -3164,6 +3164,11 @@
and there is room from 0x003000000000 to 0x007000000000. */
mem.heaps[0].heap_limit = 0x003000000000UL;
mem.heaps[1].heap_limit = 0x007000000000UL;
+ #elif defined(UNIX_LINUX) && defined(POWERPC64)
+ /* On Linux/powerpc64, the available addresses are in the range 0..2^46,
+ and there is room from 0x080000000000 to 0x380000000000. */
+ mem.heaps[0].heap_limit = 0x080000000000UL;
+ mem.heaps[1].heap_limit = 0x380000000000UL;
#elif defined(UNIX_FREEBSD) && defined(AMD64)
mem.heaps[0].heap_limit = 0x001000000000UL;
mem.heaps[1].heap_limit = 0x700000000000UL;
@@ -3216,6 +3221,13 @@
mem.heaps[0].heap_hardlimit = 0x005000000000UL;
mem.heaps[1].heap_limit = 0x005000000000UL;
mem.heaps[1].heap_hardlimit = 0x007000000000UL;
+ #elif defined(UNIX_LINUX) && defined(POWERPC64)
+ /* On Linux/powerpc64, the available addresses are in the range 0..2^46,
+ and there is room from 0x080000000000 to 0x380000000000. */
+ mem.heaps[0].heap_limit = 0x080000000000UL;
+ mem.heaps[0].heap_hardlimit = 0x200000000000UL;
+ mem.heaps[1].heap_limit = 0x200000000000UL;
+ mem.heaps[1].heap_hardlimit = 0x380000000000UL;
#elif defined(TYPECODES) && (oint_addr_len+addr_shift > pointer_bitsize)
#ifdef UNIX_DARWIN
/* 'vmmap' shows that there is room between the malloc area at 0x01...... or 0x02......