Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jeff Law
On 5/28/19 9:48 AM, Jakub Jelinek wrote: > On Tue, May 28, 2019 at 08:30:59AM -0700, H.J. Lu wrote: >>> We shouldn't generate ENDBR in that case, nothing can goto to bar (otherwise >>> it would remain a normal label, not a deleted label). >>> >> >> But return value of func () may be used with indir

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jakub Jelinek
On Tue, May 28, 2019 at 08:30:59AM -0700, H.J. Lu wrote: > > We shouldn't generate ENDBR in that case, nothing can goto to bar (otherwise > > it would remain a normal label, not a deleted label). > > > > But return value of func () may be used with indirect jump. No, it may be used say to print t

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread H.J. Lu
On Tue, May 28, 2019 at 8:16 AM Jakub Jelinek wrote: > > On Tue, May 28, 2019 at 08:10:19AM -0700, H.J. Lu wrote: > > On Tue, May 28, 2019 at 1:57 AM Jakub Jelinek wrote: > > > > > > On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > > > > For NOTE_INSN_DELETED_LABEL, we should check if

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jakub Jelinek
On Tue, May 28, 2019 at 08:10:19AM -0700, H.J. Lu wrote: > On Tue, May 28, 2019 at 1:57 AM Jakub Jelinek wrote: > > > > On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > > > For NOTE_INSN_DELETED_LABEL, we should check if forced_labels to see > > > > if its address is taken. Also ix86_

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread H.J. Lu
On Tue, May 28, 2019 at 1:57 AM Jakub Jelinek wrote: > > On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > > For NOTE_INSN_DELETED_LABEL, we should check if forced_labels to see > > > if its address is taken. Also ix86_init_large_pic_reg shouldn't set > > > LABEL_PRESERVE_P (in_struct)

Re: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-28 Thread Jakub Jelinek
On Sat, Feb 16, 2019 at 07:02:11AM -0800, H.J. Lu wrote: > > For NOTE_INSN_DELETED_LABEL, we should check if forced_labels to see > > if its address is taken. Also ix86_init_large_pic_reg shouldn't set > > LABEL_PRESERVE_P (in_struct) since NOTE_INSN_DELETED_LABEL is suffcient > > to keep the labe

Re: PING^1: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-27 Thread Uros Bizjak
On Tue, May 21, 2019 at 11:48 PM H.J. Lu wrote: > > On Sat, Feb 16, 2019 at 7:02 AM H.J. Lu wrote: > > > > On Thu, Feb 14, 2019 at 08:13:32PM -0800, H.J. Lu wrote: > > > NOTE_INSN_DELETED_LABEL is used to mark what used to be a 'code_label', > > > but was not used for other purposes than taking i

PING^1: V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-05-21 Thread H.J. Lu
On Sat, Feb 16, 2019 at 7:02 AM H.J. Lu wrote: > > On Thu, Feb 14, 2019 at 08:13:32PM -0800, H.J. Lu wrote: > > NOTE_INSN_DELETED_LABEL is used to mark what used to be a 'code_label', > > but was not used for other purposes than taking its address and was > > transformed to mark that no code jumps

V2 [PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-02-16 Thread H.J. Lu
On Thu, Feb 14, 2019 at 08:13:32PM -0800, H.J. Lu wrote: > NOTE_INSN_DELETED_LABEL is used to mark what used to be a 'code_label', > but was not used for other purposes than taking its address and was > transformed to mark that no code jumps to it. NOTE_INSN_DELETED_LABEL > is generated only in 3

[PATCH] i386: Insert ENDBR for NOTE_INSN_DELETED_LABEL only if needed

2019-02-14 Thread H.J. Lu
NOTE_INSN_DELETED_LABEL is used to mark what used to be a 'code_label', but was not used for other purposes than taking its address and was transformed to mark that no code jumps to it. NOTE_INSN_DELETED_LABEL is generated only in 3 places: 1. When delete_insn sees an unused label which is an exp