Juan Carlos Martinez Santos
2009-Oct-19 15:40 UTC
[LLVMdev] Using address space attribute in LLVM
Hello, What is the correct way to use address_space attribute? For CLANG, I used the below code, but when I tried the same with LLVM, I got a warning. Thanks in advance, Juan Carlos ----------------------------- Code used: #define GS_RELATIVE __attribute__((address_space(256))) int foo(int GS_RELATIVE *P) { return *P; } int main(){ return (1); } ------------------------------ LLVM messsage: ~/test$ llvm-gcc addrspace256.c -emit-llvm -o - addrspace256.c:2: warning: 'address_space' attribute directive ignored /tmp/ccpdq1E2.o: file not recognized: File format not recognized collect2: ld returned 1 exit status -- Juan Carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091019/bec9082e/attachment.html>
On Oct 19, 2009, at 8:40 AM, Juan Carlos Martinez Santos wrote:> Hello, > > What is the correct way to use address_space attribute? For CLANG, I > used the below code, but when I tried the same with LLVM, I got a > warning.llvm-gcc doesn't support address spaces. This is a clang-only feature. -Chris> > Thanks in advance, > > Juan Carlos > > ----------------------------- > > Code used: > > #define GS_RELATIVE __attribute__((address_space(256))) > int foo(int GS_RELATIVE *P) { > return *P; > } > int main(){ > return (1); > } > ------------------------------ > > LLVM messsage: > > ~/test$ llvm-gcc addrspace256.c -emit-llvm -o - > addrspace256.c:2: warning: 'address_space' attribute directive ignored > /tmp/ccpdq1E2.o: file not recognized: File format not recognized > collect2: ld returned 1 exit status > > > -- > Juan Carlos > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev