Am I correct that the following instruction codes are not used by the COG processors ... ?
Code:0001 00-- ---- ---- ---- ---- ---- ---- 0001 01-- ---- ---- ---- ---- ---- ---- 0001 10-- ---- ---- ---- ---- ---- ---- 0001 11-- ---- ---- ---- ---- ---- ----
If so, then for a Large Memory Model, where code pages to execute are loaded from Hub under COG control, if one were prepared to sacrifice loading speed for code density in the Hub, those instructions could be used as 'macro instructions', identified and expanded when they are loaded to be JMPRET calls to a micro-kernel already in the COG with the original macro instruction following them.
The micro-kernel when entered would have enough information to locate and act upon the macro instruction and continue real instruction execution when complete.
From an Assembler programmer's point of view ( with the right assembler tool ), they would have access to new instructions which would be emulated/interpreted when encountered within the executing COG.
I see little difference in end result whether something like FJMP ( to jump between COG code pages ) were expanded to multiple instructions in Hub by the assembler or a single macro instruction expanded to the same when loaded.
There are arguments for and against each mechanism. This is really a half-way house between pure native instruction execution and full COG interpretation of a virtual machine instruction set, a little further towards interpretation than previous Large Memory Model discussions seem to have been.
It is an idea which I can see being useful in what I am planning where fastest execution isn't the primary goal, so I thought I would share.
Added :
One way to keep loading as fast as possible for code pages, would be a marker, to indicate if any macro codes were used in that page, and then fix the code up post-loading. That would likely involve shuffling the code block loaded in memory to insert JMPRET's so could be time consuming.
Post Edited (hippy) : 8/13/2007 1:26:42 PM GMT



Reply With Quote

(I ignore the other one in pPropellerSim, but I should not, I do not know what happens...).

Bookmarks