[PATCH] D81517: Extend or truncate __ptr32/__ptr64 pointers when dereferenced.

John Reagan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 05:58:25 PDT 2020


JohnReagan added a comment.

Thanks for tackling this.  Again, comparing this to what I have on my proprietary system with dual sized pointers, I have some observations (and some confusions on my part I'm sure)

For 32-bit targets, can you even talk about ptr64?  My old 32-bit platforms don't allow it at all.  However, your custom lowering for 32-bit targets seems to imply that you want to support ptr64 containers on 32-bit platforms by always truncating them.  Or is the model that a 32-bit target would simply not use those two address spaces and therefore not generate the size/zero extension?

I'm not sure what "custom" means but you only set that for 32-bit targets.  Does that mean the zero/sign-extension on the load doesn't occur for 64-bit targets?  You still want to zero/sign-extend a ptr32 in a 64-bit target, yes?  From what I think I read, the truncation of ptr32 for the store will only be for on 32-bit targets.

My memory was that you'd be able to mix-and-match ptr32 and ptr64 on 64-bit targets since you still need ptr32 to deal with legacy OS interfaces and such.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81517/new/

https://reviews.llvm.org/D81517





More information about the llvm-commits mailing list