flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > support for "emit"

Author
Thread Post new topic Reply to topic
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 06 Aug 2007, 05:53
will there be support for the "emit" functionality? other wise, does anyone know how to go about doing this manually?


Thanks,
Stefan
Post 06 Aug 2007, 05:53
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 06 Aug 2007, 06:27
1. Please kick out the duplicate [done] Smile

2. What do you want to "emit" ? Is db not good enough ? Confused


Last edited by DOS386 on 08 Aug 2007, 05:42; edited 1 time in total
Post 06 Aug 2007, 06:27
View user's profile Send private message Reply with quote
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 06 Aug 2007, 06:56
there is an emit keyword that allows the processor to change its method of "predicting" Twisted Evil branches. from what I understand this isn't the same as a db keyword. I've seen it on intel documentation.
Post 06 Aug 2007, 06:56
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 06 Aug 2007, 09:24
you mean something like this?
Code:
cs ja somewhere  ;untaken hint
ds db elsewhere  ;taken hint
    


i use this macro for jump hints:
Code:
;allows "jcc taken", "jcc untaken"
;desc: conditional jumps with branch hints
;note: words "taken" and "untaken" must be lowcase
irp jmp, je, jz, ja, jb, jae, jbe, jg, jl, jge, jle, jne, jnz, jna, jnb, jnae, jnbe, jng, jnl, jnge, jnle
{
  macro jmp arg
  \{
    is_plain equ 1
    match =untaken dest, arg
    \\{
      cs jmp dest
      restore is_plain
      is_plain equ 0
    \\}
    match =taken dest, arg
    \\{
      ds jmp dest
      restore is_plain
      is_plain equ 0
    \\}
    match =1, is_plain \{
       jmp arg
    \\}
    restore is_plain
  \}
}

ja taken some_label
jb untaken some_label
...
    
Post 06 Aug 2007, 09:24
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH 06 Aug 2007, 11:24
What do you want to "emit" ? Is db not good enough ? Smile


db 2Eh - hint branch will not occur most of the time.
db 3Eh - hint branch will occur most of the time.

You can use define or equ -

define hint.notTaken db 2Eh
define hint.taken db 3Eh

or

hint.notTaken equ db 2Eh
hint.taken equ db 3Eh



Discussed here http://board.flatassembler.net/topic.php?t=716
Post 06 Aug 2007, 11:24
View user's profile Send private message Reply with quote
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 06 Aug 2007, 18:17
Yeah, I was under the impression that emit was some form of instruction necessary for the assembler to translate. oh yeah, and it would be helpful if people would use more direct subjects, since I did search through the message board first. Evil or Very Mad

anyway, thankyou, I appreciate all the helpful information, especially the redirect to the older post Twisted Evil

Later,
Stefan
Post 06 Aug 2007, 18:17
View user's profile Send private message Reply with quote
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 06 Aug 2007, 18:23
one last thing I forgot.. emit is the terminology used on the Intel website explaining how to use the branch prediction unit.. so it was a bit too easy to be mistaken.
Post 06 Aug 2007, 18:23
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 07 Aug 2007, 17:32
StarKnightD, it's hard to search when no one can agree what to call such "hints"..

http://board.flatassembler.net/topic.php?t=5381

(still unresolved ...)
Post 07 Aug 2007, 17:32
View user's profile Send private message Visit poster's website Reply with quote
StarKnightD



Joined: 04 Jul 2007
Posts: 38
StarKnightD 07 Aug 2007, 19:55
rugxulo: I know, I just like using Twisted Evil

Later,
Stefan Twisted Evil
Post 07 Aug 2007, 19:55
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.