The implications of what we are currently generating for the purecap ABI is that the resulting value is 0xFFFFFFFFFFFFFFFF (i.e. -1) instead of 0x1, which breaks some tests in WebKit's javascript interpreter that depend on 0x1 for true. We are doing the right thing for purecap C code.
I think we should be zero extending here to be consistent with C and the non-purecap C++ case.
The following example C++ code:
Leads to the following LLVM IR in the
purecap
ABI (i.e. whenintptr_t
is__intcap_t
) for the equality comparison:However, when not compiling for the
purecap
ABI, or when using vanillaclang++
, the following IR is generated:The implications of what we are currently generating for the
purecap
ABI is that the resulting value is0xFFFFFFFFFFFFFFFF
(i.e. -1) instead of0x1
, which breaks some tests in WebKit's javascript interpreter that depend on0x1
for true. We are doing the right thing for purecap C code.I think we should be zero extending here to be consistent with C and the non-
purecap
C++ case.