mersenneforum.org Compiling 64 bit lattice siever on gcc 4.8.5
 Register FAQ Search Today's Posts Mark Forums Read

 2017-12-29, 17:07 #1 chris2be8     Sep 2009 35048 Posts Compiling 64 bit lattice siever on gcc 4.8.5 Hello, I'm trying to compile the 64 bit lattice siever on a system with gcc 4.8.5 and get: Code: lasieve4_64/athlon64> make liblasieve.a ... m4 -Dn_i_bits=0 ls-defs.asm mpqs_td.asm > mpqs_td.s gcc -c mpqs_td.s mpqs_td.s: Assembler messages: mpqs_td.s:249: Error: incorrect register %r9' used with w' suffix mpqs_td.s:280: Error: incorrect register %r9' used with w' suffix mpqs_td.s:283: Error: incorrect register %rsi' used with w' suffix mpqs_td.s:313: Error: incorrect register %r9' used with w' suffix Makefile:56: recipe for target 'mpqs_td.o' failed make: *** [mpqs_td.o] Error 1 Looking in mpqs_td.s the failing lines are: Code:  cmpw $27,%r9 cmpw$27,%r9 movw %rsi,10(%rdi,%r9,2) cmpw $27,%r9 The same code compiles OK on gcc 4.8.3 so it looks as if gcc is now rejecting something it used to accept. And a bit further up the code I saw: Code:  cmpq$27,%r9 which compiles OK. I'm tempted to change the failing cmpw's to cmpq's. But I don't know what to do with the movw (someday I need to learn Intel assembly language). Any suggestions? Chris
2017-12-29, 17:28   #2
axn

Jun 2003

13·359 Posts

Quote:
 Originally Posted by chris2be8 I'm tempted to change the failing cmpw's to cmpq's. But I don't know what to do with the movw (someday I need to learn Intel assembly language). Any suggestions?
cmpq, movq, etc...

EDIT: w = word = 16 bits, l = long = 32 bits, q = qword = 64 bits. movw, movl, movq, cmpw, cmpl, cmpq, and so on...

Last fiddled with by axn on 2017-12-29 at 17:29

2017-12-29, 17:31   #3
bsquared

"Ben"
Feb 2007

1100110011002 Posts

Quote:
 Originally Posted by chris2be8 I'm tempted to change the failing cmpw's to cmpq's. But I don't know what to do with the movw (someday I need to learn Intel assembly language). Any suggestions? Chris
The error should go away either by changing the 'w's to 'q', or by adding 'w's to the r9's (and changing rsi to si in the movw). Hard to say which is correct without a broader understanding of what the code is doing. Register naming reference: https://en.wikipedia.org/wiki/X86#Structure

Last fiddled with by bsquared on 2017-12-29 at 17:32

 2017-12-30, 08:24 #4 Gimarel   Apr 2010 22×5×7 Posts There's a patch in thread http://www.mersenneforum.org/showthread.php?t=21633
 2017-12-30, 17:35 #5 chris2be8     Sep 2009 111010001002 Posts Thanks, it compiles cleanly with that patch. Chris
 2018-02-06, 16:35 #6 VictordeHolland     "Victor de Hollander" Aug 2011 the Netherlands 117610 Posts Are there any (new) pre-compiled .exe for win64 of lasieve4I<11-16> available? The ones I'm using in combination with the the factmsieve.py (0.76) script and msieveSVN988 must be quite old?? It's not that I really need them, the ones I have work on my Win7 PC with Sandy-bridge CPU. Just curious if there are any newer (faster) ones available? https://github.com/radii/ggnfs Doesn't seem to have had updates in years? and it requires CWEB (I assume from https://github.com/ascherer/cweb ) which won't in msys64/mingw64. I also noticed this thread: http://www.mersenneforum.org/showthread.php?t=21633 that there are some problems with the assembly code??  BTW, I have very limited experience with compiling myself. Last fiddled with by VictordeHolland on 2018-02-06 at 16:37 Reason: can compile as long as it has a working or
2018-02-06, 17:22   #7
henryzz
Just call me Henry

"David"
Sep 2007
Cambridge (GMT)

2·3·13·73 Posts

Quote:
 Originally Posted by VictordeHolland Are there any (new) pre-compiled .exe for win64 of lasieve4I<11-16> available? The ones I'm using in combination with the the factmsieve.py (0.76) script and msieveSVN988 must be quite old?? It's not that I really need them, the ones I have work on my Win7 PC with Sandy-bridge CPU. Just curious if there are any newer (faster) ones available? https://github.com/radii/ggnfs Doesn't seem to have had updates in years? and it requires CWEB (I assume from https://github.com/ascherer/cweb ) which won't in msys64/mingw64. I also noticed this thread: http://www.mersenneforum.org/showthread.php?t=21633 that there are some problems with the assembly code??  BTW, I have very limited experience with compiling myself.
If you have working 64-bit binaries then you won't gain any speed. There are a few things like ETA that aren't in some binaries but nothing crucial.

 Similar Threads Thread Thread Starter Forum Replies Last Post R.D. Silverman Factoring 31 2018-10-08 17:17 pstach Factoring 1 2014-05-23 01:03 fivemack Programming 2 2012-12-16 01:07 Batalov Msieve 54 2010-01-13 19:45 fivemack Factoring 1 2008-01-18 13:47

All times are UTC. The time now is 21:13.

Fri Aug 7 21:13:22 UTC 2020 up 21 days, 17 hrs, 1 user, load averages: 2.51, 2.14, 1.98