Illegal subtraction in tmp-dive_1.s

Torbjorn Granlund tg at gmplib.org
Thu Apr 16 18:12:27 CEST 2009


Dennis Clarke <dclarke at blastwave.org> writes:

  Well, these lines scream endian issues :
  
         want 0x12, 0x34, 0x56, 0x78,
         got  0x78, 0x56, 0x34, 0x12,
  
  And I am curious how a compiler can produce that sort of result.

Surely a buggy compiler might cause that, but it might be a GMP bug too.
I have no way of telling.

Note that GMP runs on both little-endian and big-endian machines.  And
it does run on x86-solaris, so it does not seem like some GMP stupidity
about assuming solaris means big endian.

  Regardless, I just tried to build things with Studio 11 on i386 and that
  fails also :
  
  Assembler:
          "tmp-divrem_2.s", line 116 : Syntax error
          Near line: "    or      %dl, %al"
          "tmp-divrem_2.s", line 211 : Syntax error
          Near line: "    or      %dl, %al"

That surely looks like correct syntax to me.  Could the assembler have
problems with adjacent instructions, but get the error message wrong?
Please investigate, this should be straightforward to work around once
we understand the problem.  (The insns around these insns are pretty
standard, though.)

I suspect you'd have a simpler life if you compiled using gcc instead of
that pesky "Studio" compiler.  At least, GNU software likes gcc.

-- 
Torbjörn


More information about the gmp-discuss mailing list