Add "w" constraint type which allows selecting 32 bit registers.
32 bit registers were added in https://reviews.llvm.org/rGca31c3bb3ff149850b664838fbbc7d40ce571879.
Paths
| Differential D102118
[BPF] add support for 32 bit registers in inline asm ClosedPublic Authored by alessandrod on May 8 2021, 5:52 PM.
Details Summary Add "w" constraint type which allows selecting 32 bit registers. 32 bit registers were added in https://reviews.llvm.org/rGca31c3bb3ff149850b664838fbbc7d40ce571879.
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 8 2021, 5:52 PM Comment Actions Generally looks good. One suggestion and a few nits. Thanks!
Comment Actions LGTM except one minor issue. Please do address the nit before merging. Thanks!
This revision is now accepted and ready to land.May 15 2021, 9:25 AM Comment Actions
Done, thanks for the review! I don't have commit access so someone will have to merge this for me :) Closed by commit rG833e9b2ea7a7: [BPF] add support for 32 bit registers in inline asm (authored by alessandrod, committed by yonghong-song). · Explain WhyMay 16 2021, 11:03 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 345717 clang/lib/Basic/Targets/BPF.h
clang/lib/Basic/Targets/BPF.cpp
clang/test/CodeGen/bpf-inline-asm.c
llvm/lib/Target/BPF/BPFISelLowering.h
llvm/lib/Target/BPF/BPFISelLowering.cpp
llvm/test/CodeGen/BPF/inlineasm-wreg.ll
|
-mcpu=v3 also enables alu32. See below llvm code
Could you add a check with setCPU() to set HasAlu32 = true if it is v3? This way, when people directly use -mcpu=v3 in clang command line, 'w' constraint is also supported.