Re: [PATCH][PPC64] [PR88877]

2020-05-23 Thread Segher Boessenkool
Hi!

On Mon, Mar 23, 2020 at 08:16:51PM +0530, kamlesh kumar wrote:
> * rtl.h : Defined Tuple for bundling rtx, mode and
> unsignedness default as 0

This line is too long (and your mailer wrapped it).  No space before
colon.  Full stop at the end of a line.

Write changelogs in the imperative.

> Added Extra argument (unsignedp) in emit_library_call and
> emit_library_call_value.

Use "bool" for boolean arguments (just like anywhere else), not "int".

Boolean arguments are problematic usually: there is no way someone can
tell from a call site what that argument is, usually.  Written as "0" it
is even worse than "false".

And it doesn't even mean "not unsigned" here, in most cases!  It just
means "we don't care", or "we don't know", or "whatever".

> * testsuite/gcc.target/powerpc/pr88877.c : Newtest

That should be in a separate changelog (and be "New." or "New test." or
similar).


Please split this into a bunch of patches: the first few only change the
interface (so add the extra "bool" arguments), but in such a way that no
behaviour changes at all.  One patch for every function that is used a
lot it easiest to review (and to write, and to write the changelog for,
this is not extra work for you either, quite the opposite).

Followed by a patch that actually changes things.  I could not find
anywhere where you do not pass "false" for that new bool argument, btw.,
which illustrates my point here.

Do we really want function calls that are indented fifty characters, and
then have nine(!) arguments?  At some point adding stuff on top makes
things topple over, and it is better to restructure things first.  Of
course that isn't fair to demand of you here, but maybe you see some
opportunity to improve things?


Segher


Re: [PATCH][PPC64] [PR88877]

2020-05-22 Thread kamlesh kumar via Gcc-patches
ping?

On Tue, May 19, 2020 at 5:32 PM kamlesh kumar 
wrote:

> can someone look at the patch, please?
>
>
> On Wed, Apr 8, 2020 at 9:29 PM Jeff Law  wrote:
>
>> On Mon, 2020-04-06 at 14:58 +0530, kamlesh kumar via Gcc-patches wrote:
>> > Hi Richard,
>> > Here is a discussion we did some time ago
>> > https://gcc.gnu.org/pipermail/gcc/2019-January/227834.html
>> > please see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877 for more
>> > info regarding the bug.
>> >
>> > We incorporated below Jakub's suggestion in this patch.
>> >
>> > Jakub wrote:
>> > ""
>> > Yeah, all the callers of emit_library_call* would need to be changed to
>> pass
>> > triplets rtx, machine_mode, int/bool /*unsignedp*/, instead of just
>> > rtx_mode_t pair.
>> > Jakub
>> > ""
>> I think you're generally on the right track here, but I'm deferring this
>> to gcc11
>> (other maintainers are, of course, welcome to push it for gcc10 as it's a
>> code
>> correctness issue).
>>
>> Jeff
>> >
>>
>>


Re: [PATCH][PPC64] [PR88877]

2020-05-19 Thread kamlesh kumar via Gcc-patches
can someone look at the patch, please?


On Wed, Apr 8, 2020 at 9:29 PM Jeff Law  wrote:

> On Mon, 2020-04-06 at 14:58 +0530, kamlesh kumar via Gcc-patches wrote:
> > Hi Richard,
> > Here is a discussion we did some time ago
> > https://gcc.gnu.org/pipermail/gcc/2019-January/227834.html
> > please see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877 for more
> > info regarding the bug.
> >
> > We incorporated below Jakub's suggestion in this patch.
> >
> > Jakub wrote:
> > ""
> > Yeah, all the callers of emit_library_call* would need to be changed to
> pass
> > triplets rtx, machine_mode, int/bool /*unsignedp*/, instead of just
> > rtx_mode_t pair.
> > Jakub
> > ""
> I think you're generally on the right track here, but I'm deferring this
> to gcc11
> (other maintainers are, of course, welcome to push it for gcc10 as it's a
> code
> correctness issue).
>
> Jeff
> >
>
>


Re: [PATCH][PPC64] [PR88877]

2020-04-08 Thread Jeff Law via Gcc-patches
On Mon, 2020-04-06 at 14:58 +0530, kamlesh kumar via Gcc-patches wrote:
> Hi Richard,
> Here is a discussion we did some time ago
> https://gcc.gnu.org/pipermail/gcc/2019-January/227834.html
> please see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877 for more
> info regarding the bug.
> 
> We incorporated below Jakub's suggestion in this patch.
> 
> Jakub wrote:
> ""
> Yeah, all the callers of emit_library_call* would need to be changed to pass
> triplets rtx, machine_mode, int/bool /*unsignedp*/, instead of just
> rtx_mode_t pair.
> Jakub
> ""
I think you're generally on the right track here, but I'm deferring this to 
gcc11
(other maintainers are, of course, welcome to push it for gcc10 as it's a code
correctness issue).

Jeff
> 



Re: [PATCH][PPC64] [PR88877]

2020-04-07 Thread Segher Boessenkool
On Mon, Apr 06, 2020 at 11:46:17AM +0530, kamlesh kumar wrote:
> Segher,
> Please provide your suggestion/thought on the fix.

Why me?

I cannot approve almost all of this patch.  It is huge.  It is stage 1
so patches like this should not be submitted at all now (you can ask for
people to look at it, etc., but you didn't).


Segher


Re: [PATCH][PPC64] [PR88877]

2020-04-06 Thread kamlesh kumar via Gcc-patches
Hi Richard,
Here is a discussion we did some time ago
https://gcc.gnu.org/pipermail/gcc/2019-January/227834.html
please see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877 for more
info regarding the bug.

We incorporated below Jakub's suggestion in this patch.

Jakub wrote:
""
Yeah, all the callers of emit_library_call* would need to be changed to pass
triplets rtx, machine_mode, int/bool /*unsignedp*/, instead of just
rtx_mode_t pair.
Jakub
""

On Mon, Apr 6, 2020 at 2:47 PM Richard Biener  wrote:
>
> On Mon, 6 Apr 2020, kamlesh kumar wrote:
>
> > Segher,
> > Please provide your suggestion/thought on the fix.
>
> There is not a single line of explanation what the change does so what
> do you expect?
>
> Richard.
>
> > On Mon, Mar 23, 2020 at 8:16 PM kamlesh kumar  
> > wrote:
> > >
> > > Attached patch fixes.
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877.
> > > ChangeLog Entry.
> > >
> > > 2020-03-23  Kamlesh Kumar  
> > >
> > > * rtl.h : Defined Tuple for bundling rtx, mode and
> > > unsignedness default as 0
> > > Added Extra argument (unsignedp) in emit_library_call and
> > > emit_library_call_value.
> > > * except.c : Likewise.
> > > * explow.c : Likewise.
> > > * expmed.c : Likewise.
> > > * expr.c : Likewise.
> > > * optabs.c : Likewise.
> > > * asan.c : Likewise.
> > > * builtins.c : Likewise.
> > > * calls.c : Likewise.
> > > * cfgexpand.c : Likewise.
> > > * config/aarch64/aarch64.c : Likewise.
> > > * config/aarch64/aarch64.h : Likewise.
> > > * config/aarch64/atomics.md : Likewise.
> > > * config/alpha/alpha.c : Likewise.
> > > * config/arc/arc.c : Likewise.
> > > * config/arc/elf.h : Likewise.
> > > * config/arc/linux.h : Likewise.
> > > * config/arm/arm.c : Likewise.
> > > * config/bfin/bfin.md : Likewise.
> > > * config/c6x/c6x.c : Likewise.
> > > * config/csky/csky.c : Likewise.
> > > * config/frv/frv.c : Likewise.
> > > * config/i386/i386-expand.c : Likewise.
> > > * config/i386/i386.c : Likewise.
> > > * config/ia64/ia64.c : Likewise.
> > > * config/ia64/ia64.md : Likewise.
> > > * config/m32r/m32r.c : Likewise.
> > > * config/m68k/linux.h : Likewise.
> > > * config/m68k/m68k.c : Likewise.
> > > * config/microblaze/microblaze.c : Likewise.
> > > * config/mips/mips.h : Likewise.
> > > * config/mips/sdemtk.h : Likewise.
> > > * config/nds32/nds32.h : Likewise.
> > > * config/nios2/nios2.c : Likewise.
> > > * config/or1k/or1k.c : Likewise.
> > > * config/pa/pa.c : Likewise.
> > > * config/pa/pa.md : Likewise.
> > > * config/pru/pru.c : Likewise.
> > > * config/riscv/riscv.h : Likewise.
> > > * config/riscv/riscv.md : Likewise.
> > > * config/rl78/rl78.c : Likewise.
> > > * config/rs6000/rs6000-string.c : Likewise.
> > > * config/rs6000/rs6000.c : Likewise.
> > > * config/rs6000/rs6000.md : Likewise.
> > > * config/rs6000/vsx.md : Likewise.
> > > * config/sh/sh.c : Likewise.
> > > * config/sparc/sparc.c : Likewise.
> > > * config/tilegx/tilegx.c : Likewise.
> > > * config/tilepro/tilepro.c : Likewise.
> > > * config/visium/visium.c : Likewise.
> > > * config/xtensa/xtensa.c : Likewise.
> > > * testsuite/gcc.target/powerpc/pr88877.c : Newtest
> >
>
> --
> Richard Biener 
> SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
> Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)


Re: [PATCH][PPC64] [PR88877]

2020-04-06 Thread Richard Biener
On Mon, 6 Apr 2020, kamlesh kumar wrote:

> Segher,
> Please provide your suggestion/thought on the fix.

There is not a single line of explanation what the change does so what
do you expect?

Richard.

> On Mon, Mar 23, 2020 at 8:16 PM kamlesh kumar  wrote:
> >
> > Attached patch fixes.
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877.
> > ChangeLog Entry.
> >
> > 2020-03-23  Kamlesh Kumar  
> >
> > * rtl.h : Defined Tuple for bundling rtx, mode and
> > unsignedness default as 0
> > Added Extra argument (unsignedp) in emit_library_call and
> > emit_library_call_value.
> > * except.c : Likewise.
> > * explow.c : Likewise.
> > * expmed.c : Likewise.
> > * expr.c : Likewise.
> > * optabs.c : Likewise.
> > * asan.c : Likewise.
> > * builtins.c : Likewise.
> > * calls.c : Likewise.
> > * cfgexpand.c : Likewise.
> > * config/aarch64/aarch64.c : Likewise.
> > * config/aarch64/aarch64.h : Likewise.
> > * config/aarch64/atomics.md : Likewise.
> > * config/alpha/alpha.c : Likewise.
> > * config/arc/arc.c : Likewise.
> > * config/arc/elf.h : Likewise.
> > * config/arc/linux.h : Likewise.
> > * config/arm/arm.c : Likewise.
> > * config/bfin/bfin.md : Likewise.
> > * config/c6x/c6x.c : Likewise.
> > * config/csky/csky.c : Likewise.
> > * config/frv/frv.c : Likewise.
> > * config/i386/i386-expand.c : Likewise.
> > * config/i386/i386.c : Likewise.
> > * config/ia64/ia64.c : Likewise.
> > * config/ia64/ia64.md : Likewise.
> > * config/m32r/m32r.c : Likewise.
> > * config/m68k/linux.h : Likewise.
> > * config/m68k/m68k.c : Likewise.
> > * config/microblaze/microblaze.c : Likewise.
> > * config/mips/mips.h : Likewise.
> > * config/mips/sdemtk.h : Likewise.
> > * config/nds32/nds32.h : Likewise.
> > * config/nios2/nios2.c : Likewise.
> > * config/or1k/or1k.c : Likewise.
> > * config/pa/pa.c : Likewise.
> > * config/pa/pa.md : Likewise.
> > * config/pru/pru.c : Likewise.
> > * config/riscv/riscv.h : Likewise.
> > * config/riscv/riscv.md : Likewise.
> > * config/rl78/rl78.c : Likewise.
> > * config/rs6000/rs6000-string.c : Likewise.
> > * config/rs6000/rs6000.c : Likewise.
> > * config/rs6000/rs6000.md : Likewise.
> > * config/rs6000/vsx.md : Likewise.
> > * config/sh/sh.c : Likewise.
> > * config/sparc/sparc.c : Likewise.
> > * config/tilegx/tilegx.c : Likewise.
> > * config/tilepro/tilepro.c : Likewise.
> > * config/visium/visium.c : Likewise.
> > * config/xtensa/xtensa.c : Likewise.
> > * testsuite/gcc.target/powerpc/pr88877.c : Newtest
> 

-- 
Richard Biener 
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)


Re: [PATCH][PPC64] [PR88877]

2020-04-06 Thread kamlesh kumar via Gcc-patches
Segher,
Please provide your suggestion/thought on the fix.

On Mon, Mar 23, 2020 at 8:16 PM kamlesh kumar  wrote:
>
> Attached patch fixes.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877.
> ChangeLog Entry.
>
> 2020-03-23  Kamlesh Kumar  
>
> * rtl.h : Defined Tuple for bundling rtx, mode and
> unsignedness default as 0
> Added Extra argument (unsignedp) in emit_library_call and
> emit_library_call_value.
> * except.c : Likewise.
> * explow.c : Likewise.
> * expmed.c : Likewise.
> * expr.c : Likewise.
> * optabs.c : Likewise.
> * asan.c : Likewise.
> * builtins.c : Likewise.
> * calls.c : Likewise.
> * cfgexpand.c : Likewise.
> * config/aarch64/aarch64.c : Likewise.
> * config/aarch64/aarch64.h : Likewise.
> * config/aarch64/atomics.md : Likewise.
> * config/alpha/alpha.c : Likewise.
> * config/arc/arc.c : Likewise.
> * config/arc/elf.h : Likewise.
> * config/arc/linux.h : Likewise.
> * config/arm/arm.c : Likewise.
> * config/bfin/bfin.md : Likewise.
> * config/c6x/c6x.c : Likewise.
> * config/csky/csky.c : Likewise.
> * config/frv/frv.c : Likewise.
> * config/i386/i386-expand.c : Likewise.
> * config/i386/i386.c : Likewise.
> * config/ia64/ia64.c : Likewise.
> * config/ia64/ia64.md : Likewise.
> * config/m32r/m32r.c : Likewise.
> * config/m68k/linux.h : Likewise.
> * config/m68k/m68k.c : Likewise.
> * config/microblaze/microblaze.c : Likewise.
> * config/mips/mips.h : Likewise.
> * config/mips/sdemtk.h : Likewise.
> * config/nds32/nds32.h : Likewise.
> * config/nios2/nios2.c : Likewise.
> * config/or1k/or1k.c : Likewise.
> * config/pa/pa.c : Likewise.
> * config/pa/pa.md : Likewise.
> * config/pru/pru.c : Likewise.
> * config/riscv/riscv.h : Likewise.
> * config/riscv/riscv.md : Likewise.
> * config/rl78/rl78.c : Likewise.
> * config/rs6000/rs6000-string.c : Likewise.
> * config/rs6000/rs6000.c : Likewise.
> * config/rs6000/rs6000.md : Likewise.
> * config/rs6000/vsx.md : Likewise.
> * config/sh/sh.c : Likewise.
> * config/sparc/sparc.c : Likewise.
> * config/tilegx/tilegx.c : Likewise.
> * config/tilepro/tilepro.c : Likewise.
> * config/visium/visium.c : Likewise.
> * config/xtensa/xtensa.c : Likewise.
> * testsuite/gcc.target/powerpc/pr88877.c : Newtest


Re: [PATCH][PPC64] [PR88877]

2020-03-24 Thread kamlesh kumar via Gcc-patches
Thanks Hans-Peter for reviewing.
Here is Formatted ChangeLog Entry.

2020-03-24  Kamlesh Kumar  

* rtl.h: Defined Tuple for bundling rtx, mode and unsignedness
(default as 0), Added Extra argument (unsignedp)
in emit_library_call and emit_library_call_value.
* except.c: Likewise.
* explow.c: Likewise.
* expmed.c: Likewise.
* expr.c: Likewise.
* optabs.c: Likewise.
* asan.c: Likewise.
* builtins.c: Likewise.
* calls.c: Likewise.
* cfgexpand.c: Likewise.
* config/aarch64/aarch64.c: Likewise.
* config/aarch64/aarch64.h: Likewise.
* config/aarch64/atomics.md: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arc/arc.c: Likewise.
* config/arc/elf.h: Likewise.
* config/arc/linux.h: Likewise.
* config/arm/arm.c: Likewise.
* config/bfin/bfin.md: Likewise.
* config/c6x/c6x.c: Likewise.
* config/csky/csky.c: Likewise.
* config/frv/frv.c: Likewise.
* config/i386/i386-expand.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/ia64/ia64.md: Likewise.
* config/m32r/m32r.c: Likewise.
* config/m68k/linux.h: Likewise.
* config/m68k/m68k.c: Likewise.
* config/microblaze/microblaze.c: Likewise.
* config/mips/mips.h: Likewise.
* config/mips/sdemtk.h: Likewise.
* config/nds32/nds32.h: Likewise.
* config/nios2/nios2.c: Likewise.
* config/or1k/or1k.c: Likewise.
* config/pa/pa.c: Likewise.
* config/pa/pa.md: Likewise.
* config/pru/pru.c: Likewise.
* config/riscv/riscv.h: Likewise.
* config/riscv/riscv.md: Likewise.
* config/rl78/rl78.c: Likewise.
* config/rs6000/rs6000-string.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rs6000/rs6000.md: Likewise.
* config/rs6000/vsx.md: Likewise.
* config/sh/sh.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/tilegx/tilegx.c: Likewise.
* config/tilepro/tilepro.c: Likewise.
* config/visium/visium.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* testsuite/gcc.target/powerpc/pr88877.c: Newtest

./kamlesh


On Tue, Mar 24, 2020 at 10:54 PM Hans-Peter Nilsson  wrote:
>
>
> On Tue, 24 Mar 2020, Hans-Peter Nilsson wrote:
> > The new argument is default 0, so make use of that: do not patch
> > all those files where 0 is fine.
>
> Oops, I was tricked by the comment; it's not actually "default 0"
> in the C++ sense.  And you have an overloaded function with
> different numbers of parameters; I don't know if you can get
> away cheaper than all those files you patched.  Sorry for the
> noise in that part; the ChangeLog formatting comment still
> applies.
>
> brgds, H-P


Re: [PATCH][PPC64] [PR88877]

2020-03-24 Thread Hans-Peter Nilsson


On Tue, 24 Mar 2020, Hans-Peter Nilsson wrote:
> The new argument is default 0, so make use of that: do not patch
> all those files where 0 is fine.

Oops, I was tricked by the comment; it's not actually "default 0"
in the C++ sense.  And you have an overloaded function with
different numbers of parameters; I don't know if you can get
away cheaper than all those files you patched.  Sorry for the
noise in that part; the ChangeLog formatting comment still
applies.

brgds, H-P


Re: [PATCH][PPC64] [PR88877]

2020-03-24 Thread Hans-Peter Nilsson
Please excuse some cheap points:

On Mon, 23 Mar 2020, kamlesh kumar via Gcc-patches wrote:

> Attached patch fixes.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877.
> ChangeLog Entry.
>
> 2020-03-23  Kamlesh Kumar  
>
> * rtl.h : Defined Tuple for bundling rtx, mode and
> unsignedness default as 0
> Added Extra argument (unsignedp) in emit_library_call and
> emit_library_call_value.

Formatting issue: "." ends sentences, but you should not
terminate the line.  No space before ":".  See other entries.

> * except.c : Likewise.
> * explow.c : Likewise.
> * expmed.c : Likewise.
> * expr.c : Likewise.
> * optabs.c : Likewise.
> * asan.c : Likewise.
> * builtins.c : Likewise.
> * calls.c : Likewise.
> * cfgexpand.c : Likewise.
> * config/aarch64/aarch64.c : Likewise.
> * config/aarch64/aarch64.h : Likewise.
> * config/aarch64/atomics.md : Likewise.
> * config/alpha/alpha.c : Likewise.
> * config/arc/arc.c : Likewise.

...

The new argument is default 0, so make use of that: do not patch
all those files where 0 is fine.

brgds, H-P


[PATCH][PPC64] [PR88877]

2020-03-23 Thread kamlesh kumar via Gcc-patches
Attached patch fixes.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877.
ChangeLog Entry.

2020-03-23  Kamlesh Kumar  

* rtl.h : Defined Tuple for bundling rtx, mode and
unsignedness default as 0
Added Extra argument (unsignedp) in emit_library_call and
emit_library_call_value.
* except.c : Likewise.
* explow.c : Likewise.
* expmed.c : Likewise.
* expr.c : Likewise.
* optabs.c : Likewise.
* asan.c : Likewise.
* builtins.c : Likewise.
* calls.c : Likewise.
* cfgexpand.c : Likewise.
* config/aarch64/aarch64.c : Likewise.
* config/aarch64/aarch64.h : Likewise.
* config/aarch64/atomics.md : Likewise.
* config/alpha/alpha.c : Likewise.
* config/arc/arc.c : Likewise.
* config/arc/elf.h : Likewise.
* config/arc/linux.h : Likewise.
* config/arm/arm.c : Likewise.
* config/bfin/bfin.md : Likewise.
* config/c6x/c6x.c : Likewise.
* config/csky/csky.c : Likewise.
* config/frv/frv.c : Likewise.
* config/i386/i386-expand.c : Likewise.
* config/i386/i386.c : Likewise.
* config/ia64/ia64.c : Likewise.
* config/ia64/ia64.md : Likewise.
* config/m32r/m32r.c : Likewise.
* config/m68k/linux.h : Likewise.
* config/m68k/m68k.c : Likewise.
* config/microblaze/microblaze.c : Likewise.
* config/mips/mips.h : Likewise.
* config/mips/sdemtk.h : Likewise.
* config/nds32/nds32.h : Likewise.
* config/nios2/nios2.c : Likewise.
* config/or1k/or1k.c : Likewise.
* config/pa/pa.c : Likewise.
* config/pa/pa.md : Likewise.
* config/pru/pru.c : Likewise.
* config/riscv/riscv.h : Likewise.
* config/riscv/riscv.md : Likewise.
* config/rl78/rl78.c : Likewise.
* config/rs6000/rs6000-string.c : Likewise.
* config/rs6000/rs6000.c : Likewise.
* config/rs6000/rs6000.md : Likewise.
* config/rs6000/vsx.md : Likewise.
* config/sh/sh.c : Likewise.
* config/sparc/sparc.c : Likewise.
* config/tilegx/tilegx.c : Likewise.
* config/tilepro/tilepro.c : Likewise.
* config/visium/visium.c : Likewise.
* config/xtensa/xtensa.c : Likewise.
* testsuite/gcc.target/powerpc/pr88877.c : Newtest
diff --git a/gcc/asan.c b/gcc/asan.c
index cc8f9122e3d..ec4d6bdc161 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1488,7 +1488,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
   ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode,
  GEN_INT (asan_frame_size
 	  + base_align_bias),
- TYPE_MODE (pointer_sized_int_node));
+ TYPE_MODE (pointer_sized_int_node), 0);
   /* __asan_stack_malloc_[n] returns a pointer to fake stack if succeeded
 	 and NULL otherwise.  Check RET value is NULL here and jump over the
 	 BASE reassignment in this case.  Otherwise, reassign BASE to RET.  */
@@ -1615,7 +1615,7 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
 	  emit_library_call (ret, LCT_NORMAL, ptr_mode, addr, ptr_mode,
 			 GEN_INT (asan_frame_size + base_align_bias),
 			 TYPE_MODE (pointer_sized_int_node),
-			 orig_addr, ptr_mode);
+			 orig_addr, ptr_mode, 0);
 	}
   lab = gen_label_rtx ();
   emit_jump (lab);
@@ -1715,7 +1715,7 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn *before)
   top = convert_memory_address (ptr_mode, top);
   bot = convert_memory_address (ptr_mode, bot);
   emit_library_call (ret, LCT_NORMAL, ptr_mode,
-		 top, ptr_mode, bot, ptr_mode);
+		 top, ptr_mode, bot, ptr_mode, 0);
 
   do_pending_stack_adjust ();
   rtx_insn *insns = get_insns ();
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 53bae599d3e..99fa50bd515 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -2979,7 +2979,7 @@ expand_builtin_powi (tree exp, rtx target)
 
   target = emit_library_call_value (optab_libfunc (powi_optab, mode),
 target, LCT_CONST, mode,
-op0, mode, op1, mode2);
+op0, mode, op1, mode2, 0);
 
   return target;
 }
@@ -5858,7 +5858,7 @@ expand_asan_emit_allocas_unpoison (tree exp)
 			 OPTAB_LIB_WIDEN);
   rtx ret = init_one_libfunc ("__asan_allocas_unpoison");
   ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode,
- top, ptr_mode, bot, ptr_mode);
+ top, ptr_mode, bot, ptr_mode, 0);
   return ret;
 }
 
diff --git a/gcc/calls.c b/gcc/calls.c
index 4c3a8f3c215..20324ff6f04 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -5247,7 +5247,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
 {
   rtx val = args[i].first;
   function_arg_info arg (args[i].second, /*named=*/true);
-  int unsigned_p = 0;
+  int unsigned_p = GET_THIRD(args[i]);
 
   /* We cannot convert the arg value to the mode the library wants here;
 	 must do it earlier