[PATCH] AArch64: Allow additional sizes in prologue

Richard Earnshaw (lists) Richard.Earnshaw@arm.com
Tue Aug 6 09:56:00 GMT 2019


On 06/08/2019 09:58, Alan Hayward wrote:
> 
> 
>> On 5 Aug 2019, at 18:43, Tom Tromey <tom@tromey.com> wrote:
>>
>>>>>>> "Alan" == Alan Hayward <Alan.Hayward@arm.com> writes:
>>
>> Alan> When saving registers to the stack at the start of a function, not all state
>> Alan> needs to be saved. For example, only the first 64bits of float registers need
>> Alan> saving.  However, a program may choose to store extra state if it wishes,
>> Alan> there is nothing preventing it doing so.
>>
>> Alan> The aarch64_analyze_prologue will error if it detects extra state being
>> Alan> stored.  Relex this restriction.
>>
>> I don't know anything about AArch64, so I can't really comment on the
>> content of the patch, but I did happen to see a nit:
>>
>> Alan>  	  stack.store (pv_add_constant (regs[rn],
>> Alan>  					inst.operands[1].addr.offset.imm),
>> Alan> -		       is64 ? 8 : 4, regs[rt]);
>> Alan> +					size, regs[rt]);
>>
>> ...this addition looked mis-indented to me.
> 
> Thanks.
> I probably missed that because the correct formatting looks horrible:
> 
> 	  stack.store (pv_add_constant (regs[rn],
> 					inst.operands[1].addr.offset.imm),
> 		       size, regs[rt]);
> 
> Instead, I can update it to the following
> 
> 	  stack.store (
> 	    pv_add_constant (regs[rn], inst.operands[1].addr.offset.imm),
> 	    size, regs[rt]);
> 

I think the coding convention in that case is to write:


	  stack.store
             (pv_add_constant (regs[rn], inst.operands[1].addr.offset.imm),
	     size, regs[rt]);

R.

>>
>> Tom
> 



More information about the Gdb-patches mailing list