flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [fasm2] what is going on with the vfmadds?

Author
Thread Post new topic Reply to topic
tthsqe



Joined: 20 May 2009
Posts: 769
tthsqe 24 Mar 2026, 07:48
https://github.com/tgrysztar/fasm2/blob/master/include/iset/avx.inc#L2650
https://github.com/tgrysztar/fasm2/blob/master/include/iset/avx.inc#L4142

The first set looks more in line with, for example, vadd{pd|ps|sd|ss}, but the first set is missing vfmadd. What happens when a macro is redefined like this for the others?
Post 24 Mar 2026, 07:48
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8518
Location: Kraków, Poland
Tomasz Grysztar 24 Mar 2026, 16:35
These are AVX+FMA and AVX512 cases, I needed to combine them into a single set of macros, but apparently I forgot.
As usual, when a macro is redefined, it overwrites the previous version (but may also call the previous version if it does so explicitly).
Post 24 Mar 2026, 16:35
View user's profile Send private message Visit poster's website Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 769
tthsqe 24 Mar 2026, 19:52
https://github.com/tgrysztar/fasm2/blob/92be28b09658b94fc128ea602c27256f4ec4cbc1/include/iset/avx.inc#L2649
OK, now there is no fmadd instruction, and, given the redefinition behavior, now vfmaddsub gets assembled as fmadd. Wink
Post 24 Mar 2026, 19:52
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8518
Location: Kraków, Poland
Tomasz Grysztar 24 Mar 2026, 20:37
I was convinced I was leaving the other line around, I honestly don't know how this happened. Very Happy
I redid the commit.
Post 24 Mar 2026, 20:37
View user's profile Send private message Visit poster's website 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-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.