flat assembler
Message board for the users of flat assembler.

Index > Main > Why is the behavior of the repXX prefixes undefined for

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17277
Location: In your JS exploiting you and your system
revolution
So what about:
Code:
rep addsd xmm0,[esi+ecx*8]    
How would you encode it?
Post 27 Dec 2009, 00:26
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1160
Azu
Azu wrote:
revolution wrote:
If you enabled rep for everything then that means that SSE has to use some other encoding format because rep is already used.
Azu wrote:
They could still use it for other instructions besides pause and SSE ones, though..

_________________
Post 27 Dec 2009, 00:28
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17277
Location: In your JS exploiting you and your system
revolution
So you impose exceptions, rep is good here, but not there. Okay, that needs silicon to decide what is good and what is not.

But what is the benefit? You still have not shown any compelling example as to where it would be useful enough to put in the extra effort to design, test, build and document it.
Post 27 Dec 2009, 00:33
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1160
Azu
revolution wrote:
So you impose exceptions, rep is good here, but not there. Okay, that needs silicon to decide what is good and what is not.

The silicon is already there to see if an instruction is SSE. Just don't check for the rep prefix until after checking for an SSE instruction. Or whatever the way is that they currently differentiate (with SSE instructions it doesn't work like a nop, right? So the silicon to check is already there)

revolution wrote:
But what is the benefit? You still have not shown any compelling example as to where it would be useful enough to put in the extra effort to design, test, build and document it.


Azu wrote:
baldr wrote:
Azu,

Could you supply an example of useful prefixed instruction?
Any instructions you would use loop or loopXX on.

_________________
Post 27 Dec 2009, 00:35
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Azu wrote:
baldr wrote:
Azu,

Could you supply an example of useful prefixed instruction?
Any instructions you would use loop or loopXX on.
Never used loop on a single instruction... example?

_________________
Previously known as The_Grey_Beast
Post 27 Dec 2009, 00:57
View user's profile Send private message Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1160
Azu
Examples: all instructions that can take ecx as an operand or increment or decrement anything or modify the zero flag.

_________________
Post 27 Dec 2009, 01:02
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17277
Location: In your JS exploiting you and your system
revolution
Where is it useful?
Post 27 Dec 2009, 02:46
View user's profile Send private message Visit poster's website Reply with quote
Azu



Joined: 16 Dec 2008
Posts: 1160
Azu
I just said.

_________________
Post 27 Dec 2009, 02:51
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17277
Location: In your JS exploiting you and your system
revolution
No, where is it useful, in what applications. Can you give a practical example of it's use in an application?

[edit to add]
If you really want this to be included in the future then you have to tell Intel/AMD where it has practical uses. They won't add it just because you ask them, you have to convince them.
Post 27 Dec 2009, 02:57
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2914
Location: [RSP+8*5]
bitRAKE
I'm just going to babble because I don't work for Intel/AMD:

Basically, the decoder had a branch for the REP prefix which occurs comparitively early. This would make it a preferred canidate for new instructions given only a cost of increased "setup" time for REP <string> instructions.

A general REP might seem like a Good Thing™, but most loops are greater than a single operation. What would be the costs of continually re-initializing the loop counter prior to each operation? As soon as two loop operations have a dependancy across them then the REP instruction paradigm fails to work.
Post 27 Dec 2009, 08:46
View user's profile Send private message Visit poster's website Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2466
Location: Bucharest, Romania
Borsuc
Azu wrote:
Examples: all instructions that can take ecx as an operand or increment or decrement anything or modify the zero flag.
Borsuc wrote:
[I've] Never used loop on a single instruction... example?
Razz

_________________
Previously known as The_Grey_Beast
Post 27 Dec 2009, 20:44
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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.