Lazarus

Free Pascal => FPC development => Topic started by: mikerabat on July 01, 2014, 09:33:02 pm

Title: divpd unrecognized opcode
Post by: mikerabat on July 01, 2014, 09:33:02 pm
I was trying to translate my matrix asm library to FPC (64bit windows) and stumbled over the following error:

unrecognized opcode divpd

To show the problem I tried a simple (and not working ;) ) program which
does not compile in Lazarus 1.2.0 to 1.2.4

Code: [Select]
{$ASMMODE Intel}
function TestDivp(d1, d2 : double) : double;
begin
  asm
     divdp xmm0, [r9 + rax - 128]; // unrecognized opcode
  end;
end;   

I already posted a similar question on Stackoverflow and got the hint that
the divpc opcode is actually recognized by FPC 2.6.2

Has anyone an idea?
Title: Re: divpd unrecognized opcode
Post by: v.denis on July 02, 2014, 12:02:02 am
I guess you mean

DIVPD xmm xmm/m128 (sse2)   Divide Packed Double-FP Values

for example check reference http://ref.x86asm.net/coder64.html
Title: Re: divpd unrecognized opcode
Post by: mikerabat on July 02, 2014, 10:07:30 am
Yes - I just gave the simple example in code which raises an
error in a simple console Lazarus project.

Title: Re: divpd unrecognized opcode
Post by: Mike.Cornflake on July 02, 2014, 10:54:50 am
I think @denis was referring to the fact that you're talking about divpd, but in your code you're calling divdp (ie last two letters crossed).
Title: Re: divpd unrecognized opcode
Post by: mikerabat on July 02, 2014, 11:53:07 am
Thank you for the extrem valuable hint!!!
Yes it is a typo and it seems that this type is on my code and was NOT
recognized by the Delphi compiler but by the FPC compiler (eventually this code was not used in my unit testing project)!
I was just missing the forest for the trees.....
Title: Re: divpd unrecognized opcode
Post by: Mike.Cornflake on July 02, 2014, 12:50:25 pm
Quote
I was just missing the forest for the trees.....

I've been there.  :-)   Glad it's sorted.
TinyPortal © 2005-2018