[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portable inline asm to get address of TLS variable
|
From: |
Serge Guelton |
|
Subject: |
Re: Portable inline asm to get address of TLS variable |
|
Date: |
Thu, 17 Feb 2022 16:02:16 +0100 |
|
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Feb 17, 2022 at 12:40:40PM +0100, Paolo Bonzini wrote:
> On 2/17/22 10:28, Stefan Hajnoczi wrote:
> >>But going against ABI and toolchain in this way is really no long-term
> >>solution. You need to switch to stackless co-routines, or we need to
> >>provide proper ABI-level support for this. Today it's the thread
> >>pointer, tomorrow it's the shadow stack pointer, and the day after that,
> >>it's the SafeStack pointer. And further down the road, it's some thread
> >>state for garbage collection support. Or something like that.
> >
> >Yes, understood :(. This does feel like solving an undefined behavior
> >problem by adding more undefined behavior on top!
>
> Yes, this is the kind of thing that I generally despise when I see
> other programs do it... it's easy to dig ourselves in the same
> hole.
>
> >I took a quick look at C++20 coroutines since they are available in
> >compilers but the primitives look hard to use even from C++, let alone
> >from C.
>
> They're C++ only in GCC, too. I really think that QEMU should be
> compilable in C++, but I'm not sure how easy a sell it is.
It's perfectly fine to have one compilation unit written in C++ with a few
symbol in `extern "C"`. No need to touch the other part of the project.
- Portable inline asm to get address of TLS variable, Stefan Hajnoczi, 2022/02/16
- Re: Portable inline asm to get address of TLS variable, Florian Weimer, 2022/02/16
- Re: Portable inline asm to get address of TLS variable, Florian Weimer, 2022/02/16
- Re: Portable inline asm to get address of TLS variable, Stefan Hajnoczi, 2022/02/17
- Re: Portable inline asm to get address of TLS variable, Paolo Bonzini, 2022/02/17
- Re: Portable inline asm to get address of TLS variable,
Serge Guelton <=
- Re: Portable inline asm to get address of TLS variable, Stefan Hajnoczi, 2022/02/17
- Re: Portable inline asm to get address of TLS variable, Paolo Bonzini, 2022/02/17
- Re: Portable inline asm to get address of TLS variable, Serge Guelton, 2022/02/17
Re: Portable inline asm to get address of TLS variable, Paolo Bonzini, 2022/02/16