Patent ID: 7979685

Claim:
A resource-constrained device comprising: a processor configured to execute a plurality of instruction streams, each of said plurality of instruction streams comprising a plurality of instructions, wherein each instruction comprises an opcode and zero or more operands, each of said plurality of instruction streams associated with one of a plurality of instruction execution modes having an instruction set comprising a plurality of instruction implementations, at least one of said plurality of instruction implementations configured to change said processor from a first instruction execution mode to a second instruction execution mode, said processor comprising an instruction fetcher configured to fetch an instruction from one of said plurality of instruction streams based at least in part upon a current value of an instruction execution mode indicator, wherein said plurality of instruction streams includes a restricted instruction steam and an unrestricted instruction stream; said restricted instruction stream and said unrestricted instruction stream comprise a shared instruction subset, said shared instruction subset comprising at least one instruction shared between said restricted instruction stream and said unrestricted instruction stream, each instruction in a shared instruction subset having the same instruction coding for said restricted instruction stream and said unrestricted instruction stream; the resource-constrained device further comprising: a data stack pointer; a shared current data stack bottom pointer; a data stack referenced by said shared current data stack bottom pointer and said data stack pointer; a hard data stack bottom pointer; an unrestricted program counter; one or more restricted program counters; and a top of data stack reference wherein an unrestricted portion of said data stack is delineated by said hard data stack bottom pointer and said shared current data stack bottom pointer, and a restricted portion of said data stack is delineated by said shared current data stack bottom pointer and said top of data stack reference.