IL equivalent of __asm in MC++? 
Author Message
 IL equivalent of __asm in MC++?

Is there a simple way to embed IL instructions directly in
the source of a MC++ or C# function?

(Similar to the way __asm is used to embed x86
instructions in C++)

Thanks,
Michael



Fri, 15 Apr 2005 09:51:54 GMT  
 IL equivalent of __asm in MC++?
No there isn't.

Could you explain what you would use the feature for? It is a potential, but
currently not high priority feature idea for some future version, so we are
trying to understand the scenarios customers would use this for.

Ronald Laeremans
Visual C++ team


Quote:
> Is there a simple way to embed IL instructions directly in
> the source of a MC++ or C# function?

> (Similar to the way __asm is used to embed x86
> instructions in C++)

> Thanks,
> Michael



Fri, 15 Apr 2005 17:29:28 GMT  
 IL equivalent of __asm in MC++?
Jeroen,

Quote:
>OK, I do have one specific example: I often want to call
>Object.GetHashCode() non-virtual. I can't do this in managed C++ (AFAIK),
>but I can easily do this in IL.

The following works for me

int GetHashCode(Object* obj)
{
  return obj->Object::GetHashCode();

Quote:
}

Mattias

===

http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.



Sun, 17 Apr 2005 01:55:27 GMT  
 IL equivalent of __asm in MC++?
Please, please, please, please ;-)

It's hard to come up with specific examples why this would be useful, but I
have at times missed the feature. It would definitely be great for learning
about the CLR and playing around with IL. I used to use inline assembler all
the time, because it is so much easier than all the goo you need to get a
MASM file to assemble. This same thing applies here (although ILDASM is very
helpful to get a skeleton IL file).

OK, I do have one specific example: I often want to call
Object.GetHashCode() non-virtual. I can't do this in managed C++ (AFAIK),
but I can easily do this in IL.

Regards,
Jeroen



Quote:
> No there isn't.

> Could you explain what you would use the feature for? It is a potential,
but
> currently not high priority feature idea for some future version, so we
are
> trying to understand the scenarios customers would use this for.

> Ronald Laeremans
> Visual C++ team



> > Is there a simple way to embed IL instructions directly in
> > the source of a MC++ or C# function?

> > (Similar to the way __asm is used to embed x86
> > instructions in C++)

> > Thanks,
> > Michael



Sun, 17 Apr 2005 00:30:50 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. is there 'intsanceof' equivalent in mc++

2. MC++ equivalent 'is' (like C#)

3. "Timer"Function in MC or equivalent!!

4. asm, asm, where fore art thou, asm?

5. mc++ causes designer problems

6. Is const for value references obsolete in mc++?

7. Any chance making ConditionalAttribute work with mc++

8. ngen:ed mc++ dll stops working!

9. mc++ causes designer problems

10. Security for mc++ apps

11. finding app path in mc++ application ?

12. A couple mc++ questions ?

 

 
Powered by phpBB® Forum Software