flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Melissa
I can't port this macro to famsg syntax, in order to make dynamically linked elf executable s
![]() Glad if someone helps. |
|||
![]() |
|
Tomasz Grysztar
The conversion is quite straightforward - see the attachment.
|
|||||||||||
![]() |
|
Melissa
Thanks, it works!
one thing there is no rdtscp and movsd instruciton reports error extra characters. |
|||
![]() |
|
Melissa
I use 64 bit, seems that definition in x64.inc intersects with definition in sse2.inc as without
arguments, movsd compilation passes. |
|||
![]() |
|
Tomasz Grysztar
This might happen of you include SSE extensions before x64.inc gets included (and x64.inc gets included automatically by "format" macro). I'm going to modify it so that it is more resistant to such reordering.
|
|||
![]() |
|
Melissa
Nope, I tried to include before / after format.inc it's all the same. If I comment out movsd definition from x64.inc, it works alright.
|
|||
![]() |
|
Tomasz Grysztar
I'm not able to reproduce the problem then, can you show the minimal source that causes it?
|
|||
![]() |
|
Tomasz Grysztar
In the mean time I have update the official packages with the corrected macros, reordering includes should now not cause this problem.
I added "rdtscp" as a separate file in "ext" directory, because it is a separate instruction set extension - it has its own CPUID flag. |
|||
![]() |
|
Melissa
Code: include 'format/format.inc' include 'ext/avx2.inc' format elf64 executable segment executable entry $ movsd xmm0,[clock] mov eax, 60 syscall segment readable clock dq 3800.0 That is if I include avx2, if I don't compilation passes. |
|||
![]() |
|
Tomasz Grysztar
As I said above, it is the "format" macro that includes basic instruction sets, not the inclusion of "format.inc". So to avoid the problem you should have included AVX2 after the "format elf64 executable" line.
Now as I think of it, since the "format" macro is there to provide some level of fasm 1 compatibility, I should perhaps make it include all the instruction set extensions anyway? |
|||
![]() |
|
Melissa
Yeah, it would be fine, or perhaps not if someone want's compilation errors if accidentally uses non intened instruction.
BTW I haven't figured out that I need to include after invoking of format macro;p I understood after including format.inc ![]() |
|||
![]() |
|
Tomasz Grysztar
To be honest, everything should work better if you drop the "format" macro and set up all the required includes directly. This also brings more format customization options into view.
|
|||
![]() |
|
Melissa
Heh, I just started with fasmg yesterday
![]() I am all in fasm1 thinking. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.