On Fri, 29 Sep 2006, Martin Peach wrote:
One thing that could be done with 6809s and their ilk was self-modifying code, so that for example, a program could replace the opcode at a certain position before executing it, so that a single piece of code could do perform different functions. This was important when you had less than 64k of RAM.
Last year or so, I was thinking about writing self-modifying code in order to be able to do something like for (i=0; i<n; i++) a[i]=b; but using all SIMD registers for a, and instead make b an immediate value by modifying the code just prior to running it. This is because there is a power-of-two number of SIMD registers and it's easier to use a power-of-two number of them per loop iteration, so because I would normally need one to store b, I would only be able to use half of them.
But maybe that it's pointless or misguided, due to various things like how many more registers are in SSE or how bigger they are (I only learned MMX1 and that's the only thing GridFlow can use as of now), or where the bottleneck really is - the attempts I've made with MMX didn't pay off enough and I believe that it is because of things I didn't understand.
(do you have any advice?)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada