flat assembler
Message board for the users of flat assembler.

Index > Main > haddpd same operand

Author
Thread Post new topic Reply to topic
donn



Joined: 05 Mar 2010
Posts: 321
donn 25 Mar 2020, 03:56
Converted a second project to use fasmg calm from fasm1 this evening.

I have this really old scalar product calculation function that I thought worked and has this instruction:

Code:
haddpd xmm0, xmm0
    


The message on assembling is:

Code:
flat assembler  version g.iveex
Includes.inc [29] Tensors.inc [240]:
        haddpd xmm0, xmm0
Processed: haddpd xmm0, xmm0
Error: illegal instruction.    


Is this correct? I'm not using this now and am just commenting it out. I guess it makes sense that the same register can't be used twice, but I just stumbled on this thread which has xmm1 as both operands:

(See Leibniz Theory of Pi (calculates Pi) uses SSE2/3 section)
https://board.flatassembler.net/topic.php?p=56115

With this commented out, this entire project assembles successfully also, just had to change the struc blocks to remove the curly braces and include label . mostly.
Post 25 Mar 2020, 03:56
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 25 Mar 2020, 09:07
HADDPD is an SSE3 instruction, you need to include 'ext/sse3.inc' to have it available.

The "illegal instruction" is a legacy message inherited from fasm 1, which in turn inherited it from TASM. It simply means that no instruction with such name has been defined.
Post 25 Mar 2020, 09:07
View user's profile Send private message Visit poster's website Reply with quote
donn



Joined: 05 Mar 2010
Posts: 321
donn 25 Mar 2020, 17:23
Oh, cool! Confirmed works:

Code:
flat assembler  version g.iveex
4 passes, 3.1 seconds, 259922 bytes.
    
Post 25 Mar 2020, 17:23
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.