Chapter 4: The Instruction Set Architecture - 10/31/2013 02:13:31 ...
Chapter 4: The Instruction Set Architecture - 10/31/2013 02:13:31 ...
Chapter 4: The Instruction Set Architecture - 10/31/2013 02:13:31 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4-23<br />
<strong>Chapter</strong> 4: <strong>The</strong> <strong>Instruction</strong> <strong>Set</strong> <strong>Architecture</strong><br />
Subroutine Linkage – Registers<br />
• Subroutine linkage with registers passes parameters in registers.<br />
! Calling routine<br />
.<br />
x:<br />
y:<br />
z:<br />
ld [x], %r1<br />
ld [y], %r2<br />
call add_1<br />
st %r3, [z]<br />
.<br />
53<br />
<strong>10</strong><br />
0<br />
! Called routine<br />
! %r3 ← %r1 + %r2<br />
add_1:<br />
addcc %r1, %r2, %r3<br />
jmpl %r15 + 4, %r0<br />
Principles of Computer <strong>Architecture</strong> by M. Murdocca and V. Heuring<br />
© 1999 M. Murdocca and V. Heuring