Re: typeof and operands in named address spaces

2020-11-05 Thread Andy Lutomirski via Gcc
> On Nov 5, 2020, at 4:26 AM, Uros Bizjak wrote: > > On Thu, Nov 5, 2020 at 1:14 PM Alexander Monakov wrote: > >>> I was also thinking of introducing of operand modifier, but Richi >>> advises the following: >>> >>> --cut here-- >>> typedef __UINTPTR_TYPE__ uintptr_t; >>> >>> __seg_fs int x;

Re: Broken check rejecting -fcf-protection and -mindirect-branch=thunk-extern

2020-04-28 Thread Andy Lutomirski
> On Apr 28, 2020, at 10:44 AM, H.J. Lu wrote: > > On Tue, Apr 28, 2020 at 10:24 AM David Woodhouse wrote: >> >> >> >>> On 28 April 2020 17:14:49 BST, Peter Zijlstra wrote: >>> On Tue, Apr 28, 2020 at 02:41:33PM +0100, Andrew Cooper wrote: Its fine to focus on userspace first, but

Re: Broken check rejecting -fcf-protection and -mindirect-branch=thunk-extern

2020-04-28 Thread Andy Lutomirski
> On Apr 28, 2020, at 9:14 AM, Peter Zijlstra wrote: > > On Tue, Apr 28, 2020 at 02:41:33PM +0100, Andrew Cooper wrote: >> Its fine to focus on userspace first, but the kernel is far more simple. >> >> Looking at that presentation, the only thing missing for kernel is the >> notrack

Re: RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-02 Thread Andy Lutomirski
On Sep 2, 2015 6:57 AM, "Brian Gerst" <brge...@gmail.com> wrote: > > On Tue, Sep 1, 2015 at 10:21 PM, Andy Lutomirski <l...@amacapital.net> wrote: > > On Sep 1, 2015 6:53 PM, "Brian Gerst" <brge...@gmail.com> wrote: > >> > >>

RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-01 Thread Andy Lutomirski
Hi all- Linux has a handful of weird features that are only supported for backwards compatibility. The big one is the x86_64 vsyscall page, but uselib probably belongs on the list, too, and we might end up with more at some point. I'd like to add a way that new programs can turn these features

Re: RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-01 Thread Andy Lutomirski
On Sep 1, 2015 6:53 PM, "Brian Gerst" <brge...@gmail.com> wrote: > > On Tue, Sep 1, 2015 at 8:51 PM, Andy Lutomirski <l...@amacapital.net> wrote: > > Hi all- > > > > Linux has a handful of weird features that are only supported for > > backward

Re: RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-01 Thread Andy Lutomirski
On Sep 1, 2015 6:12 PM, "Ian Lance Taylor" <i...@google.com> wrote: > > On Tue, Sep 1, 2015 at 5:51 PM, Andy Lutomirski <l...@amacapital.net> wrote: > > > > Linux has a handful of weird features that are only supported for > > backwards compatibi

Re: [musl] RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-01 Thread Andy Lutomirski
On Tue, Sep 1, 2015 at 9:18 PM, Rich Felker <dal...@libc.org> wrote: > On Tue, Sep 01, 2015 at 08:39:27PM -0700, Andy Lutomirski wrote: >> On Tue, Sep 1, 2015 at 7:54 PM, Rich Felker <dal...@libc.org> wrote: >> > On Tue, Sep 01, 2015 at 05:51:44PM -0700, Andy

Re: [musl] RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-01 Thread Andy Lutomirski
On Tue, Sep 1, 2015 at 9:55 PM, Rich Felker <dal...@libc.org> wrote: > On Tue, Sep 01, 2015 at 09:32:22PM -0700, Andy Lutomirski wrote: >> On Tue, Sep 1, 2015 at 9:18 PM, Rich Felker <dal...@libc.org> wrote: >> > On Tue, Sep 01, 2015 at 08:39:27PM -0700, Andy Lutomir

Re: [musl] RFC: adding Linux vsyscall-disable and similar backwards-incompatibility flags to ELF headers?

2015-09-01 Thread Andy Lutomirski
On Tue, Sep 1, 2015 at 7:54 PM, Rich Felker <dal...@libc.org> wrote: > On Tue, Sep 01, 2015 at 05:51:44PM -0700, Andy Lutomirski wrote: >> Hi all- >> >> Linux has a handful of weird features that are only supported for >> backwards compatibility. The bi

Re: gcc feature request / RFC: extra clobbered regs

2015-07-01 Thread Andy Lutomirski
On Wed, Jul 1, 2015 at 8:23 AM, Vladimir Makarov vmaka...@redhat.com wrote: On 06/30/2015 05:37 PM, Jakub Jelinek wrote: On Tue, Jun 30, 2015 at 02:22:33PM -0700, Andy Lutomirski wrote: I'm working on a massive set of cleanups to Linux's syscall handling. We currently have a nasty

Re: gcc feature request / RFC: extra clobbered regs

2015-07-01 Thread Andy Lutomirski
On Wed, Jul 1, 2015 at 10:43 AM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Jul 01, 2015 at 01:35:16PM -0400, Vladimir Makarov wrote: Actually it raise a question for me. If we describe that a function clobbers more than calling convention and then use it as a value (assigning a variable

Re: gcc feature request / RFC: extra clobbered regs

2015-07-01 Thread Andy Lutomirski
On Wed, Jul 1, 2015 at 10:35 AM, Vladimir Makarov vmaka...@redhat.com wrote: Actually it raise a question for me. If we describe that a function clobbers more than calling convention and then use it as a value (assigning a variable or passing as an argument) and loosing a track of it and than

Re: gcc feature request / RFC: extra clobbered regs

2015-06-30 Thread Andy Lutomirski
On Tue, Jun 30, 2015 at 2:52 PM, H. Peter Anvin h...@zytor.com wrote: On 06/30/2015 02:48 PM, Andy Lutomirski wrote: On Tue, Jun 30, 2015 at 2:41 PM, H. Peter Anvin h...@zytor.com wrote: On 06/30/2015 02:37 PM, Jakub Jelinek wrote: I'd say the most natural API for this would be to allow f

gcc feature request / RFC: extra clobbered regs

2015-06-30 Thread Andy Lutomirski
Hi all- I'm working on a massive set of cleanups to Linux's syscall handling. We currently have a nasty optimization in which we don't save rbx, rbp, r12, r13, r14, and r15 on x86_64 before calling C functions. This works, but it makes the code a huge mess. I'd rather save all regs in asm and

Re: gcc feature request / RFC: extra clobbered regs

2015-06-30 Thread Andy Lutomirski
On Tue, Jun 30, 2015 at 2:41 PM, H. Peter Anvin h...@zytor.com wrote: On 06/30/2015 02:37 PM, Jakub Jelinek wrote: I'd say the most natural API for this would be to allow f{fixed,call-{used,saved}}-REG in target attribute. Either that or

Re: [RFC / musing] Scoped exception handling in Linux userspace?

2013-07-19 Thread Andy Lutomirski
On Fri, Jul 19, 2013 at 9:22 AM, David Daney ddaney.c...@gmail.com wrote: On 07/18/2013 08:29 PM, Andy Lutomirski wrote: Other way around: a *library* that wants to use exception handling can't do so safely without the cooperation, or at least understanding, of the main program and every

[RFC / musing] Scoped exception handling in Linux userspace?

2013-07-18 Thread Andy Lutomirski
Windows has a feature that I've wanted on Linux forever: stack-based (i.e. scoped) exception handling. The upshot is that you can do, roughly, this (pseudocode): int callback(...) { /* Called if code_that_may_fault faults. May return unwind to landing pad, propagate the fault, or fixup and

Re: [RFC / musing] Scoped exception handling in Linux userspace?

2013-07-18 Thread Andy Lutomirski
On Thu, Jul 18, 2013 at 5:40 PM, David Daney ddaney.c...@gmail.com wrote: On 07/18/2013 05:26 PM, Andy Lutomirski wrote: Windows has a feature that I've wanted on Linux forever: stack-based (i.e. scoped) exception handling. The upshot is that you can do, roughly, this (pseudocode): int

Re: [RFC / musing] Scoped exception handling in Linux userspace?

2013-07-18 Thread Andy Lutomirski
On Thu, Jul 18, 2013 at 6:17 PM, David Daney ddaney.c...@gmail.com wrote: On 07/18/2013 05:50 PM, Andy Lutomirski wrote: On Thu, Jul 18, 2013 at 5:40 PM, David Daney ddaney.c...@gmail.com wrote: On 07/18/2013 05:26 PM, Andy Lutomirski wrote: How is this different than throwing exceptions

How do I disable warnings across gcc versions?

2012-05-14 Thread Andy Lutomirski
This code warns (incorrectly, but that's a whole separate issue): double foo(double a, double b) { bool option1_ok, option2_ok; double option1, option2; if (a == 0) { option1_ok = false; } else { option1 = b; option1_ok = true; } if (a == 1) { option2_ok = false; }

Re: should sync builtins be full optimization barriers?

2011-09-12 Thread Andy Lutomirski
On 09/12/2011 05:30 PM, Ken Raeburn wrote: On Sep 12, 2011, at 19:19, Andrew MacLeod wrote: lets say the order of the writes turns out to be 2,4... is it possible for both writes to be travelling around some bus and have thread 4 actually read the second one first, followed by the first