From 21eb2c7cba6af6e01219f1f3b06e82dfcf2788e8 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 24 Jan 2017 13:44:04 -0800 Subject: Export memalign along with malloc and friends (#888) Emscripten's mmap2 syscall started using memalign instead of malloc with kripken/emscripten#4874, so we need to export that as well. --- test/dot_s/export_malloc_free.s | 20 +++++++++++++++++++- test/dot_s/export_malloc_free.wast | 7 +++++++ 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/dot_s/export_malloc_free.s b/test/dot_s/export_malloc_free.s index 2ace10db9..084ab0383 100644 --- a/test/dot_s/export_malloc_free.s +++ b/test/dot_s/export_malloc_free.s @@ -36,4 +36,22 @@ realloc: i32.const $push0=, 0 .endfunc .Lfunc_end22: - .size realloc, .Lfunc_end22-free + .size realloc, .Lfunc_end22-realloc + + .type memalign,@function +memalign: + .param i32, i32 + .result i32 + i32.const $push0=, 0 + .endfunc +.Lfunc_end2: + .size memalign, .Lfunc_end2-memalign + + .type not_a_malloc,@function +not_a_malloc: + .param i32, i32 + .result i32 + i32.const $push0=, 0 + .endfunc +.Lfunc_end2: + .size not_a_malloc, .Lfunc_end2-not_a_malloc diff --git a/test/dot_s/export_malloc_free.wast b/test/dot_s/export_malloc_free.wast index 96bcdf4ac..89bc15b1c 100644 --- a/test/dot_s/export_malloc_free.wast +++ b/test/dot_s/export_malloc_free.wast @@ -5,6 +5,7 @@ (export "malloc" (func $malloc)) (export "free" (func $free)) (export "realloc" (func $realloc)) + (export "memalign" (func $memalign)) (func $main (result i32) (i32.const 0) ) @@ -16,5 +17,11 @@ (func $realloc (param $0 i32) (param $1 i32) (result i32) (i32.const 0) ) + (func $memalign (param $0 i32) (param $1 i32) (result i32) + (i32.const 0) + ) + (func $not_a_malloc (param $0 i32) (param $1 i32) (result i32) + (i32.const 0) + ) ) ;; METADATA: { "asmConsts": {},"staticBump": 12, "initializers": [] } -- cgit v1.2.3