flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > i386, i486, ... control

Author
Thread Post new topic Reply to topic
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 10:22
Does fasm recognize i386, i486 ... putting those in a stream?
Do the tables have reserved bytes for this?
Can such a modification be done easily?
Post 19 Jan 2011, 10:22
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20356
Location: In your JS exploiting you and your system
revolution 19 Jan 2011, 10:30
See here. I think that is what you are asking for.
Post 19 Jan 2011, 10:30
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 16:53
revolution, thanks
that is partial decision still

i486 has a built-in fpu but .486 macro does not allow such, why?
Post 19 Jan 2011, 16:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20356
Location: In your JS exploiting you and your system
revolution 19 Jan 2011, 16:56
Not all 486's have the FPU.

Anyhow, just enable the FPU stuff with .486f instead, no problem.
Post 19 Jan 2011, 16:56
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 17:32
.486f, but i do not expect conditional moves of floats to be available, fcomi... too
Post 19 Jan 2011, 17:32
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20356
Location: In your JS exploiting you and your system
revolution 19 Jan 2011, 17:58
idle wrote:
.486f, but i do not expect conditional moves of floats to be available, fcomi... too
They aren't available with .486f
Post 19 Jan 2011, 17:58
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 18:04
but:
Code:
macro .486f {
...
        invalidate_pentium
        invalidate_mmx
...
}

macro invalidate_pentium {
...
    invalidate_p6
...
}

macro invalidate_p6 {
    invalidate_fpu_p6
    invalidate_p6_p2
    invalidate rdpmc
    irp cc,c,z,e,s,a,b,g,l,ae,be,ge,le,o,p,pe,nc,nz,ne,ns,na,nb,ng,nl,nae,nbe,nge,nle,no,np,po \{
        invalidate cmov\#cc
    \}
}
    
Post 19 Jan 2011, 18:04
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20356
Location: In your JS exploiting you and your system
revolution 19 Jan 2011, 18:14
Code:
macro invalidate_fpu_p6 {
    invalidate_sse
    invalidate fcmovb,fcmove,fcmovbe,fcmovu,fcmovnb,fcmovne,fcmovnbe,fcmovnu,\
             fcomi,fcomip,fucomi,fucomip
}    
Post 19 Jan 2011, 18:14
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 18:22
i do not understand what invalidate macro does but it works, thanks
i seems i'm too look through masm-internals with OllyDbg Smile
Post 19 Jan 2011, 18:22
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20356
Location: In your JS exploiting you and your system
revolution 19 Jan 2011, 18:27
The invalidate macro just makes an impossible directive "rb -1". It is a deferrable error; that means that only when all ifs and other conditional expressions are fully resolved will the error be signalled.
Post 19 Jan 2011, 18:27
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 18:33
oh, that's not optimal
if fasm's execution that would be very fast
every instruction handler could check some variable:
Code:
test    [machine],var_machine
jb      .error_etc
    
Post 19 Jan 2011, 18:33
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 18:36
i put wrong code
smth working
you understand, i know
Wink
Post 19 Jan 2011, 18:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20356
Location: In your JS exploiting you and your system
revolution 19 Jan 2011, 18:40
idle wrote:
oh, that's not optimal
if fasm's execution that would be very fast
every instruction handler could check some variable:
Code:
test    [machine],var_machine
jb      .error_etc
    
You need to suggest this to Tomasz, not me. But Tomasz has already stated that he prefers macro solutions so it seems we will have to be content with the current solution.

BTW: I did do that for fasmarm, but I have no control over the x86 version of fasm.
Post 19 Jan 2011, 18:40
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 19 Jan 2011, 21:33
set www of your profile to fasm-arm - people (from wasm.ru) do not often know who you are
Post 19 Jan 2011, 21:33
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 20 Jan 2011, 00:16
Post 20 Jan 2011, 00:16
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 440
Location: Ukraine
idle 22 Jan 2011, 09:57
A one-line description of x87 instructions by unknown
Find 'These can be loaded using the FLD0, FLD1,'.
Tomasz, add fldz's alias please.
x87 was published in 1986, as i know, but i'm not sure whether that FLD0 is so popular since(that's history for me as i was absent).
Post 22 Jan 2011, 09:57
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.