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

--- Comment #9 from rdapp at linux dot ibm.com ---
(In reply to Florian Weimer from comment #8)
> 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.

Right about the missing registers.  I was wary about building with an older GCC
but the support only started with GCC9 so this should not be a problem. 
Apparently we can also add vector clobbers with -mno-vx.

I opted for inline assembly to make sure r12 is not changed directly before the
function call. Do you have an idea to guarantee this in another way?

Reply via email to