flat assembler
Message board for the users of flat assembler.
Index
> Main > Question about instructions. |
| Author |
|
|
Coty 21 Jan 2011, 19:11
For the ARM processor I believe yes, for x86 no.. at-least I have not seen any yet...
|
|||
|
|
Tyler 21 Jan 2011, 19:12
I don't think there's a universal way, but there are conditional extensions for some instructions. AFAIK, ret doesn't have a native conditional form, but you could do as revolution does for ARM(http://board.flatassembler.net/topic.php?t=11985), and write a macro to emulate conditional ret.
|
|||
|
|
Overflowz 21 Jan 2011, 20:09
Well, I dont need only mov, any istructions that are like instructions which are executed after CMP command..
|
|||
|
|
Tyler 21 Jan 2011, 20:16
I wrote:
Quote:
If you would have looked, you would have noticed his emulation is conditional jump based. x86 has conditional jumps. Why do you want to avoid conditional jumps? For code simplicity, or for efficiency? If it's for simplicity, then revolutions method is the easiest way I know of. If it's for efficiency, then the answer is: no, conditional jumps are required for some logic. |
|||
|
|
cod3b453 21 Jan 2011, 22:00
Yes - the cmov instruction with the condition as a suffix:
Code: mov ebx,5 cmp eax,9 cmove eax,ebx ret |
|||
|
|
Overflowz 22 Jan 2011, 01:25
Tyler
Sorry I'm just novice about that things. So easiest way is to make macro right ? and of course I need it for simplificy. cod3b453 Thanks, I'll try that. =) |
|||
|
|
b1528932 22 Jan 2011, 15:30
be sure to test for cmovCC using cpuid.
|
|||
|
|
revolution 22 Jan 2011, 15:45
Tyler wrote: ... but you could do as revolution does for ARM ... |
|||
|
|
Overflowz 27 Jan 2011, 13:49
Okay, thank you guys
|
|||
|
|
edfed 27 Jan 2011, 16:00
before pentium4, there are no cmov.
|
|||
|
|
revolution 27 Jan 2011, 16:12
edfed wrote: before pentium4, there are no cmov. |
|||
|
|
edfed 27 Jan 2011, 16:45
P pro was made the same year than PII, but they waited P4 to introduce it in popular models.
pentium pro is rare to find, more than P4 |
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.