[PATCH] D154734: [WebAssembly] Report error for inline assembly with unsupported opcodes

David Mo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 12:08:03 PDT 2023


mojingran added a comment.

In D154734#4481570 <https://reviews.llvm.org/D154734#4481570>, @sbc100 wrote:

> In D154734#4481538 <https://reviews.llvm.org/D154734#4481538>, @mojingran wrote:
>
>> In D154734#4481515 <https://reviews.llvm.org/D154734#4481515>, @sbc100 wrote:
>>
>>> Nice!  Can we get a test for this?
>>
>> I just added you as a reviewer in the test patch :)
>
> Thanks.  Wouldn't it be better to add the test in the same patch as the change its testing?

I followed this guide <https://developers.redhat.com/articles/2022/12/20/how-contribute-llvm#posting_the_patch_for_review>



================
Comment at: llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp:129
+              SMLoc(),
+              Twine("Wasm globals should only be accessed symbolically!"));
         default:
----------------
sbc100 wrote:
> Is this error specific to inline assembly?
> 
> Looking at `global_set_expected_expression_operand` in `llvm/test/MC/WebAssembly/type-checker-errors.s` I see a different error.. so I guess maybe it fails before it gets here in the case to non-inline assembly?
> 
> I wonder if we shouldn't just allow this.. even though its kind odd to want to do it.. 
Noted, I tried llvm-mc on the assembly generated from my testcase, and it is also giving a different error. I am not sure why it is behaving differently if we split up the 2 stages.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154734/new/

https://reviews.llvm.org/D154734



More information about the llvm-commits mailing list