This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] AArch64: Allow additional sizes in prologue



> On 6 Aug 2019, at 10:56, Richard Earnshaw (lists) <Richard.Earnshaw@arm.com> wrote:
> 
> 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.

Ok, will use that way.

Alan.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]