<html><body><p><font size="2">Hi Amol:</font><br><br><font size="2">Thanks for reporting this issue. </font><br><br><font size="2">I believe you are using *release* build of clang.</font><br><font size="2">If you use assert enabled clang, you should get an assert similar to this:</font><br><font size="2">clang-12: .../llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:252: int64_t (anonymous namespace)::PPCOperand::getImm() const: Assertion `Kind == Immediate && "Invalid access!"' failed.</font><br><br><font size="2">I would say this is somehow a *known limitation* of current asmparser -- the error detection/reporting mechanism is not that user friendly..</font><br><br><font size="2">I would recommend you open a bugzilla for future enhancement </font><a href="https://bugs.llvm.org/"><font size="2">https://bugs.llvm.org/</font></a><font size="2">. Thanks.</font><br><br><br><font size="2"><br>Best,<br><br>Jinsong Ji (ΌΝ½πΛΙ), PhD.<br><br>XL/LLVM on Power Compiler Development <br>E-mail: jji@us.ibm.com</font><br><br><img width="16" height="16" src="cid:1__=8FBB0C87DFC55E5D8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Amol via llvm-dev ---11/01/2020 09:20:29 AM---Hello, // 1.s"><font size="2" color="#424282">Amol via llvm-dev ---11/01/2020 09:20:29 AM---Hello, // 1.s</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Amol via llvm-dev <llvm-dev@lists.llvm.org></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">llvm-dev@lists.llvm.org</font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">11/01/2020 09:20 AM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">[EXTERNAL] [llvm-dev] [ppc64le] mfspr gpr, ABCD</font><br><font size="2" color="#5F5F5F">Sent by: </font><font size="2">"llvm-dev" <llvm-dev-bounces@lists.llvm.org></font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">Hello,<br><br>// 1.s<br>.abiversion 2<br>mfspr 8, ABCD<br>// clang -c -mcpu=power9 -target ppc64le 1.s<br><br>The command successfully assembles the source into an object file.<br><br>The disassembly shows the instruction emitted:<br>a6 1a 10 7d: mfspr 8, 112<br><br>112 is 0x70.<br><br>GNU as throws unsupported relocation error, and doesn't assemble.<br><br>This causes problems when a .S is passed to clang for preprocessing<br>and if the usage of a #define has a typo - clang doesn't catch it.<br><br><br>Thanks,<br>amol<br>_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org<br></font></tt><tt><font size="2"><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></font></tt><tt><font size="2"> <br><br></font></tt><br><br><BR>
</body></html>