This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2] gas: use literals/const16 for xtensa loop relaxation
- From: "augustine dot sterling at gmail dot com" <augustine dot sterling at gmail dot com>
- To: Max Filippov <jcmvbkbc at gmail dot com>
- Cc: binutils at sourceware dot org, Eric Tsai <erictsai at cadence dot com>, linux-xtensa at linux-xtensa dot org
- Date: Wed, 3 Apr 2019 09:23:10 -0700
- Subject: Re: [PATCH v2] gas: use literals/const16 for xtensa loop relaxation
- References: <20190403014916.23956-1-jcmvbkbc@gmail.com>
On Tue, Apr 2, 2019 at 6:49 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Loop opcode relaxation that uses addi/addmi doesn't work well with other
> relaxations that may cause code movement. Instead of encoding fixed loop
> end offset in the relaxed sequence use l32r or a pair of const16 to load
> loop end address. This way the address of the loop end gets a relocation
> record and it gets updated appropriately.
>
> gas/
> 2019-04-02 Max Filippov <jcmvbkbc@gmail.com>
>
> * config/tc-xtensa.c (convert_frag_immed): Drop
> convert_frag_immed_finish_loop invocation.
> (convert_frag_immed_finish_loop): Drop declaration and
> definition.
> * config/xtensa-relax.c (widen_spec_list): Replace loop
> widening that uses addi/addmi with widening that uses l32r
> and const16.
This is OK.