flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > support for "emit" |
Author |
|
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 |
|||
06 Aug 2007, 05:53 |
|
StarKnightD 06 Aug 2007, 06:56
there is an emit keyword that allows the processor to change its method of "predicting" branches. from what I understand this isn't the same as a db keyword. I've seen it on intel documentation.
|
|||
06 Aug 2007, 06:56 |
|
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 ... |
|||
06 Aug 2007, 09:24 |
|
MichaelH 06 Aug 2007, 11:24
What do you want to "emit" ? Is db not good enough ?
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 |
|||
06 Aug 2007, 11:24 |
|
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.
anyway, thankyou, I appreciate all the helpful information, especially the redirect to the older post Later, Stefan |
|||
06 Aug 2007, 18:17 |
|
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.
|
|||
06 Aug 2007, 18:23 |
|
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 ...) |
|||
07 Aug 2007, 17:32 |
|
StarKnightD 07 Aug 2007, 19:55
rugxulo: I know, I just like using
Later, Stefan |
|||
07 Aug 2007, 19:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.