<div dir="ltr">Hi all,<div><br></div><div>I've been trying to extend pointer size of the X86 target to 128 bits. For the prortype, I would like nothing more than the pointers being i128 type with the same value as before. All I've done was changing the data layout string to p:128:128 and when trying to run a basic program such as:<br><br>int a = 42;<br>int *p = &a;</div><div><br></div><div>it segfaults with the following stack trace:</div><div><br></div><div><div>#0 0x00000000013eff7a llvm::sys::PrintStackTrace(llvm::raw_ostream&) </div><div>/afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Unix/Signals.inc:402:0">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Unix/Signals.inc:402:0</a></div><div>#1 0x00000000013ee20e llvm::sys::RunSignalHandlers() /afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Signals.cpp:50:0">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Signals.cpp:50:0</a></div><div>#2 0x00000000013ee34a SignalHandler(int) /afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Unix/Signals.inc:242:0">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Unix/Signals.inc:242:0</a></div><div>#3 0x00007fad6b434370 __restore_rt (/lib64/libpthread.so.0+0xf370)</div><div>#4 0x0000000001ba1734 llvm::DAGTypeLegalizer::PromoteIntOp_ATOMIC_STORE(llvm::AtomicSDNode*) </div><div>/afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1025:0">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1025:0</a></div><div>Stack dump:</div><div>0. Program arguments: /afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/bin/clang-6.0">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/bin/clang-6.0</a> -cc1 -triple x86_64-unknown-linux-gnu -emit-obj </div><div>-mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name simple.c -mrelocation-model static -mthread-model posix </div><div>-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info </div><div>-debugger-tuning=gdb -resource-dir /afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/lib/clang/6.0.0">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/lib/clang/6.0.0</a> -internal-isystem /usr/local/include </div><div>-internal-isystem /afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/lib/clang/6.0.0/include">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/lib/clang/6.0.0/include</a> -internal-externc-isystem /include </div><div>-internal-externc-isystem /usr/include -fdebug-compilation-dir /afs/<a href="http://inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build">inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build</a> -ferror-limit 19 -fmessage-length </div><div>159 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/simple-2837aa.o -x c ../copy/simple.c </div><div>1. <eof> parser at end of file</div><div>2. Code generation</div><div>3. Running pass 'Function Pass Manager' on module '../copy/simple.c'.</div><div>4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'</div><div>clang-6.0: error: unable to execute command: Segmentation fault</div><div>clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation)</div><div><br></div><div>Now I know almost nothing about LLVM, but I assumed that since X86 target has SSE extensions, it wouldn't have a problem with a 128-bit value type in general. I would really appreciate any explanations and pointers you can give me. Sorry for such a general question.<br><br>Best wishes,<br>Barbora</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><font size="1" color="#999999">----------------</font></div><div><font size="1" color="#999999">Barbora Murinová</font></div><div><font size="1" color="#999999">The University of Edinburgh</font></div><div><font size="1" color="#999999">SK: +421905718390<br>UK: +447477833795</font></div></div></div>
</div></div>