> On Sep 17, 2015, at 5:42 PM, dwight <[email protected]> wrote:
> 
> I am quite aware of the caching problem.
> What I don't understand is what problem they thought they
> were fixing by outlawing self modifying code.

Self modifying code in sense #4 from my earlier note (i.e., a program that 
scribbles on bits of itself) is a perfectly fine programming technique if you 
have an ISA that leaves you no choice, and a good choice in some other 
specialized cases.  Boot time customization of critical kernel paths is an 
example.

The issue is that such code is hard to maintain because the source does not 
directly reflect what is executed.  So even by the standards of assembly 
language programming, self-modifying code adds a level of pain.  If it's poorly 
documented, you're in real trouble.

For a nice example, read "Mel, the story of a Real Programmer".  :-)

        paul


Reply via email to