~ chicken-core (chicken-5) 8944c98086762876802a984411ea4d763251df90
commit 8944c98086762876802a984411ea4d763251df90 Author: LemonBoy <thatlemon@gmail.com> AuthorDate: Thu May 5 13:18:56 2016 +1200 Commit: Peter Bex <peter@more-magic.net> CommitDate: Thu May 12 20:06:58 2016 +0200 Convert the shift count to a unsigned word for fxshr Make it behave consistently with regards to fxshl. Signed-off-by: Evan Hanson <evhan@foldling.org> Signed-off-by: Peter Bex <peter@more-magic.net> diff --git a/chicken.h b/chicken.h index ccaa0926..0bfd5fd0 100644 --- a/chicken.h +++ b/chicken.h @@ -1225,7 +1225,7 @@ typedef void (C_ccall *C_proc)(C_word, C_word *) C_noret; #define C_fixnum_xor(n1, n2) (((n1) ^ (n2)) | C_FIXNUM_BIT) #define C_fixnum_not(n) ((~(n)) | C_FIXNUM_BIT) #define C_fixnum_shift_left(n1, n2) (C_fix(((C_uword)C_unfix(n1) << (C_uword)C_unfix(n2)))) -#define C_fixnum_shift_right(n1, n2) (((n1) >> C_unfix(n2)) | C_FIXNUM_BIT) +#define C_fixnum_shift_right(n1, n2) (((n1) >> (C_uword)C_unfix(n2)) | C_FIXNUM_BIT) /* XXX TODO OBSOLETE, but still used by C_fixnum_negate, which is fxneg */ #define C_u_fixnum_negate(n) (-(n) + 2 * C_FIXNUM_BIT) #define C_fixnum_negate(n) (C_u_fixnum_negate(n) | C_FIXNUM_BIT)Trap