#2 possibly invalid x86_64 assembly

Tim Mooney

I'm trying to build beecrypt 4.1.2 on Solaris 10 x86_64
with the (now no-cost) Sun Studio 11 development
environment. In particular

-xtarget=native -xarch=amd64

is part of CFLAGS, CXXFLAGS, LDFLAGS, etc. The compile
proceeds ok until mpopt.s, which is the x86_64 assembly.

I get three errors from the assembler:

cc -DHAVE_CONFIG_H -I. -I. -I. -I./..
-DOPTIMIZE_X86_64 -Xa -fast -xtarget=native
-xarch=amd64 -mt -c mpopt.s -KPIC -DPIC -o .libs/mpopt.o
"mpopt.s", line 51 : Syntax error
"mpopt.s", line 65 : Syntax error
"mpopt.s", line 210 : Syntax error
cc: assembler failed for mpopt.s

The problem on line 210 goes away if I change "inc" to
"incq". Not sure if that's the right fix, but I'm
guessing it is.

The other two complaints are both about this construct:

repz stos

I've been all over the web looking for that construct,
and finally downloaded the "Volume 3" (x86-64vol3.pdf)
reference that comes up when searching Google for

AMD repz stos

Looking at pages # 10-12 (document pages 38-40), it's
pretty clear that the Solaris assembler is correct.
repz cannot be used with a store, only with a compare
or scan.

I'm no assembly guru by any means, so I'm not sure what
the right fix is.


  • Bob Deblier

    Bob Deblier - 2006-05-02
    • assigned_to: nobody --> upuaut
  • Bob Deblier

    Bob Deblier - 2006-05-06

    Logged In: YES

    I've gone back to the manuals, and repz is indeed wrong
    here. GNU assembler is just too forgiving ;)

    Some of these were already fixed in the CVS, and the repz is
    fixed too now - could you check out the latest sources and
    give them a try?



  • Bob Deblier

    Bob Deblier - 2006-05-06
    • status: open --> closed
  • Tim Mooney

    Tim Mooney - 2006-05-11

    Logged In: YES

    I'll check out the CVS sources this weekend and give it a
    try. Thanks!



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks