News for hackers. Stuff that matters.
Re:Bug #48669: PHP now includes GOTO by kwantam on Saturday August 22, 2009 @01:24AM (#779052)
comefrom is an excellent and seriously useful instruction.

My team has (kind of) implemented it in hardware as a way of patching ROM code in RAM. When the PC becomes equal to an address in the comefrom table, the PC is loaded with a RAM address and execution continues there.

If you have a big chunk of code that could need small tweaks, storing it in ROM and implementing a small RAM alongside it saves a lot of chip area.

I'm almost 100% sure Freescale does this on some of their 32-bit microcontrollers.

Yes, I design ICs. No, I do not work for Freescale.

There are no comments on this comment yet.