<div dir="ltr">ok  i want to emit binary code for the following implemented vector assembly instructions.<div><br></div><div><div>P_256B_LOAD_DWORD<span style="white-space:pre">        </span>R_0_R2048b_0, pword ptr [rip + b]</div><div><span style="white-space:pre">     </span>P_256B_LOAD_DWORD<span style="white-space:pre">    </span>R_0_R2048b_1, pword ptr [rip + c]</div><div><span style="white-space:pre">     </span>P_256B_VADD<span style="white-space:pre">  </span>R_0_R2048b_0, R_0_R2048b_1, R_0_R2048b_0</div><div><span style="white-space:pre">      </span>P_256B_STORE_DWORD<span style="white-space:pre">   </span>pword ptr [rip + a], R_0_R2048b_0</div></div><div><br></div><div><br></div><div>when i used the command: llc -x86-asm-syntax=intel -debug -p-enabled=true -filetype=obj sum-vec03.ll>objpon 2>&1</div><div>i am getting the following error:</div><div><br></div><div><div>********** COMPUTING STACKMAP LIVENESS: foo **********</div><div>Unknown immediate size</div><div>UNREACHABLE executed at /lib/Target/X86/MCTargetDesc/X86BaseInfo.h:574!</div><div>#0 0x00000000019d9fec llvm::sys::PrintStackTrace(llvm::raw_ostream&) /lib/Support/Unix/Signals.inc:402:11</div><div>#1 0x00000000019da4d9 PrintStackTraceSignalHandler(void*) /lib/Support/Unix/Signals.inc:466:1</div><div>#2 0x00000000019d8853 llvm::sys::RunSignalHandlers() /lib/Support/Signals.cpp:0:5</div><div>#3 0x00000000019da834 SignalHandler(int) /lib/Support/Unix/Signals.inc:256:1</div><div>#4 0x00007f6d08f79d10 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10d10)</div><div>#5 0x00007f6d07f27267 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35267)</div><div>#6 0x00007f6d07f28eca abort (/lib/x86_64-linux-gnu/libc.so.6+0x36eca)</div><div>#7 0x000000000195f6c0 LLVMInstallFatalErrorHandler /lib/Support/ErrorHandling.cpp:133:0</div><div>#8 0x0000000000c08966 llvm::X86II::getSizeOfImm(unsigned long) /lib/Target/X86/MCTargetDesc/X86BaseInfo.h:577:29</div><div>#9 0x0000000000c04c2a (anonymous namespace)::X86MCCodeEmitter::encodeInstruction(llvm::MCInst const&, llvm::raw_ostream&, llvm::SmallVectorImpl<llvm::MCFixup>&, llvm::MCSubtargetInfo const&) const /lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1512:67</div><div>#10 0x00000000015884b3 llvm::MCELFStreamer::EmitInstToData(llvm::MCInst const&, llvm::MCSubtargetInfo const&) /lib/MC/MCELFStreamer.cpp:478:26</div><div>#11 0x00000000015aadc0 llvm::MCObjectStreamer::EmitInstruction(llvm::MCInst const&, llvm::MCSubtargetInfo const&) /lib/MC/MCObjectStreamer.cpp:245:5</div><div>#12 0x00000000007a036b llvm::X86AsmPrinter::EmitAndCountInstruction(llvm::MCInst&) /lib/Target/X86/X86MCInstLower.cpp:106:3</div><div>#13 0x00000000007a32dc llvm::X86AsmPrinter::EmitInstruction(llvm::MachineInstr const*) /lib/Target/X86/X86MCInstLower.cpp:1738:1</div><div>#14 0x0000000000dde226 llvm::AsmPrinter::EmitFunctionBody() /lib/CodeGen/AsmPrinter/AsmPrinter.cpp:943:11</div><div>#15 0x0000000000796e81 llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) /lib/Target/X86/X86AsmPrinter.cpp:73:3</div><div>#16 0x000000000104d441 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /lib/CodeGen/MachineFunctionPass.cpp:62:8</div><div>#17 0x00000000014766bf llvm::FPPassManager::runOnFunction(llvm::Function&) /lib/IR/LegacyPassManager.cpp:1513:27</div><div>#18 0x00000000014769d5 llvm::FPPassManager::runOnModule(llvm::Module&) /lib/IR/LegacyPassManager.cpp:1534:16</div><div>#19 0x000000000147716a (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /lib/IR/LegacyPassManager.cpp:1590:27</div><div>#20 0x0000000001476c96 llvm::legacy::PassManagerImpl::run(llvm::Module&) /lib/IR/LegacyPassManager.cpp:1693:16</div><div>#21 0x0000000001477681 llvm::legacy::PassManager::run(llvm::Module&) /lib/IR/LegacyPassManager.cpp:1724:3</div><div>#22 0x000000000076bbde compileModule(char**, llvm::LLVMContext&) /tools/llc/llc.cpp:530:42</div><div>#23 0x000000000076a0c9 main /tools/llc/llc.cpp:285:13</div><div>#24 0x00007f6d07f12a40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a40)</div><div>#25 0x0000000000769b99 _start (/bin/llc+0x769b99)</div><div>Stack dump:</div><div>0.<span style="white-space:pre">   </span>Program arguments: /bin/llc -x86-asm-syntax=intel -debug -p-enabled=true -filetype=obj sum-vec03.ll </div><div>1.<span style="white-space:pre">       </span>Running pass 'Function Pass Manager' on module 'sum-vec03.ll'.</div><div>2.<span style="white-space:pre">      </span>Running pass 'X86 Assembly Printer' on function '@foo'</div></div><div><br></div><div><br></div><div>What should I do? Please help.</div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 24, 2017 at 1:35 AM, hameeza ahmed <span dir="ltr"><<a href="mailto:hahmed2305@gmail.com" target="_blank">hahmed2305@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I have implemented some vector instructions ( greater vector width) in LLVM x86 backend. The llc is generating correct assembly. however to execute that on some target machine. i need object file. What changes do i need to do? do i need to put these new instructions and register info in MC framework to generate object code from .s assembly file?</div><div><br></div><div><br></div><div>Please help. I am stuck at this point.</div><div><br></div><div>Thank You</div><div>Regards</div></div>
</blockquote></div><br></div></div>