On Fri, Sep 15, 2017 at 11:01:19AM -0700, Linus Torvalds wrote:
> And most code movement really seemed to be around inline asms, I
> wonder if the gcc logic simply is something like "if the stack pointer
> is visible as a register, don't move any inline asm across a frame
> setup".
After some test
On Sun, Sep 17, 2017 at 01:22:32AM +0300, Andrey Ryabinin wrote:
> On 09/16/2017 02:29 AM, Josh Poimboeuf wrote:
> > On Fri, Sep 15, 2017 at 11:01:19AM -0700, Linus Torvalds wrote:
> >> On Fri, Sep 15, 2017 at 9:53 AM, Andrey Ryabinin
> >> wrote:
> >>>
> >>> I'm not so sure that this is disabled o
On 09/16/2017 02:29 AM, Josh Poimboeuf wrote:
> On Fri, Sep 15, 2017 at 11:01:19AM -0700, Linus Torvalds wrote:
>> On Fri, Sep 15, 2017 at 9:53 AM, Andrey Ryabinin
>> wrote:
>>>
>>> I'm not so sure that this is disabled optimization. I assume that global
>>> rsp makes
>>> changes something in gcc
On Fri, Sep 15, 2017 at 11:01:19AM -0700, Linus Torvalds wrote:
> On Fri, Sep 15, 2017 at 9:53 AM, Andrey Ryabinin
> wrote:
> >
> > I'm not so sure that this is disabled optimization. I assume that global
> > rsp makes
> > changes something in gcc's register allocation logic, or something like
>
On Fri, Sep 15, 2017 at 9:53 AM, Andrey Ryabinin
wrote:
>
> I'm not so sure that this is disabled optimization. I assume that global rsp
> makes
> changes something in gcc's register allocation logic, or something like that
> leading
> to subtle changes in generated code.
>
> But what I recently
On Fri, Sep 15, 2017 at 07:53:46PM +0300, Andrey Ryabinin wrote:
>
>
> On 08/31/2017 08:25 PM, Josh Poimboeuf wrote:
> >
> > There have been a few other ideas which have *almost* worked:
> >
> > 1) Make the 'register void *__sp asm(_ASM_SP)' a global variable instead
> >of a local one. This
On 08/31/2017 08:25 PM, Josh Poimboeuf wrote:
>
> There have been a few other ideas which have *almost* worked:
>
> 1) Make the 'register void *__sp asm(_ASM_SP)' a global variable instead
>of a local one. This works for GCC and doesn't break clang. However
>it resulted in a lot of cha
On Thu, Sep 14, 2017 at 01:45:29PM -0500, Josh Poimboeuf wrote:
> On Thu, Sep 14, 2017 at 11:28:30AM -0700, Linus Torvalds wrote:
> > On Thu, Sep 14, 2017 at 10:33 AM, Josh Poimboeuf
> > wrote:
> > >>
> > >> a) uglifying the 15 or so relevant inline asm locations with ifdefs; or
> > >
> > > Actu
On Thu, Sep 14, 2017 at 11:28:30AM -0700, Linus Torvalds wrote:
> On Thu, Sep 14, 2017 at 10:33 AM, Josh Poimboeuf wrote:
> >>
> >> a) uglifying the 15 or so relevant inline asm locations with ifdefs; or
> >
> > Actually I guess we could put the "sp" in a macro... I'll try it.
>
> Exactly. Do s
On Thu, Sep 14, 2017 at 10:33 AM, Josh Poimboeuf wrote:
>>
>> a) uglifying the 15 or so relevant inline asm locations with ifdefs; or
>
> Actually I guess we could put the "sp" in a macro... I'll try it.
Exactly. Do something like
#ifdef CONFIG_FRAME_POINTER
# define EXTRA_ASM_CLOBBERS "
On Thu, Sep 14, 2017 at 12:26:27PM -0500, Josh Poimboeuf wrote:
> On Thu, Sep 14, 2017 at 10:16:08AM -0700, Linus Torvalds wrote:
> > On Thu, Sep 14, 2017 at 7:48 AM, Josh Poimboeuf wrote:
> > >
> > > As it turns out, the real problem with this option is that it imposes a
> > > penalty for CONFIG_
On Thu, Sep 14, 2017 at 10:16:08AM -0700, Linus Torvalds wrote:
> On Thu, Sep 14, 2017 at 7:48 AM, Josh Poimboeuf wrote:
> >
> > As it turns out, the real problem with this option is that it imposes a
> > penalty for CONFIG_FRAME_POINTER=n: even with frame pointers disabled,
> > it forces the fram
On Thu, Sep 14, 2017 at 7:48 AM, Josh Poimboeuf wrote:
>
> As it turns out, the real problem with this option is that it imposes a
> penalty for CONFIG_FRAME_POINTER=n: even with frame pointers disabled,
> it forces the frame pointer to be saved for each function which uses the
> inline asm "call"
On Sat, Sep 02, 2017 at 12:32:21PM +0200, Ingo Molnar wrote:
>
> * Josh Poimboeuf wrote:
>
> > On Thu, Aug 31, 2017 at 12:25:42PM -0500, Josh Poimboeuf wrote:
> > > 2) Put "sp" in the clobbers list instead of as an i/o constraint. This
> > >mostly works for GCC, and doesn't break clang. Ho
* Josh Poimboeuf wrote:
> On Thu, Aug 31, 2017 at 12:25:42PM -0500, Josh Poimboeuf wrote:
> > 2) Put "sp" in the clobbers list instead of as an i/o constraint. This
> >mostly works for GCC, and doesn't break clang. However, it causes
> >GCC to insert a "lea -0x10(%rbp),%rsp" in the epi
On Thu, Aug 31, 2017 at 12:25:42PM -0500, Josh Poimboeuf wrote:
> 2) Put "sp" in the clobbers list instead of as an i/o constraint. This
>mostly works for GCC, and doesn't break clang. However, it causes
>GCC to insert a "lea -0x10(%rbp),%rsp" in the epilogue of every
>affected functi
On Thu, Aug 31, 2017 at 09:11:54AM -0700, Linus Torvalds wrote:
> On Thu, Aug 31, 2017 at 7:11 AM, Josh Poimboeuf wrote:
> >
> > Make the following changes:
> >
> > - Give alternative_io(), alternative_call(), and alternative_call_2()
> > consistent interfaces. The constraints are provided by u
On Thu, Aug 31, 2017 at 7:11 AM, Josh Poimboeuf wrote:
>
> Make the following changes:
>
> - Give alternative_io(), alternative_call(), and alternative_call_2()
> consistent interfaces. The constraints are provided by use of the
> OUTPUTS(), INPUTS(), and CLOBBERS() macros.
I really think th
The alternative code has some macros which are used for wrapping inline
asm statements. These macros can be confusing:
- Some of them require the caller to start their positional operands at
'%1' instead of '%0'.
- There are multiple variants of the macros which basically do the same
thing,
19 matches
Mail list logo