[RFC] Add x32 psABI support

Hi,

Here is the resubmitting of x32 psABI[1] patches against the latest
trunk for code review after the patches[2] to LLVM.

Looking forward to your comments.

Thanks
- Michael

- add '-mx32' option
- add linker/gcc-runtime support for x32 psABI

under x86-64 target, based on whether x32 psABI is turned on or off
- populate '_ILP32'/'__ILP32__' or '_LP64/__LP64__'
- set correct widths for data types
- add special handling of sret where pointer types could be packed
  with other 32-bit integer types into a single register
- detect target directly from target arch from target triple instead of
  pointer width

0001-start-x32-psABI-support.patch (3.58 KB)

- revise/add test cases where x32ps ABI will generate different code
  due to pointer size change

0002-revise-codegen-test-for-x32-psABI.patch (3.28 KB)

wrong patch is attached, here is the patch 1/2 to clang.

Sorry
- Michael

0001-add-x32-psABI-support.patch (15.3 KB)

Hi,

Has anyone got chance to review this patch adding x32 psABI support?

Yours
- Michael

Michael,
Please attach the patches directly to the email.

Chad