## Sketch of compressed OOPs for amd64. See also compressed-oops-arm.S. .intel_syntax noprefix ## Index compressed oop in r8 using heap base pointer in r12 ## to load a compressed oop from memory into r10: ## 47 8b 54 c4 10 mov 0x10(%r12,%r8,8),%r10d mov r10d, dword ptr [r12 + r8*8 + 16] ## Contrast with uncompressed oops: ## 4d 8b 50 20 mov 0x20(%r8),%r1 movq r10, [r8 + 32] ## What if we instead have 16-bit compressed OOPs and ## 32-bit-aligned objects? The above assumes 64-bit-aligned. ## This involves slightly larger code but probably only the ## same amount of work. ## 66 47 8b 54 84 08 mov 0x8(%r12,%r8,4),%r10w mov r10w, word ptr [r12 + r8*4 + 8]