mingw: Support for x86_64-w64-mingw32.
Until now, the assumption was made that POINTER and LONG are the same size. This is not so on x86_64-MinGW, which uses a 4-byte LONG and an 8-byte POINTER. This patch introduces FIXNUM-SIZE, fixing x86_64-MinGW. * module/system/base/target.scm (%native-word-size): Use sizeof long instead of '*. Fixes word size on x86_64-w64-mingw32 (%native-fixnum-size, %target-fixnum-size): New variable. (triplet-pointer-size): Add case for mingw. (target-fixnum-size): New procedure. * libguile/bytevectors.c: Use SIZEOF_LONG > 4 instead of SIZEOF_VOID. * libguile/vm-engine.c (INUM_MAX,INUM_MIN,INUM_STEP): Remove. (BR_ARITHMETIC): Use scm_t_inum and SCM_I_INUM instead of scm_t_signed_bits and SCM_UNPACK. * module/system/vm/assembler.scm (<asm>)[ fixnum-size]: New field. * module/system/vm/assembler.scm (make-assembler): Add #:fixnum-size parameter. (immediate-bits): Use fixnum-size for immediate size.
parent
331d8689
Please register or sign in to comment