flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
bitRAKE 10 Aug 2009, 02:01
I don't use those macros, but the description describes something like:
Code: local mydd:DWORD, mybb:BYTE Looking at the \INCLUDE\MACRO\PROC32.INC file, it does appear to initialize the local data in locals/endl. I'd have to dive in deeper using the FAS file tools to see what the pre-processor is doing. Maybe, try swapping the include order? No, that didn't work. It isn't the TCHAR, but the DU causing the error. Code: szText1: du 'Hello world', 0 |
|||
![]() |
|
shoorick 10 Aug 2009, 04:57
|
|||
![]() |
|
Tomasz Grysztar 10 Aug 2009, 06:45
This definitely should be corrected, thanks for reminding me.
|
|||
![]() |
|
Tomasz Grysztar 12 Aug 2009, 11:37
I had to update both the encoding macros and the proc macros to fix this issue. Please download the latest fasmw package for the corrected includes.
|
|||
![]() |
|
madmatt 12 Aug 2009, 12:05
Hi,
Had to comment out this line for the 'proc32.inc' before fasmw would recompile: Code: macro deflocal@proc name,def,[val] \{ name def val \} must have been left in by accident ![]() [edit] and, defining a DQWORD variable gives me an 'invalid argument' error. in the local macro, and in the locals/endl macro's. Last edited by madmatt on 12 Aug 2009, 12:43; edited 3 times in total |
|||
![]() |
|
Tomasz Grysztar 12 Aug 2009, 12:20
No, this additional line is required for the fix to work fully, I only forgot to remove the backslashes. Uploading the another update right now.
|
|||
![]() |
|
Tomasz Grysztar 12 Aug 2009, 12:57
Uploaded all the corrections. Now it should work for all types.
|
|||
![]() |
|
madmatt 12 Aug 2009, 13:45
Don't know if you saw my latest edit, so I'll make a new post. The local macro works good now. Thanks!
![]() ![]() |
|||
![]() |
|
Tomasz Grysztar 12 Aug 2009, 14:24
madmatt wrote: Don't know if you saw my latest edit, so I'll make a new post. The local macro works good now. Thanks! madmatt wrote: Have to ask this, would it be possible to align the DQWORD local variables/arrays to a 16 byte boundry The problem is that in 32-bit case locals themselves are not guaranteed to be aligned on 16 byte boundary (only 4 byte one). You'd have to modify proc prologue to get such alignment. And if you made such a prologue, it may be possible to re-define "align" as a macro so that it would work inside "locals" block. |
|||
![]() |
|
madmatt 12 Aug 2009, 15:36
all right, thanks. sounds like it would be easier just to define general purpose sse global variables. or, you could define an extra dqword for your variable or array and align it manually before use with:
Code: lea esi, [ssevarorarray] and esi, $fffffff0 add esi, 16 |
|||
![]() |
|
vid 12 Aug 2009, 17:03
Quote: The problem is that in 32-bit case locals themselves are not guaranteed to be aligned on 16 byte boundary (only 4 byte one). You'd have to modify proc prologue to get such alignment. How about 64-bit case? Do FASM macros quarantee usual 16-byte alignment for locals? (provided that function is called properly, eg RSP & 0xF = ![]() |
|||
![]() |
|
Tomasz Grysztar 12 Aug 2009, 18:55
Yes, they do. Both the default and the static-RSP variant.
[EDIT]As it was pointed out in the other thread, this is not true in general. The static-RSP variant aligns the stack frame only when there are some calls (with "fastcall" interface) made inside the procedure, otherwise it does not. In general it guarantees only the 8-byty alignment. This gives even more reasons to design a system that would allow to use "align" inside the "locals" blocks.[/EDIT] |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.