Re: [rs6000] Fix PR 50906, eh_frame and other woes

2011-12-05 Thread Alan Modra
Ping http://gcc.gnu.org/ml/gcc-patches/2011-11/msg00543.html -- Alan Modra Australia Development Lab, IBM

Re: PR libgomp/51376 fix

2011-12-08 Thread Alan Modra
On Fri, Dec 02, 2011 at 08:10:11PM +1030, Alan Modra wrote: > PR libgomp/51376 > * task.c (GOMP_taskwait): Don't access task->children outside of > task_lock mutex region. > (GOMP_task): Likewise. Committed revision 182151 on rth's irc OK.

FIX PR51926, libstdc++ iterator store bigendian bitfield related

2012-01-20 Thread Alan Modra
return false; -- Alan Modra Australia Development Lab, IBM

Re: Bug store_bit_field_1 + patch

2012-01-20 Thread Alan Modra
bitsize instead of the number of words needed by the integer mode of the > field, which is the mode used to compute subwords. That doesn't sound right. wordnum is passed to operand_subword as its "offset" param, which counts in words of word_mode size. I think you have a p

Re: FIX PR51926, libstdc++ iterator store bigendian bitfield related

2012-01-23 Thread Alan Modra
On Sat, Jan 21, 2012 at 11:07:10AM +1030, Alan Modra wrote: > PR middle-end/51926 > * expmed.c (store_bit_field_1): Properly handle last word of > BLKmode value when bigendian. Blah, I was working on an old tree. The bug is already fixed. -- Alan Modra Australia De

Re: [PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-23 Thread Alan Modra
&& rtx_equal_p (XEXP (x, 1), - XEXP (XEXP (XEXP (XEXP (x, 0), 0), 1), 0) -- Alan Modra Australia Development Lab, IBM

Re: [PATCH] Fix up ppc64-linux profiledbootstrap - .toc section references in .debug_loc (PR target/51957)

2012-01-24 Thread Alan Modra
you take a look you'll see that location list is quite bogus anyway. At least it looks that way to me.. -- Alan Modra Australia Development Lab, IBM

Re: [build] Cleanup rs6000/t-ppccomm configurations (PR other/51022)

2012-01-24 Thread Alan Modra
(working copy) @@ -1,3 +1,3 @@ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver -HOST_LIBGCC2_CFLAGS += -mlong-double-128 +HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc -- Alan Modra Australia Development Lab, IBM

[RS6000] Fix PR52107, TFmode constant load.

2012-02-03 Thread Alan Modra
rs6000_emit_move (simplify_gen_subreg (DFmode, operands[0], mode, +GET_MODE_SIZE (DFmode)), + simplify_gen_subreg (DFmode, operands[1], mode, +GET_MODE_SIZE (DFmode)), + DFmode); return; } -- Alan Modra Australia Development Lab, IBM

Re: RFC/RFA: MN10300: Fix handling of protected functions in shared libraries.

2011-05-25 Thread Alan Modra
locally. */ + symbols be treated as dynamic symbols. If the address of a + function not defined in an executable is set to that function's + plt entry in the executable, then the address of the function in + a shared library must also be the plt entry in the executable. */ return local_protected; } -- Alan Modra Australia Development Lab, IBM

powerpc64 large-toc vs. reload

2011-06-19 Thread Alan Modra
t (match_operand:TLSmode 0 "gpc_reg_operand" "=b") - (plus:TLSmode (match_operand:TLSmode 1 "gpc_reg_operand" "b") - (high:TLSmode -(unspec:TLSmode [(match_operand:TLSmode 2 "rs6000_tls_symbol_ref" "")] -

Re: powerpc64 large-toc vs. reload

2011-06-20 Thread Alan Modra
On Sun, Jun 19, 2011 at 11:04:12PM -0400, David Edelsohn wrote: > On Sun, Jun 19, 2011 at 10:03 AM, Alan Modra wrote: > >* config/rs6000/rs6000.c (create_TOC_reference): Wrap high part > >of toc-relative address in CONST. > >(rs6000_delegitimize_addres

fix powerpc bootstrap failure

2011-06-22 Thread Alan Modra
nterest (tree fndecl) /* Interesting functions that we are emitting in this object file. */ c_node = cgraph_get_node (fndecl); + c_node = cgraph_function_or_thunk_node (c_node, NULL); return !cgraph_only_called_directly_p (c_node); } return false; -- Alan Modra Australia Development Lab, IBM

Re: PATCH [6/n]: Prepare x32: PR rtl-optimization/47449: Don't propagate hard register non-local goto save area

2011-07-04 Thread Alan Modra
rop did look at paradoxical subregs of hard regs before my change. > Alan, > is your change to process hard registers intentional? I didn't set out to do anything special with hard regs one way or the other, just extended what was already done for paradoxical subregs to sign and zero e

Re: PATCH [6/n]: Prepare x32: PR rtl-optimization/47449: Don't propagate hard register non-local goto save area

2011-07-04 Thread Alan Modra
On Mon, Jul 04, 2011 at 05:09:28PM -0700, H.J. Lu wrote: > On Mon, Jul 4, 2011 at 4:54 PM, Alan Modra wrote: > > I didn't set out to do anything special with hard regs one way or the > > other, just extended what was already done for paradoxical subregs to > > sign

[RS6000] asynch exceptions and unwind info

2011-07-26 Thread Alan Modra
just +before the bctrl. */ + _Unwind_SetGRPtr (context, 2, context->cfa + 40); + } + else + { + unsigned int *insn + = (unsigned int *) _Unwind_GetGR (context, R_LR); + if (insn && *insn == 0xE8410028) + _Unwind_SetGRPtr (context, 2, context->cfa + 40); + } } #endif } -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] asynch exceptions and unwind info

2011-07-28 Thread Alan Modra
On Wed, Jul 27, 2011 at 03:00:45PM +0930, Alan Modra wrote: > Ideally what I'd like to > do is have ld and gcc emit accurate r2 tracking unwind info and > dispense with hacks like frob_update_context. If ld did emit accurate > unwind info for .glink, then the justification for fr

Re: [RS6000] asynch exceptions and unwind info

2011-07-28 Thread Alan Modra
On Thu, Jul 28, 2011 at 11:49:16AM -0700, Richard Henderson wrote: > On 07/28/2011 12:27 AM, Alan Modra wrote: > > On Wed, Jul 27, 2011 at 03:00:45PM +0930, Alan Modra wrote: > >> Ideally what I'd like to > >> do is have ld and gcc emit accurate r2 tracking unwind i

Re: [RS6000] asynch exceptions and unwind info

2011-07-28 Thread Alan Modra
copies of "r2_prog" for functions that have a lot of calls, since the offset is limited to +/-32k. I think that would inflate the size of .eh_frame too much, and slow down handling of exceptions dramatically. -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] asynch exceptions and unwind info

2011-07-29 Thread Alan Modra
On Fri, Jul 29, 2011 at 10:57:48AM +0930, Alan Modra wrote: > Except that any info about r2 in an indirect call sequence really > belongs to the *called* function frame, not the callee. I woke up > this morning with the realization that what I'd done in > frob_update_context

Re: [RS6000] asynch exceptions and unwind info

2011-07-29 Thread Alan Modra
we need is info about the previous r2, so we can restore when unwinding. I made a similar mistake in frob_update_context in that the value saved by an indirect function call sequence is the r2 for the current function. I also restored from the wrong location. -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] asynch exceptions and unwind info

2011-08-01 Thread Alan Modra
On Fri, Jul 29, 2011 at 10:28:28PM +0930, Alan Modra wrote: > libgcc/ > * config/rs6000/linux-unwind.h (frob_update_context <__powerpc64__>): > Restore for indirect call bcrtl from correct stack slot, and only > if cfa+40 isn't valid. > gcc/ >

[RS6000] Fix ICE in reg_save

2011-08-01 Thread Alan Modra
rking copy) @@ -20505,6 +20505,7 @@ rs6000_emit_prologue (void) rs6000_emit_load_toc_table (TRUE); insn = emit_move_insn (lr, frame_ptr_rtx); + add_reg_note (insn, REG_CFA_RESTORE, lr); RTX_FRAME_RELATED_P (insn) = 1; } else -- Alan Modra Australia D

Re: [PATCH, rs6000 committed] Fix PowerPC bootstrap

2011-04-12 Thread Alan Modra
ctions that we are emitting in this object file. */ > - c_node = cgraph_node (fndecl); > + c_node = cgraph_get_create_node (fndecl); >return !cgraph_only_called_directly_p (c_node); > } >return false; I think we should use cgraph_get_node here. -- Alan Modra Australia Development Lab, IBM

Re: Allow more PowerPC sibling calls

2011-04-21 Thread Alan Modra
On Mon, Apr 18, 2011 at 10:29:17AM -0700, Nathan Froyd wrote: > Could I request that you use FOREACH_FUNCTION_ARGS in these two cases? > The conversion is trivial, and avoiding more exposed TYPE_ARG_TYPES > calls is a good thing. Committed revision 172855. -- Alan Modra Australia De

Re: Allow more PowerPC sibling calls

2011-04-21 Thread Alan Modra
On Fri, Apr 22, 2011 at 01:29:14PM +0930, Alan Modra wrote: > On Mon, Apr 18, 2011 at 10:29:17AM -0700, Nathan Froyd wrote: > > Could I request that you use FOREACH_FUNCTION_ARGS in these two cases? > > The conversion is trivial, and avoiding more exposed TYPE_ARG_TYPES > >

PowerPC64 non-delegitimized UNSPEC_TOCREL

2011-04-28 Thread Alan Modra
_CODE (orig_x) == LO_SUM - && GET_CODE (XEXP (x, 1)) == CONST) + && GET_CODE (XEXP (orig_x, 1)) == CONST) { - y = XEXP (XEXP (x, 1), 0); + y = XEXP (XEXP (orig_x, 1), 0); if (GET_CODE (y) == UNSPEC && XINT (y, 1) == UNSPEC_MACHOPIC_OFFSET) return XVECEXP (y, 0, 0); -- Alan Modra Australia Development Lab, IBM

Re: PowerPC64 non-delegitimized UNSPEC_TOCREL

2011-04-28 Thread Alan Modra
On Thu, Apr 28, 2011 at 01:58:24PM -0400, David Edelsohn wrote: > On Thu, Apr 28, 2011 at 11:22 AM, Alan Modra wrote: > > * config/rs6000/rs6000.c (rs6000_delegitimize_address): Handle > > unspec plus offset. Tidy macho code. > > Looks good. Committed mainline revisio

Re: rs6000_handle_option global state avoidance, part 1

2011-05-05 Thread Alan Modra
On Thu, May 05, 2011 at 11:29:13AM -0400, David Edelsohn wrote: > Alan, is mcmodel suppose to set m64? No, that was an accident. -- Alan Modra Australia Development Lab, IBM

Fix PR48900, powerpc duplicate __tls_get_addr calls

2011-05-05 Thread Alan Modra
insn = gen_tls_ld_aix64 (r3, got, tga, const0_rtx); else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT) -- Alan Modra Australia Development Lab, IBM

PowerPC testsuite tweak

2011-05-10 Thread Alan Modra
{ dg-require-effective-target vsx_hw } */ /* { dg-options "-O3 -mcpu=power7" } */ /* PR 47755: Make sure compiler generates correct code for various -- Alan Modra Australia Development Lab, IBM

build_function_call and TREE_ADDRESSABLE

2011-03-03 Thread Alan Modra
else + function = function_to_pointer_conversion (loc, function); +} /* For Objective-C, convert any calls via a cast to OBJC_TYPE_REF expressions, like those used for ObjC messenger dispatches. */ -- Alan Modra Australia Development Lab, IBM

Re: build_function_call and TREE_ADDRESSABLE

2011-03-03 Thread Alan Modra
On Thu, Mar 03, 2011 at 04:43:15PM +0100, Richard Guenther wrote: > On Thu, Mar 3, 2011 at 4:42 PM, Richard Guenther > wrote: > > On Thu, Mar 3, 2011 at 3:33 PM, Alan Modra wrote: > >> TREE_ADDRESSABLE comment says "In a FUNCTION_DECL, nonzero means its > >>

Re: PowerPC32 .gnu.attributes

2011-03-03 Thread Alan Modra
: (TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT) ? 3 + : 2)); + if (rs6000_passes_vector) + fprintf (asm_out_file, "\t.gnu_attribute 8, %d\n", +(TARGET_ALTIVEC_ABI ? 2 + : TARGET_SPE_ABI ? 3 + : 1)); + if (rs6000_returns_struct) + fprintf (asm_out_file, "\t.gnu_attribute 12, %d\n", +aix_struct_return ? 2 : 1); +} +#endif +#ifdef POWERPC_LINUX if (TARGET_32BIT) file_end_indicate_exec_stack (); +#endif } #endif -- Alan Modra Australia Development Lab, IBM

Re: build_function_call and TREE_ADDRESSABLE

2011-03-03 Thread Alan Modra
nodes, it means a goto for this label has been seen from a place outside all binding contours that restore stack levels. -- Alan Modra Australia Development Lab, IBM

Re: [ping] Re: [patch, powerpc] #undef LINK_EH_SPEC before defining it

2011-03-03 Thread Alan Modra
: warning: this is the location of > >the > >previous definition In mainline sources the two macro definitions are identical. Self- inflicted wound? -- Alan Modra Australia Development Lab, IBM

Re: [ping] Re: [patch, powerpc] #undef LINK_EH_SPEC before defining it

2011-03-04 Thread Alan Modra
and other macros before defining > them would be certainly cleaner if the freebsd-spec.h include can't be just > killed. It's there for -mcall-freebsd. Take that away and you won't need freebsd-spec.h in powerpc-linux configs. -- Alan Modra Australia Development Lab, IBM

Fix PowerPC64 non-delegitimized UNSPEC

2011-03-04 Thread Alan Modra
&& GET_CODE (XEXP (XEXP (x, 0), 1)) == HIGH + && rtx_equal_p (XEXP (x, 1), + XEXP (XEXP (XEXP (x, 0), 1), 0) { y = XVECEXP (y, 0, 0); if (!MEM_P (orig_x)) -- Alan Modra Australia Development Lab, IBM

Re: [ping] Re: [patch, powerpc] #undef LINK_EH_SPEC before defining it

2011-03-04 Thread Alan Modra
old dot-symbol function descriptors on powerpc64-linux. The eabi/noeabi options might also be useful, but I don't see the point of the ones that pretend to generate code for another OS. -- Alan Modra Australia Development Lab, IBM

Re: Harden rs6000 offsettable_ok_by_alignment

2011-03-06 Thread Alan Modra
ucts? No, I don't think there is anything special about the struct, just that it was aligned more that usual. -- Alan Modra Australia Development Lab, IBM

Fix pr48032, powerpc64 -mcmodel=medium invalid ld offset

2011-03-08 Thread Alan Modra
reg (rtx, enum machine_mode); extern void validate_condition_mode (enum rtx_code, enum machine_mode); -extern bool legitimate_constant_pool_address_p (const_rtx, bool); +extern bool legitimate_constant_pool_address_p (const_rtx, enum machine_mode, + bool); extern bool legitimate_indirect_address_p (rtx, int); extern bool legitimate_indexed_address_p (rtx, int); extern bool avoiding_indexed_address_p (enum machine_mode); -- Alan Modra Australia Development Lab, IBM

Re: Fix pr48032, powerpc64 -mcmodel=medium invalid ld offset

2011-03-14 Thread Alan Modra
&& ! toc_relative_expr_p (operands[1]) && (TARGET_CMODEL == CMODEL_SMALL || can_create_pseudo_p () @@ -16444,7 +16510,7 @@ print_operand_address (FILE *file, rtx x fprintf (file, ")(%s)", reg_names[ REGNO (XEXP (x, 0)) ]); } #endif - else if (legitimate_constant_pool_address_p (x, true)) + else if (legitimate_constant_pool_address_p (x, QImode, true)) { /* This hack along with a corresponding hack in rs6000_output_addr_const_extra arranges to output addends -- Alan Modra Australia Development Lab, IBM

Fix PR 45844, gfortran.dg/vect/pr45714-b.f ICE on power7

2011-03-15 Thread Alan Modra
(define_insn "vsx_splat_" [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wd,wd,wd,?wa,?wa,?wa") (vec_duplicate:VSX_D -(match_operand: 1 "input_operand" "ws,f,Z,wa,wa,Z")))] +(match_operand: 1 "splat_input_operand" "ws,f,Z,wa,wa,Z")))] "VECTOR_MEM_VSX_P (mode)" "@ xxpermdi %x0,%x1,%x1,0 -- Alan Modra Australia Development Lab, IBM

PowerPC64 reload failure with misaligned fp load

2011-03-25 Thread Alan Modra
uot;) + (match_operand 1 "memory_operand" "m") + (match_operand:DI 2 "register_operand" "=b")])] + "TARGET_POWERPC64" +{ + rs6000_secondary_reload_ppc64 (operands[0], operands[1], operands[2], false); + DONE; +}) + ; ld/std require word-aligned displacements -> 'Y' constraint. ; List Y->r and r->Y before r->r for reload. (define_insn "*movdf_hardfloat64_mfpgpr" -- Alan Modra Australia Development Lab, IBM

PR 47487 powerpc64 ICE building libgo

2011-03-25 Thread Alan Modra
_string, "GNU C") - || ! strcmp (language_string, "GNU GIMPLE")) + || ! strcmp (language_string, "GNU GIMPLE") + || ! strcmp (language_string, "GNU Go")) i = 0; else if (! strcmp (language_string, "GNU F77")

Re: PowerPC64 reload failure with misaligned fp load

2011-03-25 Thread Alan Modra
..)? Yes, in fact replace_equiv_address_nv is even better. (As witnessed by the use of that function in reload.c, reload1.c. We know validating the address is just a waste of time, as is calling update_temp_slot_address.) I'll bootstrap and regtest again with that change. -- Alan Modra Au

[PATCH] ICE on mainline bootstrap with powerpc64 -mcmodel={medium,large}

2011-03-31 Thread Alan Modra
/ + return mem_loc_descriptor (XEXP (rtl, 1), mode, initialized); case LABEL_REF: /* Some ports can transform a symbol ref into a label ref, because -- Alan Modra Australia Development Lab, IBM

Fix powerpc rs6000_stack_info ICE

2011-04-06 Thread Alan Modra
_save, &stack_info, sizeof stack_info) == 0); -#endif return info_ptr; } -- Alan Modra Australia Development Lab, IBM

PowerPC64 non-delegitimized unspecs

2011-04-06 Thread Alan Modra
al_p (XEXP (x, 1), - XEXP (XEXP (XEXP (x, 0), 1), 0) + && XINT (y, 1) == UNSPEC_TOCREL) { y = XVECEXP (y, 0, 0); if (!MEM_P (orig_x)) -- Alan Modra Australia Development Lab, IBM

Re: PowerPC64 non-delegitimized unspecs

2011-04-06 Thread Alan Modra
On Wed, Apr 06, 2011 at 02:45:49PM +0200, Jakub Jelinek wrote: > On Wed, Apr 06, 2011 at 10:06:11PM +0930, Alan Modra wrote: > > I've noticed a number of tests fail on mainline with complaints about > > non-delegitimized UNSPECs. The reason why rs6000_delegitimze_address >

Allow more PowerPC sibling calls

2011-04-08 Thread Alan Modra
(match_operand 2 "" ""))) - (use (match_operand:SI 3 "immediate_operand" "O,n")) - (use (reg:SI 65)) - (return)] - "(DEFAULT_ABI == ABI_DARWIN) - && (INTVAL (operands[3]) & CALL_LONG) == 0" - "* -{ - return \"b %z

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-24 Thread Alan Modra
#x27; of libtool into sync with > >> upstream libtool commit 22a7e547e9857fc94fe5bc7c921d9a4b49c09f8e. Looks OK to me, thanks. -- Alan Modra

Re: [RFC,patch] Linker plugin - extend API for offloading corner case (aka: LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [GCC PR109128])

2023-05-10 Thread Alan Modra via Gcc-patches
le to restore the state of symbols to what they would be without that object. (Yes, we do that sort of thing for as-needed shared libraries, but the restoration happens immediately after adding the symbols. I also regret implementing it the way I did.) The patch posted is OK from the linker side o

Re: [PATCH 3/8] [RS6000] rs6000_rtx_costs tidy AND

2021-01-21 Thread Alan Modra via Gcc-patches
Ping. On Tue, Jan 12, 2021 at 02:01:57PM +1030, Alan Modra wrote: > Ping > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555754.html > > On Thu, Oct 08, 2020 at 09:27:55AM +1030, Alan Modra wrote: > > * config/rs6000/rs6000.c (rs6000_rtx_costs): Tidy AND code. &

Re: [PATCH 4/8] [RS6000] rs6000_rtx_costs tidy break/return

2021-01-21 Thread Alan Modra via Gcc-patches
Ping. On Tue, Jan 12, 2021 at 02:02:09PM +1030, Alan Modra wrote: > Ping > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555755.html > > On Thu, Oct 08, 2020 at 09:27:56AM +1030, Alan Modra wrote: > > Most cases use "return false" rather than breaking out of

Re: [PATCH 5/8] [RS6000] rs6000_rtx_costs cost IOR

2021-01-21 Thread Alan Modra via Gcc-patches
Ping. On Tue, Jan 12, 2021 at 02:02:18PM +1030, Alan Modra wrote: > Ping > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555756.html > > On Thu, Oct 08, 2020 at 09:27:57AM +1030, Alan Modra wrote: > > * config/rs6000/rs6000.c (rotate_insert_c

Re: [PATCH 7/8] [RS6000] rs6000_rtx_costs reduce cost for SETs

2021-01-21 Thread Alan Modra via Gcc-patches
Ping. On Tue, Jan 12, 2021 at 02:02:27PM +1030, Alan Modra wrote: > Ping > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555758.html > > On Thu, Oct 08, 2020 at 09:27:59AM +1030, Alan Modra wrote: > > The aim of this patch is to make rtx_costs for SETs closer to >

Re: [PATCH 8/8] [RS6000] rs6000_rtx_costs for !speed

2021-01-21 Thread Alan Modra via Gcc-patches
Ping. On Tue, Jan 12, 2021 at 02:02:36PM +1030, Alan Modra wrote: > Ping > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555759.html > > On Thu, Oct 08, 2020 at 09:28:00AM +1030, Alan Modra wrote: > > When optimizing for size we shouldn't be using metrics bas

Re: [RS6000] Adjust testcases for power10 instructions V3

2021-01-21 Thread Alan Modra via Gcc-patches
Ping. On Tue, Jan 12, 2021 at 02:03:18PM +1030, Alan Modra wrote: > Ping > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557587.html > > On Fri, Oct 30, 2020 at 07:00:14PM +1030, Alan Modra wrote: > > And now waking up to what you meant by the lvsl-lvsr.c \s comment,

Re: [PATCH 3/8] [RS6000] rs6000_rtx_costs tidy AND

2021-01-31 Thread Alan Modra via Gcc-patches
onsistency I made the change in old code too. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 5/8] [RS6000] rs6000_rtx_costs cost IOR

2021-01-31 Thread Alan Modra via Gcc-patches
On Mon, Jan 25, 2021 at 04:51:43PM -0600, Segher Boessenkool wrote: > Hi! > > On Thu, Oct 08, 2020 at 09:27:57AM +1030, Alan Modra wrote: > > * config/rs6000/rs6000.c (rotate_insert_cost): New function. > > (rs6000_rtx_costs): Cost IOR. > > > > diff --g

Re: [PATCH, rs6000] Optimization for PowerPC 64bit constant generation [PR94395]

2021-02-02 Thread Alan Modra via Gcc-patches
;-mno-prefixed" { target { lp64 } } } */ in order to keep scan-assembler-times counts correct for power10. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 3/8] intl: always picify

2021-02-10 Thread Alan Modra via Gcc-patches
(COMPILE): Use it. > * configure: Regenerate. OK for binutils. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 4/8] intl: turn LIBINTL into -L / -l form

2021-02-10 Thread Alan Modra via Gcc-patches
On Mon, Feb 08, 2021 at 11:16:31AM +, Nick Alcock via Binutils wrote: > intl/ChangeLog > 2021-02-04 Nick Alcock > > * configure.ac (LIBINTL): Transform into -L/-lintl form. > * configure: Regenerate. OK for binutils. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH] Add -fgnu-retain/-fno-gnu-retain

2021-02-18 Thread Alan Modra via Gcc-patches
ollection. Surely you don't expect ".retain foo" to create a separate .data section for foo? If you do, I'm strongly against that idea. Note that gas indeed supports multiple sections named .data that can serve the same purpose as -fdata-sections. See the gas doc for the optional .section field "unique". That might be the best way to avoid an under-the-hood -ffunction-sections/-fdata-sections. -- Alan Modra Australia Development Lab, IBM

[RS6000] rtx_costs

2020-09-14 Thread Alan Modra via Gcc-patches
This patch series fixes a number of issues in rs6000_rtx_costs, the aim being to provide costing somewhat closer to reality. Probably the most important patch of the series is patch 4, which just adds a comment. Without the analysis that went into that comment, I found myself making what seemed t

[RS6000] Count rldimi constant insns

2020-09-14 Thread Alan Modra via Gcc-patches
rldimi is generated by rs6000_emit_set_long_const when the high and low 32 bits of a 64-bit constant are equal. * config/rs6000/rs6000.c (num_insns_constant_gpr): Count rldimi constants correctly. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 20a4ba382

[RS6000] rs6000_rtx_costs cost IOR

2020-09-14 Thread Alan Modra via Gcc-patches
* config/rs6000/rs6000.c (rs6000_rtx_costs): Cost IOR. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8c300b82b11..fb5fe7969a3 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -21177,6 +21177,7 @@ static bool rs6000_rtx_costs (rtx x,

[RS6000] rotate and mask constants

2020-09-14 Thread Alan Modra via Gcc-patches
Implement more two insn constants. PR 94393 * config/rs6000/rs6000.c (rotate_and_mask_constant): New function. (num_insns_constant_multi, rs6000_emit_set_long_const): Use it here. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 86c90c4d756..1848c

[RS6000] rs6000_rtx_costs for AND

2020-09-14 Thread Alan Modra via Gcc-patches
The existing "case AND" in this function is not sufficient for optabs.c:avoid_expensive_constant usage, where the AND is passed in outer_code. * config/rs6000/rs6000.c (rs6000_rtx_costs): Move costing for AND to CONST_INT case. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/

[RS6000] rs6000_rtx_costs multi-insn constants

2020-09-14 Thread Alan Modra via Gcc-patches
This small patch to rs6000_rtx_const considerably improves code generated for large constants in 64-bit code, teaching gcc that it is better to load a constant from memory than to generate a sequence of up to five dependent instructions. Note that the rs6000 backend does generate large constants a

[RS6000] rs6000_rtx_costs comment

2020-09-14 Thread Alan Modra via Gcc-patches
Prior patches in this series were small bug fixes. This lays out the ground rules for following patches. * config/rs6000/rs6000.c (rs6000_rtx_costs): Expand comment. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 523d029800a..5b3c0ee0e8c 100644 --- a/gcc/confi

[RS6000] rs6000_rtx_costs reduce cost for SETs

2020-09-14 Thread Alan Modra via Gcc-patches
Also use rs6000_cost only for speed. * config/rs6000/rs6000.c (rs6000_rtx_costs): Reduce cost for SETs when insn operation cost handled on recursive call. Only use rs6000_cost for speed. Tidy break/return. Tidy AND costing. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/

[RS6000] rs6000_rtx_costs for PLUS/MINUS constant

2020-09-14 Thread Alan Modra via Gcc-patches
These functions do behave a little differently for SImode, so the mode should be passed. * config/rs6000/rs6000.c (rs6000_rtx_costs): Pass mode to reg_or_add_cint_operand and reg_or_sub_cint_operand. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6fc86f

Re: [PATCH] rs6000: inefficient 64-bit constant generation for consecutive 1-bits

2020-09-14 Thread Alan Modra via Gcc-patches
be two valid possibilities for test3 and test5 that don't use rldic. Ideally the test would verify the actual values generated by the test functions and count instructions. And having said that I probably ought to post such a testcase for https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553927.html I'm sure I had one lying around somewhere... -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] rotate and mask constants

2020-09-15 Thread Alan Modra via Gcc-patches
On Tue, Sep 15, 2020 at 10:49:46AM +0930, Alan Modra wrote: > Implement more two insn constants. And tests. rot_cst1 checks the values generated, rot_cst2 checks instruction count. * gcc.target/powerpc/rot_cst.h, * gcc.target/powerpc/rot_cst1.c, * gcc.target/powe

Re: [RS6000] rs6000_rtx_costs for AND

2020-09-16 Thread Alan Modra via Gcc-patches
On Tue, Sep 15, 2020 at 01:15:34PM -0500, will schmidt wrote: > On Tue, 2020-09-15 at 10:49 +0930, Alan Modra via Gcc-patches wrote: > > The existing "case AND" in this function is not sufficient for > > optabs.c:avoid_expensive_constant usage, where the AND is

Re: [RS6000] rs6000_rtx_costs cost IOR

2020-09-16 Thread Alan Modra via Gcc-patches
On Wed, Sep 16, 2020 at 07:02:06PM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 15, 2020 at 10:49:44AM +0930, Alan Modra wrote: > > * config/rs6000/rs6000.c (rs6000_rtx_costs): Cost IOR. > > > case IOR: > > - /* FIXME */ > &

Re: [RS6000] rs6000_rtx_costs reduce cost for SETs

2020-09-17 Thread Alan Modra via Gcc-patches
On Thu, Sep 17, 2020 at 12:51:25PM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 15, 2020 at 10:49:45AM +0930, Alan Modra wrote: > > Also use rs6000_cost only for speed. > > More directly: use something completely different for !speed, namely, > code size. Y

Re: [RS6000] rs6000_rtx_costs reduce cost for SETs

2020-09-21 Thread Alan Modra via Gcc-patches
OSTS_N_INSNS (1)) + *total += set_cost - COSTS_N_INSNS (1); + return true; + } + default: break; } -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] rs6000_rtx_costs cost IOR

2020-09-21 Thread Alan Modra via Gcc-patches
On Mon, Sep 21, 2020 at 10:49:17AM -0500, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 17, 2020 at 01:12:19PM +0930, Alan Modra wrote: > > On Wed, Sep 16, 2020 at 07:02:06PM -0500, Segher Boessenkool wrote: > > > > + /* Test both regs even th

PR97107, libgo fails to build for power10

2020-09-21 Thread Alan Modra via Gcc-patches
ail calls. Tail calls don't count against crtl->is_leaf. */ + for (insn = get_topmost_sequence ()->first; insn; insn = NEXT_INSN (insn)) + if (CALL_P (insn)) + break; + if (!insn) + return; + } if (global_regs[29]) { -- Alan Modra Australia Development Lab, IBM

[RS6000] Power10 libffi fixes

2020-09-21 Thread Alan Modra via Gcc-patches
x64@ha addi%r2, %r2, .TOC.-ffi_go_closure_linux64@l +# endif .localentry ffi_go_closure_linux64, . - ffi_go_closure_linux64 # else .section".opd","aw" -- Alan Modra Australia Development Lab, IBM

Re: PR97107, libgo fails to build for power10

2020-09-22 Thread Alan Modra via Gcc-patches
Hi Segher, On Tue, Sep 22, 2020 at 06:59:42PM -0500, Segher Boessenkool wrote: > On Tue, Sep 22, 2020 at 09:55:12AM +0930, Alan Modra wrote: > >if (!info->push_p) > > -return; > > +{ > > + /* We need the -fsplit-stack prologue for functions that m

Re: [RS6000] Power10 libffi fixes

2020-09-23 Thread Alan Modra via Gcc-patches
On Tue, Sep 22, 2020 at 07:16:57PM -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 22, 2020 at 10:00:11AM +0930, Alan Modra wrote: > > gcc/ > > * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): > > Conditionally define __PCREL__. > > Plea

Re: PR97107, libgo fails to build for power10

2020-09-23 Thread Alan Modra via Gcc-patches
ere, it is > much limited when we can be called here. Add a comment though? Pushed with a comment. Thanks! -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] Power10 libffi fixes

2020-09-23 Thread Alan Modra via Gcc-patches
On Thu, Sep 24, 2020 at 01:11:02PM +0930, Alan Modra wrote: > I've fixed the changelog, a comment, and added a nop after bl for the > old calls without @notoc. While there really isn't a need for the > nops in libffi.so since the callee is hidden visibility, there is a > m

Re: [PATCH] rs6000: Use parameterized names for tablejump

2020-09-29 Thread Alan Modra via Gcc-patches
t_jump_insn (gen_tablejump_insn_nospec (Pmode, addr, operands[1], operands[2])); DONE; }) -- Alan Modra Australia Development Lab, IBM

[RS6000] gcc/configure typo fix

2020-09-29 Thread Alan Modra via Gcc-patches
cpu is power7 or newer]) ;; esac ;; - xpowerpc64*-*-linux*:*) + powerpc64*-*-linux*:*) AC_MSG_ERROR([--with-long-double-format argument should be ibm or ieee]) with_long_double_format="" ;; -- Alan Modra Australia Development Lab, IBM

[RS6000] -mno-minimal-toc vs. power10 pcrelative

2020-09-30 Thread Alan Modra via Gcc-patches
ake into account targets for which -mcmodel is invalid. +HOST_LIBGCC2_CFLAGS += -mno-minimal-toc -- Alan Modra Australia Development Lab, IBM

[RS6000] Adjust gcc asm for power10

2020-09-30 Thread Alan Modra via Gcc-patches
LL_ELF == 2 .macro FUNC name .globl \name .type \name, @function -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] Adjust gcc asm for power10

2020-09-30 Thread Alan Modra via Gcc-patches
On Wed, Sep 30, 2020 at 05:36:08PM -0500, Segher Boessenkool wrote: > On Wed, Sep 30, 2020 at 05:06:57PM +0930, Alan Modra wrote: > > Generate assembly that is .localentry 1 with @notoc calls to match. > > What is the purpose of this? Non-obvious patchexs without any > explanat

Re: [RS6000] -mno-minimal-toc vs. power10 pcrelative

2020-10-01 Thread Alan Modra via Gcc-patches
On Wed, Sep 30, 2020 at 03:56:32PM -0500, Segher Boessenkool wrote: > On Wed, Sep 30, 2020 at 05:01:45PM +0930, Alan Modra wrote: > > * config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Don't > > set -mcmodel=small for -mno-minimal-toc when pcrel. > &

[RS6000] ICE in decompose, at rtl.h:2282

2020-10-01 Thread Alan Modra via Gcc-patches
(high_int)), 0); +gen_int_mode (high_int, Pmode)), 0); return plus_constant (Pmode, sum, low_int); } else if (GET_CODE (x) == PLUS -- Alan Modra Australia Development Lab, IBM

Re: [RS6000] -mno-minimal-toc vs. power10 pcrelative

2020-10-01 Thread Alan Modra via Gcc-patches
Hi Segher, On Thu, Oct 01, 2020 at 01:22:07PM -0500, Segher Boessenkool wrote: > Hi! > > On Thu, Oct 01, 2020 at 10:57:48PM +0930, Alan Modra wrote: > > On Wed, Sep 30, 2020 at 03:56:32PM -0500, Segher Boessenkool wrote: > > > On Wed, Sep 30, 2020 at 05:01:45PM

[PATCH] calls.c:can_implement_as_sibling_call_p REG_PARM_STACK_SPACE check

2020-10-02 Thread Alan Modra via Gcc-patches
_args (int j1, int j2, int j3, int j4, int j5, int j6, int j7, int j8) +{ + return j1 + j2 + j3 + j4 + j5 + j6 + j7 + j8; +} + +int __attribute__ ((__noclone__, __noinline__)) +stack_args (int j1, int j2, int j3, int j4, int j5, int j6, int j7, int j8, + int j9) +{ + if (j9 == 0) +return 0; + return reg_args (j1, j2, j3, j4, j5, j6, j7, j8); +} + +/* { dg-final { scan-assembler-not {(?n)^\s+bl\s} } } */ -- Alan Modra Australia Development Lab, IBM

Re: [PATCH] calls.c:can_implement_as_sibling_call_p REG_PARM_STACK_SPACE check

2020-10-02 Thread Alan Modra via Gcc-patches
On Fri, Oct 02, 2020 at 04:41:05PM +0930, Alan Modra wrote: > This moves an #ifdef block of code from calls.c to > targetm.function_ok_for_sibcall. Not only did I miss cc'ing the i386 maintainers, I missed seeing that the ATTRIBUTE_UNUSED reg_parm_stack_spa

Re: [PATCH] calls.c:can_implement_as_sibling_call_p REG_PARM_STACK_SPACE check

2020-10-04 Thread Alan Modra via Gcc-patches
Hi Segher, On Fri, Oct 02, 2020 at 01:50:24PM -0500, Segher Boessenkool wrote: > On Fri, Oct 02, 2020 at 04:41:05PM +0930, Alan Modra wrote: > > This moves an #ifdef block of code from calls.c to > > targetm.function_ok_for_sibcall. Only two targets, x86 and rs6

[PATCH 4/8] [RS6000] rs6000_rtx_costs tidy break/return

2020-10-07 Thread Alan Modra via Gcc-patches
Most cases use "return false" rather than breaking out of the switch. Do so in all cases. * config/rs6000/rs6000.c (rs6000_rtx_costs): Tidy break/return. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index bc5e51aa5ce..383d2901c9f 100644 --- a/gcc/config/rs6000/rs60

[PATCH 1/8] [RS6000] rs6000_rtx_costs comment

2020-10-07 Thread Alan Modra via Gcc-patches
This lays out the ground rules for following patches. * config/rs6000/rs6000.c (rs6000_rtx_costs): Expand comment. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b58eeae2b98..97180bb3819 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @

<    4   5   6   7   8   9   10   11   >