Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 10:54 AM Alexey Lapshin wrote: > Please consider to review another two pathes then. > This would be nice to have it in upstream Sure, it's going to take some time though as I need to take a good look, and maybe I'll come back with some change proposals. -- Thanks. -- Max

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 10:45 AM Alexey Lapshin wrote: > > On Thu, 2023-07-20 at 08:25 -0700, Max Filippov wrote: > > But it defines them with their respective values. > > Just notice that it adds two leading underscores in front of the names. > > Why builtin macros were defined with prefix? > Wit

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
Please consider to review another two pathes then. This would be nice to have it in upstream

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
On Thu, 2023-07-20 at 10:43 -0700, Max Filippov wrote: > Bonus points for keeping backwards > compatibility with the overlay-based configuration method (: Got you, thanks!

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
On Thu, 2023-07-20 at 08:25 -0700, Max Filippov wrote: > But it defines them with their respective values. > Just notice that it adds two leading underscores in front of the names. Why builtin macros were defined with prefix? With this approach I also need define it somewhere: #define XTHAL_ABI_W

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 9:10 AM Alexey Lapshin wrote: > I see now, thanks for the explanation, I will try to rebuild toolchain > without this particular patch. > BTW, what do you thing about placing config from newlib overlay to dynconfig? That's the right thing to do. Bonus points for keeping b

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
I see now, thanks for the explanation, I will try to rebuild toolchain without this particular patch. BTW, what do you thing about placing config from newlib overlay to dynconfig?

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 8:12 AM Alexey Lapshin wrote: > > Oops, missed this loop while implementing... > > I had a problem with building esp chips multilib until added my changes. > > This loop looks like just defines a macro without value. But it defines them with their respective values. Just n

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
Oops, missed this loop while implementing... I had a problem with building esp chips multilib until added my changes. This loop looks like just defines a macro without value. But the value must be set to make it work correctly. It uses builtin_define() instead builtin_define_with_int_value() I w

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 7:37 AM Alexey Lapshin wrote: > > gcc/ > * config/xtensa/xtensa.h (XCHAL_HAVE_BE, XCHAL_HAVE_DENSITY, > XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS, XCHAL_HAVE_ADDX, > XCHAL_HAVE_L32R, XSHAL_USE_ABSOLUTE_LITERALS, > XSHAL_HAVE_TEXT_SECTION_LITER

[PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
gcc/ * config/xtensa/xtensa.h (XCHAL_HAVE_BE, XCHAL_HAVE_DENSITY, XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS, XCHAL_HAVE_ADDX, XCHAL_HAVE_L32R, XSHAL_USE_ABSOLUTE_LITERALS, XSHAL_HAVE_TEXT_SECTION_LITERALS, XCHAL_HAVE_MAC16, XCHAL_HAVE_MUL16, XCHAL_HAVE_MUL32