cc: assembler failed for tmp-divrem_2.s

Torbjorn Granlund tg at
Mon Mar 29 13:19:38 CEST 2010

Dennis Clarke <dclarke at> writes:

  wow .. that's really old and out of date.
  I have this :
  $ cc -V
  cc: Sun C 5.8 Patch 121016-08 2009/04/20
Sorry, that was from an even older (sparc) machine.  This is from the

  cc: Sun C 5.10 SunOS_i386 2009/06/03
  usage: cc [ options] files.  Use 'cc -flags' for details

So, I suppose my compiler is newer than yours.  Which means Sun has
fixed the bug.

  The problem is probably with as, the assembler. But I'm guessing.
Yes, in whatever assembler the compiler invokes.

  > Can their tools cope with "xor %dl,%al" and "and %dl,%al"?
  > How about "orb %dl,%al"  "xorb %dl,%al" and "andb %dl,%al"?

Could you please check this?  It is enough to insert them in an
(otherwise) empty file called e.g., foo.s and the feed that to the
naughty compiler.

I might be able to work around this.

And BTW, what assembly code does this C code get (using cc -O -S):

char foo (char *bar) { return bar[0] | bar[1]; }

  > The file mpn/x86/divrem_2.asm will then be chosen, and it indeed
  > contains some "or" instructions with byte registers.
  Is there a way for force the usage of the more portable "generic" C sources?

Sure, and this is documented, please read the fine manual.  :-)


More information about the gmp-bugs mailing list