以下指令在最坏情况下需要多少内存访问:
add edx, (to_printf-next_i) ; where to_printf and next_i are labels defined in .text
inc dword [myarray + ebx*4] ; where myarray is a label defined in .data
我的回答是真的吗?
1. 0 , since we do not access memory here
2. fetch: 4 bytes for the address : myarray + ebx*4 -> 2 memory accesses in the worst case
write: 4 bytes because of "dword" -> 2 memory accesses in the worst case
read?