flat assembler
Message board for the users of flat assembler.
Index
> Main > port import64.inc to fasmg |
Author |
|
Melissa 06 May 2018, 16:23
I can't port this macro to famsg syntax, in order to make dynamically linked elf executable s
Glad if someone helps. |
|||
06 May 2018, 16:23 |
|
Tomasz Grysztar 06 May 2018, 18:01
The conversion is quite straightforward - see the attachment.
|
|||||||||||
06 May 2018, 18:01 |
|
Melissa 06 May 2018, 18:29
Thanks, it works!
one thing there is no rdtscp and movsd instruciton reports error extra characters. |
|||
06 May 2018, 18:29 |
|
Melissa 06 May 2018, 18:45
I use 64 bit, seems that definition in x64.inc intersects with definition in sse2.inc as without
arguments, movsd compilation passes. |
|||
06 May 2018, 18:45 |
|
Tomasz Grysztar 06 May 2018, 18:49
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.
|
|||
06 May 2018, 18:49 |
|
Melissa 06 May 2018, 18:53
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.
|
|||
06 May 2018, 18:53 |
|
Tomasz Grysztar 06 May 2018, 18:58
I'm not able to reproduce the problem then, can you show the minimal source that causes it?
|
|||
06 May 2018, 18:58 |
|
Tomasz Grysztar 06 May 2018, 19:18
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. |
|||
06 May 2018, 19:18 |
|
Melissa 06 May 2018, 19:18
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. |
|||
06 May 2018, 19:18 |
|
Tomasz Grysztar 06 May 2018, 19:20
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? |
|||
06 May 2018, 19:20 |
|
Melissa 06 May 2018, 19:31
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 |
|||
06 May 2018, 19:31 |
|
Tomasz Grysztar 06 May 2018, 19:36
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.
|
|||
06 May 2018, 19:36 |
|
Melissa 06 May 2018, 19:44
Heh, I just started with fasmg yesterday
I am all in fasm1 thinking. |
|||
06 May 2018, 19:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.