i have to add new SuperInstructions to the Java which is a replacement of some sequence of instructions in the bytecode. I have gone through many research articles but the file names which should be updated are not mentioned in any of the article.
Can anyone please identify me the hotspot file(s) which contain the Main Interpreter Loop of the JVM having the case statements in any architecture like X86, ARM etc.
In other words, i need location of the file which contain the opcodes so that i can modify them.
Adding a new instruction is not an easy task if you are not familiar with HotSpot source code. This is not a matter of modifying just a few locations; this rather involves many JVM parts, including
Furthermore, HotSpot JVM does not have a 'Main Interpreter Loop' at all. Instead there is a so-called 'template interpreter' which is generated at runtime when JVM starts. For each bytecode there is a platform-dependent assembly-like template that generates interpreter snippet for execution of this bytecode in all possible top-of-stack states. Each template typically ends with a sequence that dispatches to the next bytecode.
To get an idea how x86 template interpreter looks like, see src/cpu/x86/vm/templateTable_x86.cpp. New instructions will require a similar template.