This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to inform as optimize lw v0, VAR with the specified register?
- From: Adam Nemet <anemet at caviumnetworks dot com>
- To: Pan ruochen <panruochen at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 23 Jul 2009 23:10:14 -0700
- Subject: Re: How to inform as optimize lw v0, VAR with the specified register?
- References: <af0faace0907231927m3025e0afteb1892dfe178c12e@mail.gmail.com>
Pan ruochen <panruochen@gmail.com> writes:
> But if in the context of interrupts or exceptions, the at register
> can't be used before being saved on the stack. So I wonder if
> there is any option to inform as to optimize with a specified register
> like k0/k1, which can be used directly without being saved.
Try:
.set at=$26
before the instruction.
.set at
resets at back to $1.
You can also use ".set noat" to tell the assembler that it shouldn't use
at. In this case if your program uses a macro that requires at, you get
an error.
Adam