Slide 28
Slide 28 text
Copyright (c) 2016, Alex Blewitt, Bandlem Ltd
JavaOne 2016
Template Interpreter
• Load byte *(r13 + 1) into 32-bit ebx; r13++
arraylength 190
0x00000001068fe9a0: pop %rax
0x00000001068fe9a1: mov 0xc(%rax),%eax
0x00000001068fe9a4: movzbl 0x1(%r13),%ebx
0x00000001068fe9a9: inc %r13
0x00000001068fe9ac: movabs $0x106293760,%r10
0x00000001068fe9b6: jmpq *(%r10,%rbx,8)
0x00000001068fe9ba: nopw 0x0(%rax,%rax,1)
r13 is the bytecode index pointer
Logically equivalent to:
inc %r13 ; %r13++
movzbl (%r13), %ebx
but HotSpot's approach is faster since the naïve implementation would cause a data
dependency on %r13 between the prior instruction and the subsequent one