Runtime for ARM

Paolo Invernizzi pinver at pinver.com
Tue May 14 20:30:10 PDT 2013


On Friday, 15 February 2013 at 15:51:20 UTC, Kai Nacke wrote:
>
>
> As to my knowledge there is no tutorial or patch list.
>
> From my experience with PowerPC-64bit I can tell you that one 
> of the first things you need to do is checking the vararg 
> interface (core.vararg, core.stdc.stdarg). It is imported in 
> many files - you get a lot of compile errors if this is 
> missing/not working.
>
> Next step in druntime is to look at thread support and GC. For 
> ARM, there is already some code. Maybe it works out of the box. 
> (You can also choose to postpone this work and use the dummy GC 
> as I did.)

Hi Kai,

Right now the first problem is that I've a bunch of:

   Assertion failed: (size >= excess && "expected larger existing 
stack allocation"), function HandleByVal, file 
ARMISelLowering.cpp, line 1681.

In the runtime they are in the debug version (for example, trying 
to build aAA.d), that can avoid,
but in phobos they are in the release version also (for example, 
in std.conv).

I'm not sure if this is a ldc problem or llvm problem... full 
stack below.

Cheers, Paolo

Assertion failed: (size >= excess && "expected larger existing 
stack allocation"), function HandleByVal, file 
ARMISelLowering.cpp, line 1681.
0  ldc2              0x000000010bcaf819 PrintStackTrace(void*) + 
37
1  ldc2              0x000000010bcafbac SignalHandler(int) + 241
2  libsystem_c.dylib 0x00007fff8c4148ea _sigtramp + 26
3  ldc2              0x000000010b81c8c1 
AddNodeIDCustom(llvm::FoldingSetNodeID&, llvm::SDNode const*) + 
823
4  ldc2              0x000000010bcafa24 abort + 22
5  ldc2              0x000000010bcafa0e abort + 0
6  ldc2              0x000000010b639322 
llvm::ARMTargetLowering::LowerReturn(llvm::SDValue, 
llvm::CallingConv::ID, bool, 
llvm::SmallVectorImpl<llvm::ISD::OutputArg> const&, 
llvm::SmallVectorImpl<llvm::SDValue> const&, llvm::DebugLoc, 
llvm::SelectionDAG&) const + 0
7  ldc2              0x000000010b8d6bff 
llvm::CCState::HandleByVal(unsigned int, llvm::MVT, llvm::MVT, 
llvm::CCValAssign::LocInfo, int, int, llvm::ISD::ArgFlagsTy) + 127
8  ldc2              0x000000010b63573a CC_ARM_AAPCS(unsigned 
int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, 
llvm::ISD::ArgFlagsTy, llvm::CCState&) + 80
9  ldc2              0x000000010b8d7010 
llvm::CCState::AnalyzeCallOperands(llvm::SmallVectorImpl<llvm::ISD::OutputArg> 
const&, bool (*)(unsigned int, llvm::MVT, llvm::MVT, 
llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, 
llvm::CCState&)) + 108
10 ldc2              0x000000010b636907 
llvm::ARMTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, 
llvm::SmallVectorImpl<llvm::SDValue>&) const + 593
11 ldc2              0x000000010b85a1b8 
llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) 
const + 2004
12 ldc2              0x000000010b84b360 
llvm::SelectionDAGBuilder::LowerCallTo(llvm::ImmutableCallSite, 
llvm::SDValue, bool, llvm::MachineBasicBlock*) + 1676
13 ldc2              0x000000010b83fefd 
llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 563
14 ldc2              0x000000010b83b78c 
llvm::SelectionDAGBuilder::visit(unsigned int, llvm::User const&) 
+ 856
15 ldc2              0x000000010b83af13 
llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 71
16 ldc2              0x000000010b86a81d 
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction 
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 33
17 ldc2              0x000000010b86a5d6 
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function 
const&) + 3490
18 ldc2              0x000000010b8690be 
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) 
+ 734
19 ldc2              0x000000010b92d870 
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 48
20 ldc2              0x000000010bc3f8a0 
llvm::FPPassManager::runOnFunction(llvm::Function&) + 292
21 ldc2              0x000000010bc3f35b 
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 87
22 ldc2              0x000000010bc3f20d 
llvm::FunctionPassManager::run(llvm::Function&) + 89
23 ldc2              0x000000010b2cd167 
emit_file(llvm::TargetMachine&, llvm::Module&, 
llvm::raw_fd_ostream&, llvm::TargetMachine::CodeGenFileType) + 343
24 ldc2              0x000000010b2ccb3a 
writeModule(llvm::Module*, std::string) + 1066
25 ldc2              0x000000010b2d5c6f main + 11279
26 libdyld.dylib     0x00007fff9785b7e1 start + 0
27 libdyld.dylib     0x000000000000000f start + 
18446603337974040622
Stack dump:
0.	Running pass 'ARM Instruction Selection' on function 
'@_D3std4conv16testEmplaceChunkFAvkkAyaZv'
/bin/sh: line 1: 14339 Illegal instruction: 4  
/Users/Melkor/Tmp/ldc-trunk/ldc/barm1/bin/ldc2 --output-o -c 
-I/Users/Melkor/Projects/External/druntime/src 
-I/Users/Melkor/Projects/External/druntime/src/gc 
/Users/Melkor/Projects/External/phobos/std/conv.d 
-of/Users/Melkor/Tmp/ldc-trunk/ldc/barm1/runtime/std/conv.o -w -d 
-march=arm -mtriple=arm-linux-gnueabi -d-version=LDC_LLVM_303 -O3 
-release -I/Users/Melkor/Projects/External/phobos



More information about the digitalmars-d-ldc mailing list