flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
Tomasz Grysztar
The new development line has started with the 1.67.0 release, with the main trigger being this thread: http://board.flatassembler.net/topic.php?t=5458
Look there also for more information on the changes made in the new release. The fact that PE files are now generated with non-relocatable addresses unless you put fixups directory somewhere allows now to do all the sophisticated things with the addresses that are not allowed in case of relocatable ones, like: Code: mov eax,-$ or: Code: mov eax,MessageBox xor 12345678h |
|||
![]() |
|
Tomasz Grysztar
1.67.1: added the few new instructions of the so-called AMD Pacifica.
|
|||
![]() |
|
LocoDelAssembly
Nice, time to contact Joanna Rutkowska to tell her of the new addition
![]() |
|||
![]() |
|
Adam Kachwalla
What files you need to modify if you want to add extra prefixes such as 0b (binary numbers)?
locodelassembly wrote: Nice, time to contact Joanna Rutkowska to tell her of the new addition Who is Joanna Rutkowska? |
|||
![]() |
|
HyperVista
|
|||
![]() |
|
LocoDelAssembly
Shouldn't be xchg al/eax/rax, al/eax/rax be assembled as NOP in all cases? Since the assembler encodes optimizing for size it should always use 90h, no?
Regards, LocoDelAssembly |
|||
![]() |
|
vid
loco: how about xor [something], 0 then. should it be assembled to nop too? or should it be assembled at all? how far do we want to go?
|
|||
![]() |
|
LocoDelAssembly
Vid, there is a big difference:
Software Optimization Guide for AMD64 Processors wrote: XCHG AX/EAX/RAX, AX/EAX/RAX/(R8 ) 90h DirectPath ~0 5 But the problem is that if you write xchg ax, ax under use32 it will assemble the prefix for operand size override and the same with xchg eax, eax under use16. About AL sorry, I was wrong ![]() Regards |
|||
![]() |
|
vid
alright then, but then it is not question of size optimizing, but question of beheaving due to manuals
|
|||
![]() |
|
LocoDelAssembly
Why is not a question of size optimizing?
Current version do this: Code: use32 xchg ax, ax ; 66 90 xchg eax, eax ; 90 nop ; 90 use16 xchg ax, ax ; 90 xchg eax, eax ; 66 90 nop ; 90 But I think it should be: Code: use32 xchg ax, ax ; 90 xchg eax, eax ; 90 nop ; 90 use16 xchg ax, ax ; 90 xchg eax, eax ; 90 nop ; 90 Unless that there is a reason to keep the actual behavior (possibly there is one but I don't know). |
|||
![]() |
|
Tomasz Grysztar
Note that in long mode "xchg eax,eax" is not the same and NOP.
As for prefixes it's just a matter of consistency. I prefer to be able to generate 16-bit variant just for the sake of completness - it's actually a way of following the principles. And the agressive optimization is currently not fasm's principle - see also http://board.flatassembler.net/topic.php?t=1238 etc. |
|||
![]() |
|
LocoDelAssembly
OK, however it's a little strange since the architecture considers 90H as NOP, so are you defining a 16-bit variant of NOP under use32 and viceversa? I posted this because I think it's not some kind of aggressive optimization like the suggested in the link you posted.
Regards, Hernán PS: Yes, I know I can use macros to produce my proposed behavior ![]() |
|||
![]() |
|
Tomasz Grysztar
Well, perhaps I should encode "xor ax,ax" as 66-33-C0 in 32-bit mode...
![]() |
|||
![]() |
|
Adam Kachwalla
In EXPRESSI.INC, in the number_begin label:
Code: mov ebx,esi add esi,ecx push esi dec esi mov dword [edi],0 mov dword [edi+4],0 cmp byte [ebx],'$' je pascal_hex_number cmp word [ebx],'0x' je get_hex_number I have added this after the last line of the code above: Code: cmp word [ebx],'0b' je get_bin_number and it still isn't working. What do I have to do to make it work? |
|||
![]() |
|
Tomasz Grysztar
Look at the checks for 'x' and '$' after the "get_hex_number" label. Do analogously.
|
|||
![]() |
|
Adam Kachwalla
All I have to modify is the EXPRESSI.INC file, right?
|
|||
![]() |
|
Tomasz Grysztar
Yes, only the "get_number" routine.
|
|||
![]() |
|
Garthower
2Tomasz Grysztar: Where I can download last build of FASM 1.67? On http: // flatassembler.net/download.php version 1.66 is laid out only...
|
|||
![]() |
|
Tomasz Grysztar
Don't you have it cached somehow?
|
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.