Topic V0C
Register Calling Conventions
1
,Register saving/
restoring calling
conventions
2
, Caller has values stored in registers Can the callee simply write over the
here: register values?
foo: bar:
⋯ What needs to
⋯ be done here?
jal ra, bar
⋯
⋯
jalr zero, ra, 0 jalr zero, ra,
0
caller callee
Or does the callee need to save the
Are the same values still there? register values before using them?
No if the calleecan overwright it
3
Register Calling Conventions
1
,Register saving/
restoring calling
conventions
2
, Caller has values stored in registers Can the callee simply write over the
here: register values?
foo: bar:
⋯ What needs to
⋯ be done here?
jal ra, bar
⋯
⋯
jalr zero, ra, 0 jalr zero, ra,
0
caller callee
Or does the callee need to save the
Are the same values still there? register values before using them?
No if the calleecan overwright it
3