Is there a danger in using the $gp
register to store a value? I guess my question is what is the true functionality of $gp
and is it invoked behind-the-scenes somehow so that if I were to use it, things could go very very wrong?
相关问题
- Translate the following machine language code (0x2
- In MIPS, what's the difference between signed
- Stalling or bubble in MIPS
- What are shadow registers in MIPS and how are they
- Dynamic vs Static instruction count
相关文章
- Why are memory addresses incremented by 4 in MIPS?
- Why doesn't there exists a subi opcode for MIP
- Assembly PC Relative Addressing Mode
- Get values of specific bits in a byte
- MIPS - compare input string to one stored in memor
- Need help in adding more functionality to MIPS Sin
- How do I implement multiplication and division in
- Reading an integer into a local variable in MIPS
Well, $gp register points to the global area. Convention indicates that you should store it when you write a function (see .cprestore).
If you need to use it (honestly, cant see why), remeber these things:
Also, i'm not sure, but you can forget about PIC code.