I want a compiled program to be able to tell at runtime in a single read operation which function is on the stack.
So that the program can find metadata about the function, like the function's caller or which expression in the source code the program is about to execute, and to find this metadata in O(1). 
Today's processor does something similar. When a function is called the processor pushes automatically the return address on the stack. This address can be used to find which function is currently running. But this isn't quite the same, because it takes more than a single read operation to find the function. The return address points to a range between the start and end of the function, and searching for this range takes longer than O(1).
I want something different than just pushing a memory address on the stack. I want the processor to also push an integer function id into an array. Ids are much smaller than memory addresses. Most programs have only a few hundred functions, so an id can be a 2-byte value.  An id can be used as an index in an array of all functions loaded in memory. And since the processor already does the extra work of pushing the return address on the stack during a function call (and incrementing the stack pointer), it can also push the function id in a call array at the same time (and increment a call index pointer). When the function returns (when a RET instruction is executed) the call index pointer can be decremented.
This is slow if done in software. It has overhead of ~6%-30%.
Where will the processor get the function id from in order to save it in the call index? The CALL instruction isn't wide enough to contain both the absolute memory address of the callee and also the function id. A variant of CALL that uses relative addressing may not be wide enough either. So where can CALL get the function id?
I know this may sound inappropriate, but how about saving the function id right after the CALL instruction? Then the processor will know exactly where to look.  Or if the processor uses a variable length instruction set, make a longer version of the CALL instruction and save the function id in it. The wisdom of keeping a clean separation between data and code served well for many problems but the nature of this problem suggests a different solution.