This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Fix 61545


On Tue, Jun 17, 2014 at 10:19:06PM -0700, Richard Henderson wrote:
> Trivial fix for missing clobber of the flags over the tlsdesc call.
> 
> Ok for all branches?
> 
> 
> r~
> 
> 	* config/aarch64/aarch64.md (tlsdesc_small_<PTR>): Clobber CC_REGNUM.
> 

pretty sure we need a similar fix for tlsgd_small, since __tls_get_addr
could clobber CC as well.

regards, Kyle

> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
> index a4d8887..1ee2cae 100644
> --- a/gcc/config/aarch64/aarch64.md
> +++ b/gcc/config/aarch64/aarch64.md
> @@ -3855,6 +3855,7 @@
>          (unspec:PTR [(match_operand 0 "aarch64_valid_symref" "S")]
>  		   UNSPEC_TLSDESC))
>     (clobber (reg:DI LR_REGNUM))
> +   (clobber (reg:CC CC_REGNUM))
>     (clobber (match_scratch:DI 1 "=r"))]
>    "TARGET_TLS_DESC"
>    "adrp\\tx0, %A0\;ldr\\t%<w>1, [x0, #%L0]\;add\\t<w>0, <w>0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"


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