flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
mattst88 24 Jul 2007, 17:05
XORPS's opcode is 0F57 /r and XORPD's is the same with a 66 prefix. They both perform the exact same operation, do they not? I mean, regardless if you're using the two XMM registers as two doubles or 16 8 bit integers, correct?
If this is the case, the only reason you'd use XORPD would be if you needed another byte of padding or something. Is all this correct? If so, what are other instructions that have this property? XORP{D,S}, ORP{D,S}, ANDP{D,S}, what else? _________________ My x86 Instruction Reference -- includes SSE, SSE2, SSE3, SSSE3, SSE4 instructions. Assembly Programmer's Journal |
|||
![]() |
|
revolution 25 Jul 2007, 05:39
mattst88 wrote: If this is the case, the only reason you'd use XORPD would be if you needed another byte of padding or something. |
|||
![]() |
|
Madis731 25 Jul 2007, 14:44
...and if you read Agner's manuals additionally, you notice that you can use "wrong" format instruction to gain performance because of the ports they use and what ports are available at that specific moment.
Optimizing is fine art and don't throw SUB out just yet just because you can do ADD eax, negative constant ![]() MOVDQA loads aligned data, but if you care about speed then use MOVAPS because its one byte shorter. If you want padding, you can use PSHUFD xmm,xmm/mm128,00000000b to do the trick ![]() |
|||
![]() |
|
LocoDelAssembly 25 Jul 2007, 15:37
I read what revolution said yesterday in the volume 1 of the AMD64 manuals. However it said that there is a hidden bit that tells if the type is integer or float but I not found (maybe because I got tired to read) any reference that the CPU also keeps track of the width of the type.
I think I'll start using the Intel's manuals because the AMD's ones seems to be not clear as the Intel's manuals. |
|||
![]() |
|
0.1 09 Aug 2007, 08:25
i got this when clicked the link to My x86 Instruction Reference
Code: XML Parsing Error: junk after document element Location: http://mattst88.com/programming/asmref/ Line Number 2, Column 1:<b>Warning</b>: include(../../header.inc.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/var/www/mattst88.com/htdocs/programming/asmref/index.php</b> on line <b>11</b><br /> ^ |
|||
![]() |
|
mattst88 09 Aug 2007, 14:16
0.1 wrote: i got this when clicked the link to My x86 Instruction Reference Fixed, thanks for the heads up. ![]() _________________ My x86 Instruction Reference -- includes SSE, SSE2, SSE3, SSSE3, SSE4 instructions. Assembly Programmer's Journal |
|||
![]() |
|
MCD 29 Oct 2007, 14:36
revolution wrote: There is a section in one of the Intel manuals that explains why you should use the proper flavour of instruction for the data that you are using. I don't have the manual available to me now to quote but it seems that the processor keeps an internal flag to say what "type" of data the XMM register contains (int, single or double). The manual also describes that there can be a performance hit by switching to a differently "typed" instruction. This would only make a difference to optimised code timings, the actual data manipulation is still the same regardless of the instruction you use. nevertheless, there is no such bit in the MMX/3DNow registers. Does this really speed up execution of the instructions? I'm very scepticle about its benefit. I wouldn't have introduced such a thing if I have designed the SSE instructions |
|||
![]() |
|
asmfan 29 Oct 2007, 17:09
Some researchers like A.Fog claim /afair:)/ that pxor* is preferable than xorp* cuz it breaks dependecy chain on some CPU families while xorp* don't. But other sources as written above claim that appropriate instruction should be used depending on context - what kind of data is used. Only profiling on a certain cpu can prove the right variant.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.