|
-
Sep 13th, 2005, 08:44 AM
#15
Re: Why is this ASM slower than C++?
Well, C++ only provides the asm keyword and states this:
7.4 The asm declaration [dcl.asm]
1 An asm declaration has the form
asm-definition:
asm ( string-literal ) ;
The meaning of an asm declaration is implementation-defined. [Note:
Typically it is used to pass information through the implementation to
an assembler. ]
As you see, the definition is minimal. It should also be mentioned that VC++ does not support this syntax, only the _asm {} syntax. GCC supports the syntax, but extends it for better interaction with the compiler.
What code you can use thus depends on your compiler or the underlying assembler. For example, in VC++ the compiler needs to understand the assembly, thus disabling use of SSEx in VC++6 at least.
GCC doesn't really understand any assembly, but it forwards it to the underlying assembler, and thus pretty much everything works, depending on the asembler.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|