Gabriel Sechan wrote:


Date: Mon, 31 Mar 2008 23:07:54 -0700
From: [EMAIL PROTECTED]
To: [email protected]
Subject: Re: C++0X gets lambdas/closures

Gabriel Sechan wrote:
Sure it can.  It just can't use the hardware floating point instructions.  It 
can still do software floating point with ints.
It also can't do
union { int i; void * x; }

Hard to emulate pointer indirection with integer math.

Again, a compiler limitation at most-  you can use self-modifying code to 
accomplish this.
It's really hard to put self-modifying code in ROM.

Well, you program a robot to remove the rom chip and replace it.  Easy :)

Alright, you got me on that one. I can't see a way to do function pointers when you have no indirect jumps and no way to modify the original code.

Why do you have to modify the original code?

How about a trampoline? Place a jump instruction into RAM and always jump there and then it jumps to where you want to go.

Also, is PC not modifiable?  Normally there is a "Put into PC register".

-a

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to