Re: [PATCH] Fix PR57451 (Incorrect debug ranges emitted for -freorder-blocks-and-partition -g)

2013-08-22 Thread Kaz Kojima
Steve Ellcey wrote: > On Mon, 2013-08-19 at 22:21 -0700, Teresa Johnson wrote: > >> 2013-08-19 Teresa Johnson >> >> PR rtl-optimizations/57451 >> * final.c (reemit_insn_block_notes): Prevent lexical blocks >> from crossing split section boundaries. >> >> * tes

Re: [PATCH, SH4] Fix PR58314 (unsatisfied constraints)

2013-09-12 Thread Kaz Kojima
Christian Bruel wrote: > The attached patch fixes an ice while building the linux kernel. Reduced > in the included testcase. > > The problem is that we are generating a movhi_reg_reg insn that accepts > only registers as operands. Spilling a pseudo on the stack results in an > invalid memory loa

Re: [PATCH, committed] SH: Fix PR58314 (unsatisfied constraints)

2013-09-18 Thread Kaz Kojima
Christian Bruel wrote: > && (!can_create_pseudo_p () && REG_P (operands[0]) && REG_P (operands[1]))" > > is necessary ? It looks an another hack to allow the 2nd and 3rd alternatives only when reloading. If so, it might be a bit cleaner to use a special predicate like ;; Returns 1 if OP can be

Re: [PATCH, SH4] Fix PR58475 insn swapb does not satisfy its constraints

2013-09-19 Thread Kaz Kojima
Christian Bruel wrote: > This patch fixes the aforementioned PR by refusing FPUL_REG to be an > acceptable reg for any arithmetic_operand on TARGET_SH4. (This was a > strange SH4 singularity with regards to the SH family). > > The only impacted insn is movsf_ie used for reg-fpreg transfers. So th

Re: [PATCH, SH4] Fix PR58475 insn swapb does not satisfy its constraints

2013-09-19 Thread Kaz Kojima
Christian Bruel wrote: > (define_insn "*mov_reg_reg" > - [(set (match_operand:QIHI 0 "arith_reg_dest" "=r,m,*z") > - (match_operand:QIHI 1 "register_operand" "r,*z,m"))] > - "TARGET_SH1 && !t_reg_operand (operands[1], VOIDmode)" > + [(set (match_operand:QIHI 0 "general_movdst_operand" "=r,

Re: [PATCH, SH4] Fix PR58475 insn swapb does not satisfy its constraints

2013-09-19 Thread Kaz Kojima
> Christian Bruel wrote: >> (define_insn "*mov_reg_reg" >> - [(set (match_operand:QIHI 0 "arith_reg_dest" "=r,m,*z") >> -(match_operand:QIHI 1 "register_operand" "r,*z,m"))] >> - "TARGET_SH1 && !t_reg_operand (operands[1], VOIDmode)" >> + [(set (match_operand:QIHI 0 "general_movdst_operand

Re: [SH] PR 50457 - Add additional atomic models

2012-09-30 Thread Kaz Kojima
Oleg Endo wrote: > This implements the changes as proposed PR, albeit with some small > differences: > --- gcc/config/sh/sh.c(revision 191865) > +++ gcc/config/sh/sh.c(working copy) [snip] > + std::vector tokens; > + for (std::stringstream ss (str); ss.good (); ) > + { > +t

Re: [SH] PR 50457 - Add additional atomic models

2012-09-30 Thread Kaz Kojima
Oleg Endo wrote: > The existing .c files are compiled as C++ already. There was a > discussion not long go whether the .c files should be renamed to .cc or > not. If I remember correctly, the conclusion was that existing .c files > remain .c, while files newly added should be .cc. gcc/double-in

Re: [SH] PR 50457 - Add additional atomic models

2012-09-30 Thread Kaz Kojima
Gabriel Dos Reis wrote: >> Ah, I've missed that argument. Then can we use STL classes in .c now? > > Yes. > > The existing file extensions ".c" do not mean "C" only. Thanks for clarification. Oleg, the patch is OK. Regards, kaz

Re: [SH] PR 51244 - Handle T bit -> 0x7FFFFFFF / 0x80000000

2012-10-02 Thread Kaz Kojima
Oleg Endo wrote: > This handles the case where the T bit is stored to a reg as the value > 0x7FFF or 0x8000. > Tested on rev 191894 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK? OK.

Re: [SH] PR 50457 - Cleanup linux-atomic

2012-10-02 Thread Kaz Kojima
Oleg Endo wrote: > This is the patch as proposed in the PR to make > libgcc/config/sh/linux-atomic use the appropriate compiler generated > atomic built-in functions depending on the currently selected > atomic-model. > > Tested on 191894 with 'make all-gcc' and by compiling code to see if the >

Re: [SH] PR 54760 - Add thread pointer built-ins and GBR displacement addressing

2012-10-03 Thread Kaz Kojima
Oleg Endo wrote: > This adds the two common built-in functions __builtin_thread_pointer and > __builtin_set_thread_pointer to the SH port. > I've done it in a way so that hopefully it can be transitioned to target > independent thread pointer built-ins easily, as suggested by Richard a > while ago

[patch committed SH] Fix sh64-elf build failure

2012-10-03 Thread Kaz Kojima
Hi, I've committed the patch below to fix sh64-elf build failure. SHmedia and SHcompact using call cookie require special return insns and will require an extra work to enable simple_return. I simply disable it for these targets ATM. Regards, kaz -- 2012-10-04 Kaz K

Re: [SH] PR 33135 - Remove mieee option in libgcc

2012-10-04 Thread Kaz Kojima
Oleg Endo wrote: > Since the -mieee behavior has been fixed, is enabled by default on SH > and the additional flags in libgcc can be removed. > > OK? OK. Regards, kaz

Re: [wwwdocs] SH 4.8 changes update

2012-10-05 Thread Kaz Kojima
Oleg Endo wrote: > The atomic options of SH have been changed recently. The attached patch > updates the 4.8 changes.html accordingly, plus some minor wording fixes. > > OK? OK. Regards, kaz

Re: [SH] PR 54760 - Add thread pointer built-ins and GBR displacement addressing

2012-10-05 Thread Kaz Kojima
Oleg Endo wrote: > Do you mean something like the attached patch as a preparation step? > (checked with 'make all') Yes. The patch is OK with removing the first line of the ChangeLog entry for PR number. Regards, kaz

Re: [SH] PR 54760 - Add thread pointer built-ins and GBR displacement addressing

2012-10-05 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch is the next step that adds the thread pointer > builtins. The GBR address mode stuff will follow afterwards separately. > Tested on rev 192142 with 'make all' and > 'make -k check-gcc RUNTESTFLAGS="sh.exp --target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4

Re: [SH] PR 54760 - Add thread pointer built-ins and GBR displacement addressing

2012-10-07 Thread Kaz Kojima
Oleg Endo wrote: > Attached patch adds the GBR addressing mode stuff. I've added the > '!NONJUMP_INSN_P (i)' check which should fix the crash. Could you > please test again? No new failures with the top level "make -k check" on cross sh4-unknown-linux-gnu. OK for trunk. Regards, kaz

Re: [SH] PR 54685 - unsigned int comparison with 0x7FFFFFFF

2012-10-07 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch improves comparisons such as > 'unsigned int <= 0x7FFF' on SH. > As mentioned in the PR, for some reason, those comparisons do not go > through the cstore expander. As a consequence the comparison doesn't > get the chance to be canonicalized by the target

Re: [SH] PR 54685 - unsigned int comparison with 0x7FFFFFFF

2012-10-07 Thread Kaz Kojima
Oleg Endo wrote: > I've just checked this against current trunk (rev 192193). The problem > seems to be gone. There's also a total decrease of 152 bytes on this > file without the patch. So it seems it was a different issue. The diff > is now: Thanks for looking into it quickly. The patch is

Re: [SH] PR 54760 - Document new thread pointer built-ins

2012-10-09 Thread Kaz Kojima
Oleg Endo wrote: > This adds documentation on the new thread pointer built-ins that were > added recently to the SH target. > Tested with 'make info dvi pdf'. > OK? OK. Regards, kaz

Re: [SH] PR 34777 - Add test case

2012-10-09 Thread Kaz Kojima
Oleg Endo wrote: > This adds the reduced test case as mentioned by Kaz in the PR to the > test suite. > Tested with > make -k check-gcc RUNTESTFLAGS="compile.exp=pr34777* > --target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > OK? It should be put into gcc.ta

Re: [wwwdocs] SH 4.8 changes - document thread pointer built-ins

2012-10-09 Thread Kaz Kojima
Oleg Endo wrote: > This documents the new thread pointer built-ins in the SH www changes > for 4.8. > OK? Looks OK to me. Regards, kaz

Re: [SH] PR 34777 - Add test case

2012-10-09 Thread Kaz Kojima
Oleg Endo wrote: > Uhm, yes, I forgot to add the -fschedule-insns and -mprefergot options. > Regarding the -Os option, I think it's better to test this one at > multiple optimization levels, just in case. I've looked through > gcc.c-torture/compile and found some target specific test cases there,

Re: [SH] PR 52480 - fix movua.l for big endian

2012-10-09 Thread Kaz Kojima
Oleg Endo wrote: > This is the same patch I posted in the PR. It seems to fix the issue. > Tested on rev 192200 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK? OK. Regards, kaz

Re: [SH] PR 51244 - Improve T bit store and cbranch

2012-10-11 Thread Kaz Kojima
Oleg Endo wrote: > This one further improves T bit stores and conditional branches on SH > for cases like described in comment #53 in the PR. > Tested on rev 192200 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no

Re: [PATCH 0/6] Thread pointer built-in functions / [SH] PR 54760

2012-10-11 Thread Kaz Kojima
Oleg Endo wrote: > Anyway, regardless of this failure, the attached patch for SH should be > applicable. OK? OK. Regards, kaz

Re: [SH] PR 54602

2012-10-12 Thread Kaz Kojima
Oleg Endo wrote: > This fixes the issue of PR 54602 as proposed in the PR. > Tested on rev 192200 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK? OK. Regards, kaz

Re: [SH] PR 54680

2012-10-12 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch fixes PR 54680. > Tested on rev 192200 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. > OK? OK. Regards, kaz

Re: [SH] Document function attributes

2012-10-15 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch adds documentation for SH specific function > attributes which haven't been documented yet. > Tested with 'make info dvi pdf'. > OK? OK. Regards, kaz

Re: [SH] PR 34777 - Add test case

2012-10-15 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch adds gcc.target/sh/torture and puts the test there. > The torture subdir might be also useful in the future. > Tested on rev 192417 with > make -k check-gcc RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml}" > > OK? OK. Regards, kaz

Re: [SH] PR 54760 - Add DImode GBR loads/stores, fix optimization

2012-10-15 Thread Kaz Kojima
Oleg Endo wrote: > I somehow initially forgot to implement DImode GBR based loads/stores. > Attached patch does that and also fixes a problem with the GBR address > mode optimization. > Tested on rev 192417 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-

Re: [SH] PR 51244 - Catch more unnecessary sign/zero extensions

2012-10-15 Thread Kaz Kojima
Oleg Endo wrote: > This one refactors some copy pasta that my previous patch regarding this > matter introduced and catches more unnecessary sign/zero extensions of T > bit stores. It also fixes the bug reported in PR 54925 which popped up > after the last patch for PR 51244. > Tested on rev 1924

Re: [SH] PR 54925 - Add test case

2012-10-15 Thread Kaz Kojima
Oleg Endo wrote: > This adds the test case from the PR. > Tested together with the patch posted here > http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01380.html > > OK? It would be better to make it a valid C program. I've checked that the test case with the change below also ICEs on revision 192

Re: [patch,libgcc] sh-rtems: Add sh*-*-elf*'s extra_parts.

2012-10-25 Thread Kaz Kojima
Ralf Corsepius wrote: > I would like to apply the patch below to trunk and gcc-4.7 branch. > GCC doesn't build for sh-rtems* without it. OK. Please go ahead. Regards, kaz

Re: [SH] PR 54988

2012-10-29 Thread Kaz Kojima
Oleg Endo wrote: > This fixes the issues of PR 54988. > Tested on rev 192482 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new failures. OK. Regards, kaz

Re: [SH] PR 51244 - Fix defects introduced in 4.8

2013-10-04 Thread Kaz Kojima
Oleg Endo wrote: > Some of the things I've done in 4.8 to improve SH T bit handling turned > out to produce wrong code. The attached patch fixes that by introducing > an SH specific RTL pass. > > Tested on rev 202876 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m

Re: [SH] PR 51244 - Fix defects introduced in 4.8

2013-10-06 Thread Kaz Kojima
Oleg Endo wrote: > Forgot to handle a case in function can_remove_cstore, thanks for > catching it. Fixed in the attached patch and also added test cases. > Retested as before without new failures. Ok for trunk. > Yeah, right. I've changed 'ifcvt_sh' to 'sh_ifcvt'. >+ register_pass (make_pas

Re: [SH] PR 51244 - Fix defects introduced in 4.8

2013-10-07 Thread Kaz Kojima
Oleg Endo wrote: > To be honest, I had some difficulty picking the name. > Maybe something like 'sh_tbit_combine' or 'sh_treg_combine' would be > better, or at least less confusing? Suggestions are highly appreciated. 'sh_treg_combine' or 'sh_combine_treg' sounds good to me. Regards, ka

Re: [PATCH, SH] Add support for inlined builtin-strcmp (1/2)

2013-10-18 Thread Kaz Kojima
Christian Bruel wrote: > This patch just reorganizes the SH code used for memory builtins into > its own file, in preparation of the RTL strcmp hoisting in the next part. > > OK for trunk ? A minor nit: > * gcc/config/sh/sh-mem (expand_block_move): Moved here. lost .c? Ok with that chan

Re: [PATCH, SH] Add support for inlined builtin-strcmp (2/2)

2013-10-20 Thread Kaz Kojima
Christian Bruel wrote: > thanks for having retested this, The tests are still not complete for > RTL generated functions, there are cases where no str/cmp wil be > emitted, because we can predict than the size is less than 4 and so have > a direct fallthru into the byte at a byte loop copying. >

Re: [SH] PR 52483 - Fix volatile mem stores

2013-10-24 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch fixes volatile mem stores on SH so that they won't > result in redundant sign/zero extensions and will utilize available > addressing modes. This is similar to what has been done to fix memory > loads in http://gcc.gnu.org/ml/gcc-patches/2013-06/msg01315.html

Re: [PATCH, SH] Add support for inlined builtin_strncmp

2013-10-25 Thread Kaz Kojima
Christian Bruel wrote: > No regressions for -m2 and -m4 for sh-elf. > OK for trunk ? OK with the change of ChangeLog entry suggested by your another mail. Thanks! Regards, kaz

Re: [SH] Cleanup endianness macros

2013-10-27 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch adds a new macro TARGET_BIG_ENDIAN. I think it's a > bit easier to read than !TARGET_LITTLE_ENDIAN. Moreover, some not so > obvious looking uses of TARGET_LITTLE_ENDIAN for selecting MSW and LSW > register offsets are clarified by using new macros SH_REG_MSW

Re: [SH] PR 54236 - add some more addc patterns

2013-10-28 Thread Kaz Kojima
Oleg Endo wrote: > This adds some more patterns to utilize the SH addc instruction. > Tested on rev 204111 with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4-single/-ml,-m4/-mb,-m4-single/-mb}" > > and no new failures. > OK for trunk? Using same "*a

Re: [SH, 4.8] Fix PR 59343

2013-12-06 Thread Kaz Kojima
Oleg Endo wrote: > This fixes a bug on the 4.8 branch which was initially described in PR > 51244 comment 59 and also reported as a separate PR 59343. > Tested with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > and no new

Re: Proposal to postpone release of 5.2 for a week

2015-07-10 Thread Kaz Kojima
Richard Biener wrote: > Note this opens the window for other important wrong-code fixes - please > CC me on any you'd like to propose for GCC 5.2 and wait for my > explicit approval. Can I backport the patch in [SH] Fix PR target/66780 https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00472.html to

Re: Proposal to postpone release of 5.2 for a week

2015-07-10 Thread Kaz Kojima
Richard Biener wrote: >> Can I backport the patch in >> >> [SH] Fix PR target/66780 >> https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00472.html >> >> to gcc-5.2? It's a few lines change for a SH specific wrong code bug >> with -fstack-protector which is disastrous for Debian SH folks who use >>

[patch committed SH] Fix PR target/65249

2015-07-15 Thread Kaz Kojima
I'll backport it to 4.9 later and to 5 when it reopens. Regards, kaz -- 2015-07-16 Kaz Kojima PR target/65249 * config/sh/sh.md (movdi): Split simple reg move to two movsi when the destination is R0. diff --git a/config/sh/sh.md b/config/sh/sh.md index f0cb3c

[patch committed SH] Fix PR target/67049

2015-07-31 Thread Kaz Kojima
I've committed the one liner below to fix PR target/67049 which causes build failures for sh64-elf on 5/6. There is a typo in GOTaddr2picreg, which is my bad. Tested on sh64-unknown-elf. Regards, kaz -- 2015-07-31 Kaz Kojima PR target/67049 * config/sh/

Re: Use cmpstr and cmpstrn optabs

2015-08-01 Thread Kaz Kojima
Richard Sandiford wrote: > This patch converts the code to do everything via the optabs interface. > This required a change to the sh.md cmpstrn pattern, where the length > predicate was "immediate_operand" but where the expander code wanted > to handle nonimmediates too. I also removed the now-r

[patch committed SH] Fix PR target/67573

2015-09-16 Thread Kaz Kojima
I've committed the attached patch to fix PR67573. LRA reveals that scratch registers in *call_*pcrel should be defined as early clobbered. The patch is tested on sh4-unkown-linux-gnu. Regards, kaz -- 2015-09-16 Kaz Kojima PR target/67573 * config/sh/sh.md (call_

[patch committed SH] Fix build failure

2015-09-17 Thread Kaz Kojima
I've committed the attached obvious fix for build failure for SH. object_allocator is changed so to remove the 2nd argument of its constructor. Regards, kaz -- 2015-09-17 Kaz Kojima * config/sh/sh.c (label_ref_list_d_pool): Adjust to object_allocator change.

Re: [patch committed SH] Fix PR target/67573

2015-09-21 Thread Kaz Kojima
oblem. Tested on sh4-unknown-linux-gnu. Committed as revision 227953. Regards, kaz -- 2015-09-21 Kaz Kojima Backport from mainline 2015-09-16 Kaz Kojima PR target/67573 * config/sh/sh.md (call_pcrel): Add early clobber to scratch

[patch committed SH] Fix PR target/67716

2015-09-28 Thread Kaz Kojima
I've committed the attached patch to fix PR target/67716. It implements targetm.override_options_after_change for SH. Tested on sh4-unknown-linux-gnu. Regards, kaz -- 2015-09-29 Kaz Kojima PR target/67716 * config/sh/sh.c (sh_override_options_after_change)

Re: [PATCH] SH FDPIC backend support

2015-10-02 Thread Kaz Kojima
Rich Felker wrote: > I worked around it and opened an issue for it: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67812 > > But trying the patch on vanilla GCC trunk without my usual J2 target > setup revealed some additional issues I need to address. I'm getting > ICE in the code that genera

Re: [PATCH] SH FDPIC backend support

2015-10-05 Thread Kaz Kojima
Oleg Endo wrote: >> So apparently the strange behavior I observed is intended. Presumably >> there is some mechanism to ensure that these functions are always >> static-linked? But I don't see it. The libgcc spec I see is: >> >> *libgcc: >> %{static|static-libgcc:-lgcc >> -lgcc_eh}%{!static:%{!st

Re: C PATCH for c/65345 (file-scope _Atomic expansion with floats)

2015-10-05 Thread Kaz Kojima
H targets. I'd like to apply it anyway, because it fixes the ICEs and there are no new failures on sh4-unknown-linux-gnu. Committed. Regards, kaz -- 2015-10-05 Kaz Kojima PR c/65345 * config/sh/sh.c (sh_atomic_assign_expand_fenv): Adjust to use create_tmp_var_r

Re: C PATCH for c/65345 (file-scope _Atomic expansion with floats)

2015-10-06 Thread Kaz Kojima
Eric Botcazou wrote: > No, it is not if you don't need to make the variable addressable. In any > case, the failure mode is another ICE in make_decl_rtl so easy to spot. Thanks for your explanation! It clarifies the intent of the original i386 patch. Regards, kaz

Re: [PATCH v2] SH FDPIC backend support

2015-10-06 Thread Kaz Kojima
Oleg Endo wrote: > On Mon, 2015-10-05 at 23:15 -0400, Rich Felker wrote: >> - Is the use of self specs (see DRIVER_SELF_SPECS in sh.h) an >> acceptable way to set the default? I brought this up before but >> don't think anyone answered. I find this method more clear and less >> invasive (doe

[patch committed SH] Fix PR target/68091

2015-10-26 Thread Kaz Kojima
kaz -- 2015-10-26 Kaz Kojima PR target/68091 * config/sh/sh.c (sh_vector_mode_supported_p): Use TARGET_SHMEDIA_FPU instead of TARGET_FPU_ANY. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index f8187e4..a153845 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh

[patch committed SH] Fix help text for -mfdpic

2015-10-29 Thread Kaz Kojima
I've committed the attached obvious patch to fix FAIL: compiler driver --help=target option(s): "^ +-.*[^:.]$" absent from output: " -mfdpic Generate ELF FDPIC code" popping up after SH fdpic patch applied. Regards, kaz

Re: [PATCH] Fix SH/FDPIC bad codegen with ssp enabled

2015-11-13 Thread Kaz Kojima
Rich Felker wrote: > The "chk_guard_add" pattern used for loading the GOT slot address for > __stack_chk_guard hard-codes use of r12 as a fixed GOT register and > thus is not suitable for FDPIC, where the saved initial value of r12 > from function entry is what we need. The patch is OK. Committe

[patch committed SH] Fix build failure

2015-12-06 Thread Kaz Kojima
15-12-06 Kaz Kojima * config/sh/sh.md (rsqrtsf2): Adjust for canonical form with unspec. diff --git a/config/sh/sh.md b/config/sh/sh.md index 083febe..b6fe05c 100644 --- a/config/sh/sh.md +++ b/config/sh/sh.md @@ -13744,12 +13744,11 @@ label: (define_insn "rsqrtsf2

Re: [BUILDROBOT] ./insn-flags.h:342:7: error: ‘operands’ was not declared in this scope

2015-12-06 Thread Kaz Kojima
Jan-Benedict Glaw wrote: > shle-linux breaks with: > > g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE > -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall > -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute > -Woverloaded-virtual -pedantic -Wn

[SH] Fix PR target/62111

2014-08-24 Thread Kaz Kojima
62111 for details. Tested on sh64-elf and sh4-unknown-linux-gnu with no new failures. I'll backport this to 4.9 in a week or so. Regards, kaz -- 2014-08-25 Kaz Kojima PR target/62111 * config/sh/predicates.md (general_extend_operand): Disable TRUNCATE bef

[patch committed SH] Fix PR target/62261

2014-08-27 Thread Kaz Kojima
. Regards, kaz -- 2014-08-27 Kaz Kojima PR target/62261 * config/sh/sh.md (ashlsi3): Handle negative shift count for TARGET_SHMEDIA. (ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise. --- ORIG/trunk/gcc/config/sh/sh.md 2014-07-03 09:10:37.0

[RFC] Tweak gcc.c-torture/execute/pr39228.c

2014-09-02 Thread Kaz Kojima
Hi, gcc.c-torture/execute/pr39228.c fails with "(test for excess errors)" on SH for recent revisions. My gcc.log says: gcc.c-torture/execute/pr39228.c:20:43: warning: always_inline function might not be inlinable [-Wattributes] ... It looks that alpha has the similar issue: https://gcc.gnu.org

Re: [RFC] Tweak gcc.c-torture/execute/pr39228.c

2014-09-02 Thread Kaz Kojima
Oleg Endo wrote: > -mieee should be the default on sh* and thus can be removed from the > dg-options line, or is it not? If -mieee is still needed (for alpha) maybe > it's better to use dg-additional-options instead? Sure. The attached is a revised one. Regards, kaz -- * gcc.

Re: [RFC] Tweak gcc.c-torture/execute/pr39228.c

2014-09-02 Thread Kaz Kojima
Uros Bizjak wrote: > -/* { dg-options "-mieee" { target sh*-*-* alpha*-*-* } } */ > +/* { dg-options "-w -mieee" { target sh*-*-* alpha*-*-* } } */ > /* { dg-skip-if "No Inf/NaN support" { spu-*-* } "*" "" } */ > > Please use /* { dg-add-options ieee } */ directive here. There is > another one p

Re: [RFC] Tweak gcc.c-torture/execute/pr39228.c

2014-09-03 Thread Kaz Kojima
Jeff Law wrote: >> * gcc.c-torture/execute/pr39228.c: Use dg-additional-options >> instead of dg-options and remove sh*-*-* from its target list. >> Add "inline" keyword to test functions. > Wouldn't we be better off moving this into execute/ieee? I've tried it and found that all e

[patch committed testsuite sh] Tweak gcc.c-torture/execute/pr44683.c

2014-09-04 Thread Kaz Kojima
28.c makes me think that this test can be moved into execute/ieee. Thought? Regards, kaz -- 2014-09-04 Kaz Kojima * gcc.c-torture/execute/pr44683.c: Remove dg-options for sh*-*-*. --- ORIG/trunk/gcc/testsuite/gcc.c-torture/execute/pr44683.c2014-08-26 09:26:20.0

Re: [patch committed testsuite sh] Tweak gcc.c-torture/execute/pr44683.c

2014-09-05 Thread Kaz Kojima
Mike Stump wrote: >> BTW, Jeff's comment on pr39228.c makes me think that this test >> can be moved into execute/ieee. Thought? > > I don’t see a down side, specially if we know that the test case is picky > about ieee. Thanks for suggestion. The patch below simply moves it into execute/ieee.

Re: [PATCH, SH] Implement builtin_strlen

2013-11-05 Thread Kaz Kojima
Christian Bruel wrote: > No regressions for sh-none-elf. OK for trunk ? OK. Regards, kaz

Re: [SH] Split addi,subdi,negdi before reload

2013-11-05 Thread Kaz Kojima
Oleg Endo wrote: > It seems that splitting multi-word insns before reload results in > slightly better code on average (according to CSiBE). The attached > patch implements that. > Tested on rev. 204263 with > make -k -j4 check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a

Re: [SH] PR 30807 - Add test case

2013-11-05 Thread Kaz Kojima
Oleg Endo wrote: > This adds a test case for PR 30807 which is based on the PR's attachment > 17961. Tested with > make -k check-gcc RUNTESTFLAGS="sh-torture.exp --target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb} > > OK to add? OK with the changes suggested by

Re: [SH] arith_reg_operand vs. fp_arith_reg_operand

2013-11-06 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch addresses one thing which I mentioned in PR 22553 > comment #27. Some of the FP insns take "arith_reg_operand", which seems > a bit off. I haven't checked whether it fixes the original problem of > PR 22553, but anyway it's probably better to use "fp_arith_r

[PATCH committed][SH] Fix build error

2013-11-15 Thread Kaz Kojima
arrange of barrier_align. The attached patch is to fix this. Tested on sh4-unknown-linux-gnu. Committed. Regards, kaz -- 2013-11-15 Kaz Kojima * config/sh/sh.c (barrier_align): Return 0 when barrier_or_label is null. diff -up ORIG/trunk/gcc/config/sh/sh.c trunk/gcc/config/sh/sh.

Re: [SH] PR 53976 - Add RTL pass to eliminate clrt, sett insns

2013-11-20 Thread Kaz Kojima
Oleg Endo wrote: > * config.gcc (SH extra_objs): Add sh_optimize_sett_clrt pass.o. The usual way would be * config.gcc (sh[123456789lbe]*-*-* | sh-*-*): Add sh_optimize_sett_clrt.o to extra_objs. OK with that change. Thanks! Regards, kaz

Re: [sh] Avoid genrecog warning

2013-11-22 Thread Kaz Kojima
Richard Sandiford wrote: > I have a patch to upgrade most genrecog warnings into errors. This patch > fixes the ones for sh. There were some warnings about the match_operands > in some define_peephole2s having constraints. There were also a few > cases where a destination predicate allowed a co

Re: [SH] Pass --isa to assembler

2013-11-24 Thread Kaz Kojima
Oleg Endo wrote: > Currently GCC doesn't pass the --isa parameter to the assembler for SH > targets other than SH2A and SH5. This makes the assembler accept any > kind of ISA and happily produce e.g. SH2A code even though the target is > SH4, which will then fail to link. > The attach patch fixes

Re: [SH] - Remove ROUND_REG, PASS_IN_REG, ROUND_ADVANCE macros

2013-11-24 Thread Kaz Kojima
Oleg Endo wrote: > This is a small SH cleanup patch. No functional changes -- at least not > intended. > > The ROUND_ADVANCE macro can be replaced with CEIL from system.h, which > makes it a bit clearer towards what something is rounded in the places > where it's used. > > The ROUND_REG and PAS

Re: [SH] Fix PR 58314 - Rework *movqi / *movhi patterns

2013-11-26 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch is the same as posted in the PR as attachment 31283. > In addition to the testing done by Kaz and Christian, I've also tested > it with > make -k check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m4/-ml,-m4/-mb,-m4a/-ml,-m4a/-mb}" > > on

[patch committed] [SH] Fix build failure in libgomp

2014-06-18 Thread Kaz Kojima
o fix it. Committed on trunk. Regards, kaz -- 2014-06-18 Kaz Kojima PR target/61550 * config/sh/sh.c (prepare_move_operands): Don't process TLS addresses here if reload in progress or completed. --- ORIG/trunk/gcc/config/sh/sh.c 2014-06-17 21:21:32

[patch commit SH] Fix PR target/65979

2015-05-26 Thread Kaz Kojima
Hi, I've committed the attached patches to fix PR target/65979 which is a 5/6 regression in behalf of Oleg. The problematic peephole can clobber a register before its use. See PR65979 for details. The first patch is for trunk and the second one is a slightly different version against gcc-5-bran

Re: [PATCH 3/4, libitm, sh]: Change gtm_futex_{wait,wake} to int

2015-05-27 Thread Kaz Kojima
Uros Bizjak wrote: > 2015-05-27 Uros Bizjak > > * config/linux/sh/futex_bits.h (sys_futex0) Change operands > "op" and "val" to int. > > Untested. > > OK for mainline? OK. Although it looks obvious, I've confirmed that there is no build issue/regression on sh4-unknown-linux-gnu wit

[patch committed SH] Fix PR target/66410

2015-06-05 Thread Kaz Kojima
. The patch disparages this case for RA. It fixes PR and various libstdc++ test failures happen on trunk with -mlra. Tested on sh4-unknown-linux-gnu with no new failures. Committed. Regards, kaz -- 2015-06-05 Kaz Kojima PR target/66410 * config/sh/constraints.md (Sid

[patch committed SH] Fix PR target/65987

2015-05-04 Thread Kaz Kojima
e above PR. Tested on sh4-unknown-linux-gnu. Regards, kaz -- 2015-05-04 Kaz Kojima PR target/65987 * config/sh/sh.c (output_far_jump): Take into account crossing jumps. (split_branches): Likewise. diff --git a/config/sh/sh.c b/config/sh/sh.c index 1cf6ed0..a4c9

[RFC] Wrong "current" pointers with bitmap_ior and bitmap_ior_and_compl

2014-11-28 Thread Kaz Kojima
Hi, I've got odd ICEs with some bitmap operations when working on sh-lra branch. bitmap_ior and bitmap_ior_and_compl are the bitmap operations for DST = A | B and DST = A | (B & ~KILL) respectively. It looks they could make bitmaps with the wrong "current" pointer. One small example is DST: [(bi

Re: [RFC] Wrong "current" pointers with bitmap_ior and bitmap_ior_and_compl

2014-11-28 Thread Kaz Kojima
Richard Biener wrote: > Huh? Wasn't this fixed by Mike a few weeks ago? Ugh. I've missed that thread. Sorry for the noise. Regards, kaz

Re: [RFC] Wrong "current" pointers with bitmap_ior and bitmap_ior_and_compl

2014-11-28 Thread Kaz Kojima
Mike Stump wrote: > While I had testing on my target, there were plenty of other regressions > from trunk intermixed, so I wanted to do a normal bootstrap on Linux which > I had not done yet. Kaz, you can check your patch, if the same, pretty > sure it is, it has been approved and you can just ch

[PATCH committed] [SH] Fix PR target/65153

2015-02-23 Thread Kaz Kojima
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65153 for details. Tested on sh4-unknwon-linux-gnu with no new failures. Committed on trunk. I'll backport it to 4.9 branch later. Regards, kaz -- 2015-02-23 Kaz Kojima PR target/65153 * config/sh/sh.md (movs

Re: [SH] Adding some peepholes (PR 61142)

2015-02-26 Thread Kaz Kojima
Oleg Endo wrote: > These are the peepholes as mentioned in PR 65153 and in PR 61142. They > try to wallpaper some bad RA choices and reduce the CSiBE code size by > approx. 3.9K bytes. > > A problem I ran into with this one is that the peephole2 pass drops > REG_INC notes, which makes the follow

[patch committed SH] Fix PR target/65249

2015-03-03 Thread Kaz Kojima
, SH is still in transition to LRA and we have no chance for 4.9. Tested with sh4-unknown-linux-gnu on trunk and 4.9 branch. Committed on trunk and 4.9. Regards, kaz -- 2015-03-03 Kaz Kojima PR target/65249 * config/sh/sh.md (symGOT_load): Use R0 reg for operands[2] when

Re: sh-*-linux build failure

2015-03-08 Thread Kaz Kojima
Oleg Endo wrote: >> diff --git a/gcc/config/sh/t-linux b/gcc/config/sh/t-linux >> index d33c638..22b8e3e 100644 >> --- a/gcc/config/sh/t-linux >> +++ b/gcc/config/sh/t-linux >> @@ -1,2 +1,3 @@ >> MULTILIB_DIRNAMES= >> -MULTILIB_MATCHES = >> +MULTILIB_MATCHES = >> +MULTILIB_EXCEPTIONS = m2a m2a/

Re: [SH] Backport fix of PR 53988 to 4.9/4.8

2015-03-08 Thread Kaz Kojima
Oleg Endo wrote: > Backporting of the fix went into GCC 5 seems to intrusive for the > released branches. Hence I'd propose to remove the problematic patterns > altogether, as they can silently generate wrong code. The attached > patch does that. Tested briefly with 'make all' and with > make -

Re: sh-*-linux build failure

2015-03-09 Thread Kaz Kojima
Yoshinori Sato wrote: >> * config/sh/t-linux (MULTILIB_EXCEPTIONS): Define for m2a cases. [snip] > It works fine. Thanks for checking. I've committed it on trunk as revision 221287. Regards, kaz

Re: sh-*-linux build failure

2015-03-10 Thread Kaz Kojima
Oleg Endo wrote: > I think the same should be done in t-sh and in t-linux we could add the > SH1 little endian exception, too ... just in case (see attached patch). > I'm not sure whether TM_MULTILIB_EXCEPTIONS_CONFIG is needed in t-linux > or not. Moreover, I don't understand why t-linux doesn't

Re: [PATCH 3/3] Fix dbr_schedule for -freorder-blocks-and-partition

2015-03-24 Thread Kaz Kojima
Steven Bosscher wrote: > This patch merely papers over another issue, probably a missing > CROSSING_JUMP_P test. Perhaps. Surely it has looked the current DBR is not so well for crossing jumps and my fix might be a bit ad-hoc. The first part of the patch could be rewritten with checking if one o

[patch commit SH] Fix failures for gcc.target/sh/pr49263-2.c with -mlra

2015-06-10 Thread Kaz Kojima
n sh4-unknown-linux-gnu with no new failures for -mlra/-mno-lra. There are no visible changes over generated objects with -mno-lra in CSiBE. Committed on trunk. Regards, kaz -- 2015-06-10 Kaz Kojima * config/sh/sh.md (tstsi_t): Add '?' modifier to 'r' alterna

  1   2   3   4   >