Comments (2)
Return address gets overwritten
from congenial-elucidator.
Redesign the mechanism:
Treat $ra
as a caller saved register. Caller saves it when making a call, restores it when the callee returns. Thus $ra
will hold the return address while a function is running.
This way we won't need to save it at every label (thus get rid of the dirty hack) and don't need to restore at return
statements.
from congenial-elucidator.
Related Issues (20)
- Implement return statement
- Implement function calls
- Implement function arguments HOT 2
- Dynamically determine stack frame size
- Emits non-register operands for register operations
- `not` instruction is broken HOT 1
- Use unsigned arithmetic for address computation
- Unaligned address in inst/data fetch
- Saved return address gets overwritten
- Block numbers messed up when no functions are defined
- Write a README HOT 1
- Strange behaviour in loops HOT 1
- Local offsets are wrong for the first function in a program HOT 2
- Return value of main is ignored
- Grammar is not LALR(1)
- Wrong codegen when actual arguments contain function calls HOT 1
- Logical not operation is broken HOT 1
- Add block numbers to variables
- Use the stack for variables HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from congenial-elucidator.