Alexey Samsonov
2013-Aug-22 07:29 UTC
[LLVMdev] [cfe-dev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Ah, I've replied in a different thread already. What Dmitri says - If you're interesting in only building the Clang on x32 host, you may avoid checking out compiler-rt repo for now. On Thu, Aug 22, 2013 at 10:59 AM, Dmitri Gribenko <gribozavr at gmail.com>wrote:> On Wed, Aug 21, 2013 at 11:04 PM, Steven Newbury <steve at snewbury.org.uk> > wrote: > > I've been trying > > to get x32 ABI support working in Clang and compiler-rt, I based off the > > previous clang patch, bringing it up to date with the changes in trunk, > > and hacked together handling of x32 "ARCH" support for compiler-rt. > > (there must be a better way??) > > If you are just trying to get basic things working, you don't need to > port compiler-rt immediately. It is still pretty important (for > example, to support features like Address Sanitizer), but not critical > -- you will still get a useable Clang without building compiler-rt. > > Dmitri > > -- > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/ > _______________________________________________ > cfe-dev mailing list > cfe-dev at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev >-- Alexey Samsonov, MSK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130822/114063e2/attachment.html>
Steven Newbury
2013-Aug-22 08:02 UTC
[LLVMdev] [cfe-dev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Thu, 2013-08-22 at 11:29 +0400, Alexey Samsonov wrote:> Ah, I've replied in a different thread already. What Dmitri says - If > you're interesting in only building the Clang on x32 host, you may avoid > checking out compiler-rt repo for now. > >compiler-rt does make a convenient compiler test though.. :) fatal error: error in backend: Cannot select: 0x30ccf38: ch = brind 0x30cccf8:1, 0x30cc368 [ORD=109] [ID=11] 0x30cc368: i32 = add 0x30cccf8, 0x30cc518 [ORD=109] [ID=10] 0x30cccf8: i32,ch = load 0x30cc2d8:1, 0x30ccfc8, 0x30cc6c8<LD4[JumpTable]> [ORD=109] [ID=9] 0x30ccfc8: i32 = add 0x30cc5a8, 0x30cc518 [ORD=109] [ID=8] 0x30cc5a8: i32 = shl 0x30cc2d8, 0x30ccc68 [ORD=109] [ID=7] 0x30cc2d8: i32,ch = CopyFromReg 0x30a6168, 0x30cc908 [ORD=109] [ID=5] 0x30cc908: i32 = Register %vreg29 [ID=1] 0x30ccc68: i8 = Constant<2> [ID=4] 0x30cc518: i32 = X86ISD::WrapperRIP 0x30ccab8 [ID=6] 0x30ccab8: i32 = TargetJumpTable<0> [ID=3] 0x30cc6c8: i32 = undef [ID=2] 0x30cc518: i32 = X86ISD::WrapperRIP 0x30ccab8 [ID=6] 0x30ccab8: i32 = TargetJumpTable<0> [ID=3] In function: __atomic_compare_exchange clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 3.4 (trunk) Target: x86_64-pc-linux-gnux32 Thread model: posix This is what happens when compiling compiler-rt with -m64 or -mx32, exact same error without my patches (where -mx32 is supported). However, I know -mx32 isn't working since the objects always end up elf_x86_64, which is why I known this is a somewhat unrelated bug.
Steven Newbury
2013-Aug-22 08:12 UTC
[LLVMdev] [cfe-dev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
On Thu, 2013-08-22 at 09:02 +0100, Steven Newbury wrote:> On Thu, 2013-08-22 at 11:29 +0400, Alexey Samsonov wrote: > > Ah, I've replied in a different thread already. What Dmitri says - If > > you're interesting in only building the Clang on x32 host, you may avoid > > checking out compiler-rt repo for now. > > > > > compiler-rt does make a convenient compiler test though.. :) > > fatal error: error in backend: Cannot select: 0x30ccf38: ch = brind > 0x30cccf8:1, 0x30cc368 [ORD=109] [ID=11] > 0x30cc368: i32 = add 0x30cccf8, 0x30cc518 [ORD=109] [ID=10] > 0x30cccf8: i32,ch = load 0x30cc2d8:1, 0x30ccfc8, > 0x30cc6c8<LD4[JumpTable]> [ORD=109] [ID=9] > 0x30ccfc8: i32 = add 0x30cc5a8, 0x30cc518 [ORD=109] [ID=8] > 0x30cc5a8: i32 = shl 0x30cc2d8, 0x30ccc68 [ORD=109] [ID=7] > 0x30cc2d8: i32,ch = CopyFromReg 0x30a6168, 0x30cc908 [ORD=109] > [ID=5] > 0x30cc908: i32 = Register %vreg29 [ID=1] > 0x30ccc68: i8 = Constant<2> [ID=4] > 0x30cc518: i32 = X86ISD::WrapperRIP 0x30ccab8 [ID=6] > 0x30ccab8: i32 = TargetJumpTable<0> [ID=3] > 0x30cc6c8: i32 = undef [ID=2] > 0x30cc518: i32 = X86ISD::WrapperRIP 0x30ccab8 [ID=6] > 0x30ccab8: i32 = TargetJumpTable<0> [ID=3] > In function: __atomic_compare_exchange > clang: error: clang frontend command failed with exit code 70 (use -v to > see invocation) > clang version 3.4 (trunk) > Target: x86_64-pc-linux-gnux32 > Thread model: posix > > This is what happens when compiling compiler-rt with -m64 or -mx32, > exact same error without my patches (where -mx32 is supported). > However, I know -mx32 isn't working since the objects always end up > elf_x86_64, which is why I known this is a somewhat unrelated bug. >I should add, with -m32, the same clang compiles atomic.c without error.
Maybe Matching Threads
- [LLVMdev] [cfe-dev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
- Incompatible type assertion from llvm-tblgen
- Incompatible type assertion from llvm-tblgen
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
- [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64