Browse Source

Use WASM function names in compiled objects (#8627)

* Use WASM function names in compiled objects

Instead of generating symbol names in the format
"wasm[$MODULE_ID]::function[$FUNCTION_INDEX]", generate (if possible)
something more readable, such as "wasm[$MODULE_ID]::$FUNCTION_NAME".
This helps when debugging or profiling the generated code.

Co-authored-by: Jamey Sharp <jsharp@fastly.com>

* Ensure symbol names are cleaned up and have function indexes

Filter symbol names to include only characters that are usually used
for function names, and that might be produced by name mangling.
Replace everything else with a question mark (and all repeated question
marks by a single one), and then truncate to a length of 96 characters.

This should be enough to not only avoid passing user-controlled strings
to tools such as "perf" and "objdump", and make it easier to
disambiguate symbols that might have the same name but different
indices.

* Make symbol cleaning slightly more efficient

* Update symbol names to be closer to what tests expect

* Ensure only alphanumeric ASCII characters are allowed in a symbol name

* Ensure sliced symbol name is within its bounds

* Update test expectations after adding function name to symbol name

---------

Co-authored-by: Jamey Sharp <jsharp@fastly.com>
pull/8640/head
L. Pereira 6 months ago
committed by GitHub
parent
commit
cd8bd0d5b9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 51
      crates/wasmtime/src/compile.rs
  2. 2
      tests/disas/winch/x64/block/as_if_cond.wat
  3. 2
      tests/disas/winch/x64/block/deep.wat
  4. 2
      tests/disas/winch/x64/block/empty.wat
  5. 2
      tests/disas/winch/x64/block/nested.wat
  6. 2
      tests/disas/winch/x64/br/as_block_first.wat
  7. 2
      tests/disas/winch/x64/br/as_block_last.wat
  8. 2
      tests/disas/winch/x64/br/as_block_mid.wat
  9. 2
      tests/disas/winch/x64/br/as_block_value.wat
  10. 2
      tests/disas/winch/x64/br/as_call_all.wat
  11. 2
      tests/disas/winch/x64/br/as_call_first.wat
  12. 2
      tests/disas/winch/x64/br/as_call_last.wat
  13. 2
      tests/disas/winch/x64/br/as_call_mid.wat
  14. 2
      tests/disas/winch/x64/br/as_loop_last.wat
  15. 2
      tests/disas/winch/x64/br/as_loop_mid.wat
  16. 2
      tests/disas/winch/x64/br_if/as_block_last.wat
  17. 2
      tests/disas/winch/x64/br_if/as_block_last_value.wat
  18. 2
      tests/disas/winch/x64/br_if/as_call_first.wat
  19. 2
      tests/disas/winch/x64/br_if/as_call_last.wat
  20. 2
      tests/disas/winch/x64/br_if/as_call_mid.wat
  21. 2
      tests/disas/winch/x64/br_if/as_if_else.wat
  22. 2
      tests/disas/winch/x64/br_if/as_if_then.wat
  23. 2
      tests/disas/winch/x64/br_if/as_loop_last.wat
  24. 2
      tests/disas/winch/x64/call/params.wat
  25. 2
      tests/disas/winch/x64/call/recursive.wat
  26. 4
      tests/disas/winch/x64/call/simple.wat
  27. 2
      tests/disas/winch/x64/f32_const/call_id.wat
  28. 2
      tests/disas/winch/x64/f64_const/call_id.wat
  29. 2
      tests/disas/winch/x64/if/as_binop.wat
  30. 2
      tests/disas/winch/x64/if/as_br_if_last.wat
  31. 2
      tests/disas/winch/x64/if/as_if_cond.wat
  32. 2
      tests/disas/winch/x64/if/as_testop.wat
  33. 2
      tests/disas/winch/x64/if/nested.wat
  34. 2
      tests/disas/winch/x64/if/singular.wat
  35. 2
      tests/disas/winch/x64/loop/as_binary_operand.wat
  36. 2
      tests/disas/winch/x64/loop/as_call_value.wat
  37. 2
      tests/disas/winch/x64/loop/as_if_condition.wat
  38. 2
      tests/disas/winch/x64/loop/as_test_operand.wat
  39. 2
      tests/disas/winch/x64/loop/as_unary_operand.wat
  40. 2
      tests/disas/winch/x64/loop/deep.wat
  41. 2
      tests/disas/winch/x64/loop/effects.wat
  42. 2
      tests/disas/winch/x64/loop/multi.wat
  43. 2
      tests/disas/winch/x64/loop/nested.wat
  44. 2
      tests/disas/winch/x64/return/as_block_first.wat
  45. 2
      tests/disas/winch/x64/return/as_block_last.wat
  46. 2
      tests/disas/winch/x64/return/as_block_mid.wat
  47. 2
      tests/disas/winch/x64/return/as_block_value.wat
  48. 2
      tests/disas/winch/x64/return/as_br_if_cond.wat
  49. 2
      tests/disas/winch/x64/return/as_br_value.wat
  50. 2
      tests/disas/winch/x64/return/as_call_fist.wat
  51. 2
      tests/disas/winch/x64/return/as_call_last.wat
  52. 2
      tests/disas/winch/x64/return/as_call_mid.wat
  53. 2
      tests/disas/winch/x64/return/as_func_first.wat
  54. 2
      tests/disas/winch/x64/return/as_func_last.wat
  55. 2
      tests/disas/winch/x64/return/as_func_mid.wat
  56. 2
      tests/disas/winch/x64/return/as_func_value.wat
  57. 2
      tests/disas/winch/x64/return/as_if_cond.wat
  58. 2
      tests/disas/winch/x64/return/as_if_else.wat
  59. 2
      tests/disas/winch/x64/return/as_if_then.wat
  60. 2
      tests/disas/winch/x64/return/as_loop_first.wat
  61. 2
      tests/disas/winch/x64/return/as_loop_last.wat
  62. 2
      tests/disas/winch/x64/return/as_loop_mid.wat
  63. 2
      tests/disas/winch/x64/return/as_return_value.wat
  64. 2
      tests/disas/winch/x64/return/nullary.wat
  65. 2
      tests/disas/winch/x64/return/type_i32.wat
  66. 2
      tests/disas/winch/x64/return/type_i64_value.wat
  67. 6
      tests/disas/winch/x64/table/fill.wat
  68. 4
      tests/disas/winch/x64/table/get.wat
  69. 2
      tests/disas/winch/x64/table/set.wat
  70. 2
      tests/disas/winch/x64/unreachable/as_block_broke.wat
  71. 2
      tests/disas/winch/x64/unreachable/as_block_last.wat
  72. 2
      tests/disas/winch/x64/unreachable/as_block_mid.wat
  73. 2
      tests/disas/winch/x64/unreachable/as_block_value.wat
  74. 2
      tests/disas/winch/x64/unreachable/as_call_first.wat
  75. 2
      tests/disas/winch/x64/unreachable/as_call_last.wat
  76. 2
      tests/disas/winch/x64/unreachable/as_call_mid.wat
  77. 2
      tests/disas/winch/x64/unreachable/as_func_first.wat
  78. 2
      tests/disas/winch/x64/unreachable/as_func_last.wat
  79. 2
      tests/disas/winch/x64/unreachable/as_func_mid.wat
  80. 2
      tests/disas/winch/x64/unreachable/as_func_value.wat
  81. 2
      tests/disas/winch/x64/unreachable/as_loop_broke.wat
  82. 2
      tests/disas/winch/x64/unreachable/as_loop_last.wat
  83. 2
      tests/disas/winch/x64/unreachable/as_loop_mid.wat

51
crates/wasmtime/src/compile.rs

@ -27,6 +27,7 @@ use crate::Engine;
use anyhow::{Context, Result};
use std::{
any::Any,
borrow::Cow,
collections::{btree_map, BTreeMap, BTreeSet, HashMap, HashSet},
mem,
};
@ -419,6 +420,35 @@ impl<'a> CompileInputs<'a> {
ret
}
fn clean_symbol(name: &str) -> Cow<str> {
/// Maximum length of symbols generated in objects.
const MAX_SYMBOL_LEN: usize = 96;
// Just to be on the safe side, avoid passing user-provided data to tools
// like "perf" or "objdump", and filter the name. Let only characters usually
// used for function names, plus some characters that might be used in name
// mangling.
let bad_char = |c: char| !c.is_ascii_alphanumeric() && !r"<>[]_-:@$".contains(c);
if name.chars().any(bad_char) {
let mut last_char_seen = '\u{0000}';
Cow::Owned(
name.chars()
.map(|c| if bad_char(c) { '?' } else { c })
.filter(|c| {
let skip = last_char_seen == '?' && *c == '?';
last_char_seen = *c;
!skip
})
.take(MAX_SYMBOL_LEN)
.collect::<String>(),
)
} else if name.len() <= MAX_SYMBOL_LEN {
Cow::Borrowed(&name[..])
} else {
Cow::Borrowed(&name[..MAX_SYMBOL_LEN])
}
}
fn collect_inputs_in_translations(
&mut self,
types: &'a ModuleTypesBuilder,
@ -436,13 +466,28 @@ impl<'a> CompileInputs<'a> {
let func_index = translation.module.func_index(def_func_index);
let (info, function) =
compiler.compile_function(translation, def_func_index, func_body, types)?;
Ok(CompileOutput {
key: CompileKey::wasm_function(module, def_func_index),
symbol: format!(
let symbol = match translation
.debuginfo
.name_section
.func_names
.get(&func_index)
{
Some(name) => format!(
"wasm[{}]::function[{}]::{}",
module.as_u32(),
func_index.as_u32(),
Self::clean_symbol(&name)
),
None => format!(
"wasm[{}]::function[{}]",
module.as_u32(),
func_index.as_u32()
),
};
Ok(CompileOutput {
key: CompileKey::wasm_function(module, def_func_index),
symbol,
function: CompiledFunction::Function(function),
info: Some(info),
})

2
tests/disas/winch/x64/block/as_if_cond.wat

@ -8,7 +8,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/block/deep.wat

@ -45,7 +45,7 @@
))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/block/empty.wat

@ -9,7 +9,7 @@
(block $l)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/block/nested.wat

@ -10,7 +10,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_block_first.wat

@ -7,7 +7,7 @@
(block (br 0) (call $dummy))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_block_last.wat

@ -7,7 +7,7 @@
(block (nop) (call $dummy) (br 0))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_block_mid.wat

@ -7,7 +7,7 @@
(block (call $dummy) (br 0) (call $dummy))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_block_value.wat

@ -7,7 +7,7 @@
(block (result i32) (nop) (call $dummy) (br 0 (i32.const 2)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_call_all.wat

@ -6,7 +6,7 @@
(block (result i32) (call $f (br 0 (i32.const 15))))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_call_first.wat

@ -9,7 +9,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_call_last.wat

@ -8,7 +8,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_call_mid.wat

@ -9,7 +9,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_loop_last.wat

@ -8,7 +8,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br/as_loop_mid.wat

@ -9,7 +9,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_block_last.wat

@ -6,7 +6,7 @@
(block (call $dummy) (call $dummy) (br_if 0 (local.get 0)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_block_last_value.wat

@ -8,7 +8,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_call_first.wat

@ -10,7 +10,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_call_last.wat

@ -10,7 +10,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_call_mid.wat

@ -10,7 +10,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_if_else.wat

@ -9,7 +9,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_if_then.wat

@ -8,7 +8,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/br_if/as_loop_last.wat

@ -6,7 +6,7 @@
(loop (call $dummy) (br_if 1 (local.get 0)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/call/params.wat

@ -119,7 +119,7 @@
;; retq
;; 152: ud2
;;
;; wasm[0]::function[1]:
;; wasm[0]::function[1]::add:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/call/recursive.wat

@ -23,7 +23,7 @@
)
(export "fib" (func $fibonacci8))
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::fibonacci8:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

4
tests/disas/winch/x64/call/simple.wat

@ -14,7 +14,7 @@
(local.get 1)
(i32.mul))
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::main:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11
@ -53,7 +53,7 @@
;; retq
;; 8b: ud2
;;
;; wasm[0]::function[1]:
;; wasm[0]::function[1]::product:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/f32_const/call_id.wat

@ -5,7 +5,7 @@
(func $id-f32 (param f32) (result f32) (local.get 0))
(func (export "type-first-f32") (result f32) (call $id-f32 (f32.const 1.32)))
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::id-f32:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/f64_const/call_id.wat

@ -5,7 +5,7 @@
(func $id-f64 (param f64) (result f64) (local.get 0))
(func (export "type-first-f64") (result f64) (call $id-f64 (f64.const 1.32)))
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::id-f64:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/if/as_binop.wat

@ -16,7 +16,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/if/as_br_if_last.wat

@ -15,7 +15,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/if/as_if_cond.wat

@ -13,7 +13,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/if/as_testop.wat

@ -11,7 +11,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/if/nested.wat

@ -23,7 +23,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/if/singular.wat

@ -9,7 +9,7 @@
(if (result i32) (local.get 0) (then (i32.const 7)) (else (i32.const 8)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/as_binary_operand.wat

@ -9,7 +9,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/as_call_value.wat

@ -6,7 +6,7 @@
(call $f (loop (result i32) (i32.const 1)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/as_if_condition.wat

@ -6,7 +6,7 @@
(loop (result i32) (i32.const 1)) (if (then (call $dummy)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/as_test_operand.wat

@ -6,7 +6,7 @@
(i32.eqz (loop (result i32) (call $dummy) (i32.const 13)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/as_unary_operand.wat

@ -6,7 +6,7 @@
(i32.ctz (loop (result i32) (call $dummy) (i32.const 13)))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/deep.wat

@ -47,7 +47,7 @@
))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/effects.wat

@ -16,7 +16,7 @@
(i32.eq (local.get 0) (i32.const -14))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::fx:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/multi.wat

@ -8,7 +8,7 @@
(loop (result i32) (call $dummy) (call $dummy) (i32.const 8) (call $dummy))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/loop/nested.wat

@ -9,7 +9,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_block_first.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_block_last.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_block_mid.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_block_value.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_br_if_cond.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_br_value.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_call_fist.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_call_last.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_call_mid.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_func_first.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_func_last.wat

@ -4,7 +4,7 @@
(func $dummy)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_func_mid.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_func_value.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_if_cond.wat

@ -9,7 +9,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_if_else.wat

@ -10,7 +10,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_if_then.wat

@ -10,7 +10,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_loop_first.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_loop_last.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_loop_mid.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/as_return_value.wat

@ -7,7 +7,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/nullary.wat

@ -5,7 +5,7 @@
(func (export "nullary") (return))
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/type_i32.wat

@ -8,7 +8,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/return/type_i64_value.wat

@ -8,7 +8,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

6
tests/disas/winch/x64/table/fill.wat

@ -20,7 +20,7 @@
(table.fill $t2 (local.get $i) (local.get $ref) (local.get $n))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::f1:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11
@ -37,7 +37,7 @@
;; retq
;; 31: ud2
;;
;; wasm[0]::function[1]:
;; wasm[0]::function[1]::f2:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11
@ -54,7 +54,7 @@
;; retq
;; 71: ud2
;;
;; wasm[0]::function[2]:
;; wasm[0]::function[2]::f3:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

4
tests/disas/winch/x64/table/get.wat

@ -10,7 +10,7 @@
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11
@ -27,7 +27,7 @@
;; retq
;; 31: ud2
;;
;; wasm[0]::function[1]:
;; wasm[0]::function[1]::f3:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/table/set.wat

@ -15,7 +15,7 @@
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_block_broke.wat

@ -7,7 +7,7 @@
(block (result i32) (call $dummy) (br 0 (i32.const 1)) (unreachable))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_block_last.wat

@ -6,7 +6,7 @@
(block (nop) (call $dummy) (unreachable))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_block_mid.wat

@ -7,7 +7,7 @@
(block (result i32) (call $dummy) (unreachable) (i32.const 2))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_block_value.wat

@ -6,7 +6,7 @@
(block (result i32) (nop) (call $dummy) (unreachable))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_call_first.wat

@ -7,7 +7,7 @@
(call $dummy3 (unreachable) (i32.const 2) (i32.const 3))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy3:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_call_last.wat

@ -8,7 +8,7 @@
(call $dummy3 (i32.const 1) (i32.const 2) (unreachable))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy3:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_call_mid.wat

@ -7,7 +7,7 @@
(call $dummy3 (i32.const 1) (unreachable) (i32.const 3))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy3:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_func_first.wat

@ -6,7 +6,7 @@
(unreachable) (i32.const -1)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_func_last.wat

@ -6,7 +6,7 @@
(call $dummy) (unreachable)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_func_mid.wat

@ -7,7 +7,7 @@
(call $dummy) (unreachable) (i32.const -1)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_func_value.wat

@ -7,7 +7,7 @@
(call $dummy) (unreachable)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_loop_broke.wat

@ -9,7 +9,7 @@
)
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_loop_last.wat

@ -8,7 +8,7 @@
(loop (nop) (call $dummy) (unreachable))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

2
tests/disas/winch/x64/unreachable/as_loop_mid.wat

@ -8,7 +8,7 @@
(loop (result i32) (call $dummy) (unreachable) (i32.const 2))
)
)
;; wasm[0]::function[0]:
;; wasm[0]::function[0]::dummy:
;; pushq %rbp
;; movq %rsp, %rbp
;; movq 8(%rdi), %r11

Loading…
Cancel
Save