This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gas: xtensa: limit size of auto litpools
- From: Max Filippov <jcmvbkbc at gmail dot com>
- To: "augustine dot sterling at gmail dot com" <augustine dot sterling at gmail dot com>
- Cc: binutils at sourceware dot org, linux-xtensa at linux-xtensa dot org
- Date: Tue, 20 Feb 2018 11:55:52 -0800
- Subject: Re: [PATCH] gas: xtensa: limit size of auto litpools
- Authentication-results: sourceware.org; auth=none
- References: <1518394719-6457-1-git-send-email-jcmvbkbc@gmail.com> <CAGSvup8mzzsb_7tP2GSzNb26sjSaYj7bdpiDF=T4EuzghMCoXw@mail.gmail.com>
On Tue, Feb 20, 2018 at 11:19 AM, augustine.sterling@gmail.com
<augustine.sterling@gmail.com> wrote:
> On Sun, Feb 11, 2018 at 4:18 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Literal movement code may grow auto litpool so big that it won't be
>> possible to jump around it. Limit the size of auto litpools by 1/2 of
>> the jump range.
>>
>> gas/
>> 2018-02-08 Max Filippov <jcmvbkbc@gmail.com>
>>
>> * config/tc-xtensa.c (struct litpool_frag): Add new field
>> literal_count.
>> (MAX_AUTO_POOL_LITERALS, MAX_EXPLICIT_POOL_LITERALS)
>> (MAX_POOL_LITERALS): New macro definitions.
>> (auto_litpool_limit): Initialize to 0.
>> (md_parse_option): Set auto_litpool_limit in the presence of
>> --auto-litpools option.
>> (xtensa_maybe_create_literal_pool_frag): Zero-initialize
>> literal_count field.
>> (xg_find_litpool): New function. Make sure that found literal
>> pool size is within the limit.
>> (xtensa_move_literals): Extract literal pool search code into
>> the new function.
>> * testsuite/gas/xtensa/all.exp: Add auto-litpools-2 test.
>> * testsuite/gas/xtensa/auto-litpools-2.d: New file.
>> * testsuite/gas/xtensa/auto-litpools-2.s: New file.
>> * testsuite/gas/xtensa/auto-litpools.d: Fix up changed
>> addresses.
>> * testsuite/gas/xtensa/auto-litpools.s: Change literal value so
>> that objdump doesn't get out of sync.
>
>
> This is OK for binutils.
Thanks, applied to master.
-- Max