Documente Academic
Documente Profesional
Documente Cultură
I Procedure call
Feb 5 - 6, 2019
I Register:
I A procedure is a self-contained program that is incorporated into a larger
I Call X causes RN ← PC + I and PC ← X
program. I The called procedure saves the contents of RN.
I Procedures provide modularity and reuse of the code. I Start of called procedure:
I Two basic instructions: call and return I Call X causes X ← PC + I and PC ← X+1
I A procedure can be called from more than one location. I The above two approaches complicate the use of reentrant procedures.
I A procedure call can appear in a procedure. I Top of stack:
I Each procedure call is matched by a return in the called program. I The calling procedure stacks both the return address and parameters to be
passed to the called procedure.
Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 2/10 Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 3/10
Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 4/10 Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 5/10
Atomic Read-Modify-Write Instructions Variants of Read-Modify-Write Instructions
Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 6/10 Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 7/10
Saturation Arithmetic
Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 8/10 Madhu Mutyam (IIT Madras) Feb 5 - 6, 2019 9/10
Thank You