miladfarca wrote: @DeinAlptraum It's correct that the type is an enum however similar to @Endilll's explanation, ctypes has no concept of an enum. They get passed a data size (8/4/2 etc.) and in this case all they see is a `4 byte data type` which per s390x ABI ([correctly pasted above](https://github.com/llvm/llvm-project/pull/221024#issuecomment-5536910061)) and libffi contract, needs to be sign or zero extended to a full register size.
I have also created an issue on cpython upstream and have made this patch s390x specific: https://github.com/python/cpython/issues/156933 https://github.com/llvm/llvm-project/pull/221024 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
