From 58a4c23bbd72fd0fde36266e8c9faa4e199d1232 Mon Sep 17 00:00:00 2001 From: arr Date: Sat, 28 Apr 2018 00:18:03 -0700 Subject: [PATCH 1/1] The MSVC x86_64 compiler defines long as 32-bits. This means '1L' is 32-bits and a 62 bit shift on a 32-bit value is UB which resulted in a 0 for the FP_DHI1 value. --- csrc/pfinnrfp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csrc/pfinnrfp.h b/csrc/pfinnrfp.h index ec476f7..23b379b 100644 --- a/csrc/pfinnrfp.h +++ b/csrc/pfinnrfp.h @@ -23,7 +23,7 @@ #ifdef PF_SUPPORT_FP -#define FP_DHI1 (((PF_FLOAT)(1L<<(sizeof(cell_t)*8-2)))*4.0) +#define FP_DHI1 (((PF_FLOAT)((cell_t)1<<(sizeof(cell_t)*8-2)))*4.0) case ID_FP_D_TO_F: /* ( dlo dhi -- ) ( F: -- r ) */ PUSH_FP_TOS; -- 2.20.1