C :
int main(){
int A[2];
A[1] = A[0] + A[1];
return 0;
}
Assembly :
main:
addiu $sp,$sp,-16
sw $fp,12($sp)
move $fp,$sp
lw $3,0($fp)
lw $2,4($fp)
addu $2,$3,$2
sw $2,4($fp)
move $2,$0
move $sp,$fp
lw $fp,12($sp)
addiu $sp,$sp,16
jr $31
nop
For the array which store A[1] and A[0]
I think might be store into page table first
Based on the compiler read code from left to right ? A[1] first
Based on the MIPS format setting from I learned on Computer Organization. A[0] first
|opcode | rs | rt | rd | shmat | funct |
I am so curious about it.