1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
std::vector<std::vector<std::vector<char>>> aa
...
temp = aa[x][y][z];
|
movl z(%rip), %ecx // read from z
movl y(%rip), %eax // read from y
movl x(%rip), %edx // read from x
movq aa(%rip), %rsi // read from aa
cltq
leaq (%rax,%rax,2), %rax
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rsi,%rdx,8), %rdx
movq (%rdx), %rdi // read from RAM #1 (aa[x])
movslq %ecx, %rdx
leaq (%rdi,%rax,8), %rax
movq (%rax), %rax // read from RAM #2 (...[y])
movzbl (%rax,%rdx), %eax // read from RAM #3 (...[z])
movb %al, temp(%rip) |