mozilla/ia64 patch
Quoted 2 lines · David Mosberger
Below is a patch that makes mozilla work on IA-64 (native, not via IA-32 emulation).
I'll try and get this stuff into the tree before 0.9.1, including build mechanics for determining if we need to link against libffi, and verifying that it's present.
I'll also attach the libffi patch to the IA/64 xptcall bug, for the brave users who want to work with it.
Does anyone out there want to apply this patch to the 0.9 tree and do a build with a static libffi linkage? I'd be overjoyed to put such a build on our site.
Thanks a million, David, for your work here. You're a star.
Mike
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Bill Nottingham
Bill> This part of the patch looks rather odd... Bill
Oops, I goofed. The patched contained a remnant of a botched diff command. You can either ignore the part starting with:
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ffi.cpp Mon May 14 18:03:08 2001
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ffi.cpp Mon May 14 22:50:58 2001
up to the point where the next file starts:
--- /dev/null Sat Mar 24 01:35:12 2001
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ffi.cpp Mon May 14 18:03
or you can use the attached patch, which contains all mozilla changes without the botched diff.
Sorry about that.
--david
Index: nsprpub/pr/include/md/_linux.cfg
=================================RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_linux.cfg,v retrieving revision 3.8.2.1
pr/include/md/nsprpub/pr/include/md/_linux.cfg +46 -0
@@ -120,6 +120,52 @@ #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 +#elif defined(__ia64__) + +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +#define IS_64 + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 8 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 8 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 64 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 64 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 6 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 6 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 8 +#define PR_ALIGN_OF_INT64 8 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 8 +#define PR_ALIGN_OF_POINTER 8 +#define PR_ALIGN_OF_WORD 8 + +#define PR_BYTES_PER_WORD_LOG2 3 +#define PR_BYTES_PER_DWORD_LOG2 3 + #elif defined(__mc68000__) #undef IS_LITTLE_ENDIAN
Index: nsprpub/pr/include/md/_linux.h
=================================RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_linux.h,v retrieving revision 3.24.2.2
pr/include/md/nsprpub/pr/include/md/_linux.h +13 -1
@@ -31,6 +31,8 @@#define _PR_SI_ARCHITECTURE "ppc"#elif defined(__alpha)#define _PR_SI_ARCHITECTURE "alpha" +#elif defined(__ia64__) +#define _PR_SI_ARCHITECTURE "ia64"#elif defined(__mc68000__)#define _PR_SI_ARCHITECTURE "m68k"#elif defined(__sparc__)
@@ -78,7 +80,7 @@#endif #undef _PR_USE_POLL#define _PR_STAT_HAS_ONLY_ST_ATIME -#if defined(__alpha) +#if defined(__alpha) || defined(__ia64__)#define _PR_HAVE_LARGE_OFF_T#else #define _PR_NO_LARGE_FILES
@@ -141,6 +143,16 @@/* XXX not sure if this is correct, or maybe it should be 17? */ #define PR_NUM_GCREGS 9 + +#elif defined(__ia64) + +#define _MD_GET_SP (_t) ((long *)((_t)->md.context[0].__jmpbuf)[0]) +#define _MD_SET_FP (_t, val) +#define _MD_GET_SP_PTR (_t) &(_MD_GET_SP(_t)) +#define _MD_GET_FP_PTR (_t) ((void *) 0) +#define _MD_SP_TYPE long int + +#define PR_NUM_GCREGS _JBLEN#elif defined(__mc68000__)/* m68k based Linux */
Index: xpcom/build/Makefile.in
=================================RCS file: /cvsroot/mozilla/xpcom/build/Makefile.in,v retrieving revision 1.27
build/xpcom/build/Makefile.in +108 -1
115 lines not on this page · raw message
reflect/xptcall/src/md/unix/xptcstubs_ffi.cpp new file +173 -0
173 lines not on this page · raw message