https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91628

--- Comment #8 from Florian Weimer <fw at gcc dot gnu.org> ---
(In reply to rdapp from comment #7)
> Created attachment 46817 [details]
> Proposed patch using __tls_get_offset
> 
> I drafted a patch that uses __tls_get_offset instead of the internal symbol
> following Florian's idea.
> 
> Test suite looks similar to before.  Is it OK?

Calling functions from inline assembly is always a bit iffy.  For example, your
code lacks clobbers for the vector registers (if present) and the condition
code register.  I don't know if s390/s390x has a red zone, or specific call
frame setup requirements (the psABI is ambiguous regarding the latter for
functions whose arguments all fit into registers, as it is the case here).

I would suggest not to use inline assembly for this purpose.

Reply via email to