Re: [PATCH 4/5] ARC: add support for DSP-enabled userspace applications

From: Vineet Gupta
Date: Wed Mar 04 2020 - 12:58:21 EST


On 3/4/20 3:51 AM, Eugeniy Paltsev wrote:
>>> + "r" (_saveto), \
>>> + "r" (_readfrom), \
>>> + "I" (_aux), \
>>> + "I" (_offt) \
>>> + : \
>>
>> AEX with "I" constraint will likely be an 8 byte instructions always. Best to give
>> compiler wiggle room with "Ir"
>
> Could you please explain how "Ir" will work in this case?
> Does this mean that compiler can pass the value either as constant ('I') or
> via register ('r')?

Right. If the same compile-time const is used multiple times, say SR of same value
to a reg, if can decide to hoist the value in a register, if you provide it "r" or
"Ir", leading to shorter overall code.

-Vineet