Fork of tomsfastmath for fireswarm
Go to file
Sebastian Andrzej Siewior 5d83c4e5ab tfm: use unsigned int for fp_digit on !FP_64BIT
There is a bugzilla entry at clamav [0] reports a problem on s390x
  "mul/fp_mul_comba_20.c:91: warning: right shift count >= width of type"
because fp_digit is 64bit and according to the comment it should be
smaller.
s390x is 64bit platform i.e. long and long long are both 64bit. The
same is true for ppc64, arm64 or sparc64 (RIP alpha).

The headerfile seems only to define FP_64BIT on x86_64.
The current code seems to define SIZEOF_FP_DIGIT either to 8 (64bit) or
to 4 in the else case and 4 looks like int and not long. Therefore the
change here.

If this change makes no sense and you would prefer to use something like
    #if __SIZEOF_LONG__ == 8
       #define FP_64BIT
    #endif

to autodetect a 64bit platform then we could try do this instead. I
haven't tested this patch nor verified that the problem still occures.

If you have no obvious solution and would like to have a confirmation
that this patch solves a problem I could try to get my hands on
something not x86 with 64bit in order to verify.

[0] https://bugzilla.clamav.net/show_bug.cgi?id=9017

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
2015-04-25 14:22:35 +02:00
demo create new make target test_standalone 2015-02-15 15:13:20 +01:00
doc added tomsfastmath-0.12 2010-07-22 10:06:30 +02:00
mtest test/mtest/stest: improve a bit 2014-08-14 21:18:23 +02:00
pre_gen added tomsfastmath-0.12 2010-07-22 10:06:30 +02:00
random_txt_files added tomsfastmath-0.03 2010-07-22 10:06:23 +02:00
src tfm: use unsigned int for fp_digit on !FP_64BIT 2015-04-25 14:22:35 +02:00
.gitignore demo: split up test to 'test' and a new 'timing' build target 2015-02-15 14:26:06 +01:00
.travis.yml travis.yml: fix build target 2015-02-15 15:17:36 +01:00
changes.txt update changes 2014-10-13 12:24:45 +02:00
filter.pl added tomsfastmath-0.12 2010-07-22 10:06:30 +02:00
gen.pl gen.pl: update to current directory structure 2014-08-14 21:17:11 +02:00
genlist.sh added tomsfastmath-0.12 2010-07-22 10:06:30 +02:00
LICENSE after multiple objections of libtom users [1], we decided to change licensing 2011-01-19 10:28:48 +01:00
makefile makefiles: update with new file 2015-02-15 23:33:11 +01:00
makefile.shared Replace spaces with tab to file GNU make problems 2015-02-26 09:17:20 +01:00
mess.sh added tomsfastmath-0.04 2010-07-22 10:06:24 +02:00
parsenames.pl added tomsfastmath-0.12 2010-07-22 10:06:30 +02:00
README.md Add README.md 2014-10-13 19:36:19 +02:00
SPONSORS added tomsfastmath-0.01 2010-07-22 10:06:21 +02:00
testme.sh testme: fix traps 2015-02-15 23:40:45 +01:00
tfm.tex update documentation regarding fp_isprime() 2014-10-13 17:14:10 +02:00
TODO added tomsfastmath-0.10 2010-07-22 10:06:29 +02:00
updatemakes.sh trim trailing spaces/clean-up 2014-06-12 17:35:54 +02:00

tomsfastmath

See doc/tfm.pdf for a detailed documentation

Project Status

master: Build Status