[PATCH] D61725: Non-8-bit addressable units showcase
Thomas Pietsch via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 9 02:24:09 PST 2021
Tommy added a comment.
Dear Jesper,
I am working on an architecture where the minimal addressable unit size is 64 bit. So far everything worked fine until I started testing strings(i8-layout) and pointer to char and short, were I ran into serious problems with the 8-bit/Byte alignment philosophy of LLVM. After research with Dr. Google I found a solution from Embecosm and your approach and decided to follow this solution.
My question is:
How do you deal with the Int8PtrTy, AllocaInt8PtrTy and getInt8PtrTy, which are all over llvm and clang.
e.g.
Int8PtrTy = Int8Ty->getPointerTo(0);
Int8PtrPtrTy = Int8PtrTy->getPointerTo(0);
AllocaInt8PtrTy = Int8Ty->getPointerTo(
M.getDataLayout().getAllocaAddrSpace());
or
Int8Ptr(Type::getInt8PtrTy(Context)),
ResumeFnType(FunctionType::get(Type::getVoidTy(Context), Int8Ptr,
/*isVarArg=*/false)),
NullPtr(ConstantPointerNull::get(Int8Ptr)) {}
or
/// void* in address space 0
union {
llvm::PointerType *VoidPtrTy;
llvm::PointerType *Int8PtrTy;
};
I would appreciate your help (thomas at pietsch.info)
Thomas
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61725/new/
https://reviews.llvm.org/D61725
More information about the llvm-commits
mailing list