[PATCH] D141130: [UpdateTestChecks] Add wasm64 target

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 05:58:43 PST 2023


luke created this revision.
luke added reviewers: dschuff, sunfish.
Herald added subscribers: luismarques, pmatos, arichardson.
Herald added a project: All.
luke requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

wasm32 was already supported, so here I've just reused the same regex. I'm not sure if this is actually correct: I don't know for certain if wasm32 and wasm64 have different output formats, but it seems to work.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141130

Files:
  llvm/utils/UpdateTestChecks/asm.py


Index: llvm/utils/UpdateTestChecks/asm.py
===================================================================
--- llvm/utils/UpdateTestChecks/asm.py
+++ llvm/utils/UpdateTestChecks/asm.py
@@ -172,7 +172,7 @@
     r'^[ \t]*@[ \t]--[ \t]End[ \t]function',
     flags=(re.M | re.S))
 
-ASM_FUNCTION_WASM32_RE = re.compile(
+ASM_FUNCTION_WASM_RE = re.compile(
     r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n'
     r'(?P<body>.*?)\n'
     r'^\s*(\.Lfunc_end[0-9]+:\n|end_function)',
@@ -413,7 +413,7 @@
   asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
   return asm
 
-def scrub_asm_wasm32(asm, args):
+def scrub_asm_wasm(asm, args):
   # Scrub runs of whitespace out of the assembly, but leave the leading
   # whitespace in place.
   asm = common.SCRUB_WHITESPACE_RE.sub(r' ', asm)
@@ -509,7 +509,8 @@
       'lanai': (scrub_asm_lanai, ASM_FUNCTION_LANAI_RE),
       'sparc': (scrub_asm_sparc, ASM_FUNCTION_SPARC_RE),
       's390x': (scrub_asm_systemz, ASM_FUNCTION_SYSTEMZ_RE),
-      'wasm32': (scrub_asm_wasm32, ASM_FUNCTION_WASM32_RE),
+      'wasm32': (scrub_asm_wasm, ASM_FUNCTION_WASM_RE),
+      'wasm64': (scrub_asm_wasm, ASM_FUNCTION_WASM_RE),
       've': (scrub_asm_ve, ASM_FUNCTION_VE_RE),
       'csky': (scrub_asm_csky, ASM_FUNCTION_CSKY_RE),
       'nvptx': (scrub_asm_nvptx, ASM_FUNCTION_NVPTX_RE),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141130.486843.patch
Type: text/x-patch
Size: 1333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230106/632f0afb/attachment.bin>


More information about the llvm-commits mailing list