-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple M1: bug in jitting argument of type short #7090
Comments
This bug makes stressGraphics fail on Apple M1 machines. |
65535 is the ones-complement representation of
Taking a deeper look into it now. |
Want to see something funny? I had a ROOT build in |
Hmm that would hint at an ABI issue - and that should be reproducible with |
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes root-project#7090
Yep, it's an ABI issue: On AArch64, integers with less than 32 bits (including |
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes #7090
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes root-project#7090 (cherry picked from commit f75a7c4)
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes root-project#7090 (cherry picked from commit f75a7c4)
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes root-project#7090 (cherry picked from commit f75a7c4)
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes root-project#7090 (cherry picked from commit f75a7c4)
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes #7090 (cherry picked from commit f75a7c4)
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes #7090 (cherry picked from commit f75a7c4)
The argument -Xclang -triple=... completely bypasses Clang's Driver logic and only sets the triple in CC1. This suffices for most code generation tasks, but the Driver cannot compute the correct ABI and sets the generic AArch64 "aapcs" instead of the specific "darwinpcs". In turn, this causes integer arguments with less than 32 bits not being sign-extended but being passed directly, which for example manifests as (short)-1 being read as 65535 on the callee side. The new argument --target=arm64-apple-darwin20.3.0 matches what Apple's and LLVM main's clang return for --print-target-triple. Fixes root-project#7090 (cherry picked from commit f75a7c4)
Describe the bug
new TPad("p","p",0.,0.,1.,1.)
on the prompt (or anything jitted by the interpreter) will pass 65535 forcolor
even though the constructor is declared asTPad (const char *name, const char *title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup, Color_t color=-1, Short_t bordersize=-1, Short_t bordermode=-2)
whereColor_t
isshort
.Apparently, cling and the compiled library disagree on the size of
short
?Expected behavior
TPad()
should seecolor == -1
being passed, as per the default argument.To Reproduce
new TPad("p","p",0.,0.,1.,1.)
shows the wrong background color.Setup
Apple M1, ROOT master built with clang.
The text was updated successfully, but these errors were encountered: