[Beignet] [PATCH] Add long support for printf
Zhigang Gong
zhigang.gong at linux.intel.com
Wed Sep 17 19:38:02 PDT 2014
Another comment as below:
> + arg = builder->CreateIntCast(arg, Type::getInt64Ty(module->getContext()), sign);
> + }
> + dst_type = Type::getInt64PtrTy(module->getContext(), 1);
> + sizeof_size = sizeof(ulong);
even using unsigned long at the above code is incorrect, please use int64_t instead.
unsigned long is 32 bit in 32bit linux system.
> + } else {
> + /* If the bits change, we need to consider the signed. */
> + if (arg->getType() != Type::getInt32Ty(module->getContext())) {
> + arg = builder->CreateIntCast(arg, Type::getInt32Ty(module->getContext()), sign);
> + }
>
More information about the Beignet
mailing list