Recent

Author Topic: divpd unrecognized opcode  (Read 6338 times)

mikerabat

  • New Member
  • *
  • Posts: 39
divpd unrecognized opcode
« 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?

v.denis

  • Guest
Re: divpd unrecognized opcode
« Reply #1 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
« Last Edit: July 02, 2014, 12:12:26 am by v.denis »

mikerabat

  • New Member
  • *
  • Posts: 39
Re: divpd unrecognized opcode
« Reply #2 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.


Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: divpd unrecognized opcode
« Reply #3 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).
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

mikerabat

  • New Member
  • *
  • Posts: 39
Re: divpd unrecognized opcode
« Reply #4 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.....

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: divpd unrecognized opcode
« Reply #5 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.
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

 

TinyPortal © 2005-2018