[PATCH] Add pointer types to global named register

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu May 29 10:58:24 PDT 2014


Please include a test with the new error.

I like Joeg and Reid suggestion of rejecting invalid sizes. For
example, a pointer should not go to eax on x86_64, but I think that
requires extra llvm support, no? If so, this patch LGTM, but please do
address their suggestion in a subsequent patch.

Thanks,
Rafael




On 27 May 2014 05:58, Renato Golin <renato.golin at linaro.org> wrote:
> Hi rnk, rafael,
>
> This patch adds support for pointer types in global named registers variables.
> It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls.
> Also adds some early checks on types on SemaDecl to avoid the assert.
>
> Tests changed accordingly. (PR19837)
>
> http://reviews.llvm.org/D3919
>
> Files:
>   include/clang/Basic/DiagnosticSemaKinds.td
>   lib/CodeGen/CGExpr.cpp
>   lib/Sema/SemaDecl.cpp
>   test/CodeGen/named_reg_global.c



More information about the cfe-commits mailing list