flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Bug??? popfq: Fasm outputs--> error: illegal instruction.

Author
Thread Post new topic Reply to topic
Mac2004



Joined: 15 Dec 2003
Posts: 313
Mac2004
Hello!

Fasm 1.66 outputs illegal instruction error message while trying to compile popfq instruction. It's counterpart pushfq instruction assembles nicely. Is there a bug in fasm or am I missing something?

regards mac2004

Code:
use64
        pushfq
        popfq
    
Post 18 Jun 2006, 18:41
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
YASM r1578 (DJGPP snapshot) works if you change "use64" to "bits 64", so it's probably a bug (must've already existed in 1.64 too since it doesn't work there either).
Post 19 Jun 2006, 14:00
View user's profile Send private message Visit poster's website Reply with quote
Mac2004



Joined: 15 Dec 2003
Posts: 313
Mac2004
Hi!

I think the error message indicates that Fasm does not know popfq instruction.

rugxulo: I found this problem while converting some yasm (64bit) sources and noticed that popfq does not work.

regards,
Mac2004
Post 19 Jun 2006, 14:46
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quick fix:
Code:
macro popfq
{
  virtual
    pushfq ; this to be sure that we are in use64 mode
  end virtual

  popf
}    
Post 19 Jun 2006, 14:49
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7711
Location: Kraków, Poland
Tomasz Grysztar
I put POPFQ after POPFW by mistake (while the tables have to sorted alphabetically), that's the cause of this.
Post 20 Jun 2006, 13:57
View user's profile Send private message Visit poster's website Reply with quote
Mac2004



Joined: 15 Dec 2003
Posts: 313
Mac2004
ok, I am glad that this is solved! Very Happy

regards Mac2004
Post 20 Jun 2006, 16:53
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
What, no silent update? Wink
Post 23 Jun 2006, 03:41
View user's profile Send private message Visit poster's website Reply with quote
Mac2004



Joined: 15 Dec 2003
Posts: 313
Mac2004
Now there's a silent update..... Just check out the date of Fasm packages.
regards, Mac2004 Very Happy
Post 25 Jun 2006, 11:53
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Yeah, and I must've initially downloaded it (Friday) after the site date update but before the (DOS) file was updated: it didn't fix it!

But, I've since redownloaded and all is well again. Didn't need the fix, though, since I don't have a 64-bit processor! Smile

P.S. Privalov, don't forget "Optimal fill" for those silly .INC files. Very Happy

P.P.S. Does this site have any download bandwidth restrictions? I keep wondering why you repost the entire .ZIP archive (particularly the Windows version) when a simple diff or even a .TAR.BZ2 would be smaller/better. Oh well, waste your bandwidth if you want. Razz
Post 27 Jun 2006, 06:05
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar.

Powered by rwasa.