banner



How To Clear Register In Mips

Piece of cake way to articulate registers in mips assembly?

  • Thread starter TGCid
  • Start date
  • #1
This is my showtime time experience with mips associates. I am using spim. We are doing the program where after some manipulation, the programme loops back to the beginning unless a quit command is given. My problem is that I don't know what registers I messed with simply afterward the 1st loop, some weird behaviors would occur. I call up it is the fault of the registers not being reset. How would you reset all the registers back to the way it was when you get-go run the code? Thanks.
  • #2
Ummm, copy all the values in the registers into the stack before modifying them. Technically, the simply ones you need to re-create are the caller-saved ones, just practically there is no difference. When you need to retrieve the values just read them from the stack.
her209
  • #iv
Brings dorsum bad memories of my Os course.
  • #5
Originally posted by: Marty
Ummm, re-create all the values in the registers into the stack before modifying them. Technically, the only ones you demand to copy are the caller-saved ones, just practically at that place is no divergence. When y'all need to recall the values just read them from the stack.
What he said. I don't have any experience with MIPS; at our school, CPE's utilize MIPS, and EE's plan for the MC68000. Merely from what you've described, it seems comparable (the just difference I tin retrieve is, I believe, MIPS has more address registers than the 68.
  • #half-dozen
this is totally off topic merely maybe this isn't the right forum for this ;)
  • Advertising
  • Cookies Policies
  • Privacy
  • Term & Weather condition
  • Most us

Source: https://forums.anandtech.com/threads/easy-way-to-clear-registers-in-mips-assembly.985558/

Posted by: samswortatuslege.blogspot.com

0 Response to "How To Clear Register In Mips"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel