[PATCH] D124413: [llvm-ml] Improve indirect call parsing

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 05:59:41 PDT 2022


hans added inline comments.


================
Comment at: llvm/test/tools/llvm-ml/unconditional_branch_x64.asm:5
+
+fn_ref QWORD 28
+fn PROC
----------------
probably a silly question, but what's the 28 for?


================
Comment at: llvm/test/tools/llvm-ml/unconditional_branch_x64.asm:70
+; CHECK: jmp qword ptr [rip + fn]
\ No newline at end of file

----------------
These are great test cases!

Can we also have some tests where instead of jmp or call, "fn", "[fn]" etc. are moved into a register?
And should there be some tests with conditional jumps too?
It seems from this patch that they might be different, but in either case it seems good to cover that with tests.


================
Comment at: llvm/test/tools/llvm-ml/unconditional_branch_x86.asm:1
+; RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s
+
----------------
Since they're mostly the same, maybe instead of having separate test files for 32- and 64-bit, maybe it would be simpler to combine them into one. file with two "RUN" lines. 
You could use a macro to define e.g. "WORD" to "qword" or "dword", and use "CHECK32" and "CHECK64" for when the expectations are different.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124413



More information about the llvm-commits mailing list