[PATCH] D66827: Add support for MS qualifiers __ptr32, __ptr64, __sptr, __uptr.

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 15:45:44 PDT 2019


akhuang added a comment.

I split off the backend changes into a separate patch -> https://reviews.llvm.org/D69639
The issue with passing 0 for a pointer should be fixed there.

@DarkShadow44 
Some of the differences come from the fact that we're implementing the mixed pointer sizes with three address spaces, which get printed out as `__ptr32_sptr`, `__ptr32_uptr`, and `__ptr64`. So they are intended but maybe also confusing.

> __ptr32_sptr doesn't exist and seems wrong

In this case it picks the address space __ptr32_sptr because it does sign extension by default.

> The __ptr32 part should be right of the asterisk

I think this happens because address spaces are attached to the pointee type and not the pointer.

> Why does PINT64 have PINT64 as type, but PINT32 not PINT32?

I'm not sure why this happens, but I can look into it later. It makes sense that PINT64 would work as it did before because on a 64-bit system adding __ptr64 doesn't do anything.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66827





More information about the llvm-commits mailing list