I finally understand what i did wrong! i`m just recompile gcc into one folder, and use binaries from another because of mistake in folder while configure re-make, of course it did not work, just lost two weeks and bother two wonderful people!!! thank to you all very much!! and sorry for my engrish my bear prevents me to write and maybe i drink too much vodka!
>Вторник, 7 мая 2019, 1:28 +05:00 от Jim Wilson < j...@sifive.com >: > >On Mon, May 6, 2019 at 11:28 AM Алексей Хилаев < hardest2...@mail.ru > wrote: >> I tried gpr mode and x mode and sminsi3 and smindi float min works with >> anyf, and integer it is not emit, i tried all you wrote to already(( > >You are getting ahead of yourself and doing complicated things here >when you should start with the simple easy approach. > >Make a copy of the addsi3 pattern. Change "add" to "smin". Change >"plus" to "smin". Build a compiler. Put this in a tmp.c file >int >sub (int i, int j) >{ > return i < j ? i : j; >} >Compile with -O2 -S -fdump-tree-all -fdump-rtl-all and look at the >tmp.c.*t.optimized file. Note that it uses SMIN_EXPR. Note that in >optabs-tree.c, in the function optab_for_tree_code, there is a switch >case to translate the tree signed MIN_EXPR to the RTL smin_optab. >Look at the tmp.c.*r.expand file, and note that it is using your new >smin instruction. If you want to understand how this works, you can >look at the MIN_EXPR support in the tree level optimizer and the >smin_optab support in the RTL optimizer. > >You can then add a smindi3 pattern, and maybe also smax*, umin*, and >umin* patterns. It depends on what instructions you have available. >If you have 64-bit word size instructions (e.g. like addw) then you >can follow the example of the add* patterns. > >If you want to reduce the size of the md file change, you can use >iterators that allow you to define one pattern that expands into >multiple pattersn. See for instance how the <optab><mode>3 pattern >works in the LOGICAL section. This uses two iterators, X and >any_bitwise, and expands to 3 patterns, which are different patterns >for rv32 and rv64. Then there is another internal pattern to add 3 >more for rv64. You probably want something like this at the end. But >you should start with the simple approach of adding one pattern, get >that working, and then optimize it via iterators instead of adding a >lot of different patterns that are minor copies of each other. If you >are having trouble understanding what the iterators are doing, then >you can do "make mddump" and look at the tmp-mddump.md file which is >sort of a preprocessed output of the md file. In particular, look at >the andsi3 pattern which was expanded from the <optab><mode>3 pattern >I mentioned. > >In general, you should probably be sending email to the mailing lists >instead of directly to me. I'm not the only person that knows how to >answer these kinds of questions, and I don't always have time to help >everyone myself. I'd like to spread the load around if possible. > >Jim Kind regards Alex Hill. ---------------------------------------------------------------------- Kind regards Alex Hill.