文章目录[隐藏]
Language Execution continuum
An interpreter is a program that executes other programs.
- langurage translation gives us another option
- In genreral, we interpret a high-level language to a lower-level language to increase preformance
interpretation
- Python
- asm
Assembler directives
pseudo-instruction replacement
what's tail's about
{...
lots of code
return foo(y);
}
- it's recursive call to
foo()
if this is withinfoo()
, or call to a different function... - for effictiency
- Evaluate the arguments for
foo()
ina0-a7
- return
ra
, all callee saved registers andsp
- Then call
foo()
withj
ortail
- Evaluate the arguments for
- when
foo()
returns, it can return directly to where it needs to return to- Rather than returning to wherever
foo()
was called and returning from there Tail call optimization
- Rather than returning to wherever
-
branches
Linking progress
Four types of Address
PC- relative addredding (beq
)