Re: question on MIPS: addiu
- From: Keep Asking <ask8y@xxxxxxxxx>
- Date: Fri, 29 Aug 2008 13:05:08 -0700 (PDT)
I eman
addiu v1, v1, 0
I know what it means "addiu", I just do not understand what is purpose
to do? it does not seems to do anything.
On Aug 29, 2:32 am, Herbert Kleebauer <k...@xxxxxxxxx> wrote:
Keep Asking wrote:
What is purpose of following assembly:
addiu v1, v1, 0
v1 or r1? Seems to be a nop.
Why don't you download the processor manuals:
Format: ADDIU rt, rs, immediate MIPS32 (MIPS I)
Purpose:
To add a constant to a 32-bit integer
Description: rt ¬ rs + immediate
The 16-bit signed immediate is added to the 32-bit value in GPR rs and
the 32-bit arithmetic result is placed into GPR rt.
No Integer Overflow exception occurs under any circumstances.
Restrictions:
None
Operation:
temp ¬ GPR[rs] + sign_extend(immediate)
GPR[rt]¬ temp
Exceptions:
None
Programming Notes:
The term “unsigned” in the instruction name is a misnomer; this operation
is 32-bit modulo arithmetic that does not trap on overflow. This instruction
is appropriate for unsigned arithmetic, such as address arithmetic, or
integer arith-metic environments that ignore overflow, such as C language
arithmetic.
.
- Follow-Ups:
- Re: question on MIPS: addiu
- From: Harold Aptroot
- Re: question on MIPS: addiu
- References:
- question on MIPS: addiu
- From: Keep Asking
- question on MIPS: addiu
- Prev by Date: Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
- Next by Date: Re: question on MIPS: addiu
- Previous by thread: question on MIPS: addiu
- Next by thread: Re: question on MIPS: addiu
- Index(es):