Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WebAssembly bulk memory opcodes #263

Merged
merged 7 commits into from
May 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Only apply -mbulk-memory to specific files
TerrorJack committed May 18, 2022
commit 72c0cc16ab78edc9449b55097cd0303dcbf2c4ec
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -183,6 +183,10 @@ MUSL_PRINTSCAN_SOURCES = \
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdio/vfscanf.c \
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdlib/strtod.c \
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/stdlib/wcstod.c
BULK_MEMORY_SOURCES = \
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/string/memcpy.c \
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/string/memmove.c \
$(LIBC_TOP_HALF_MUSL_SRC_DIR)/string/memset.c
LIBC_TOP_HALF_HEADERS_PRIVATE = $(LIBC_TOP_HALF_DIR)/headers/private
LIBC_TOP_HALF_SOURCES = $(LIBC_TOP_HALF_DIR)/sources
LIBC_TOP_HALF_ALL_SOURCES = \
@@ -211,7 +215,7 @@ CFLAGS += -Wall -Wextra -Werror \

# Configure support for threads.
ifeq ($(THREAD_MODEL), single)
CFLAGS += -mthread-model single -ftls-model=local-exec
CFLAGS += -mthread-model single
endif
ifeq ($(THREAD_MODEL), posix)
CFLAGS += -mthread-model posix -pthread
@@ -253,6 +257,7 @@ endif
MUSL_PRINTSCAN_OBJS = $(call objs,$(MUSL_PRINTSCAN_SOURCES))
MUSL_PRINTSCAN_LONG_DOUBLE_OBJS = $(patsubst %.o,%.long-double.o,$(MUSL_PRINTSCAN_OBJS))
MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS = $(patsubst %.o,%.no-floating-point.o,$(MUSL_PRINTSCAN_OBJS))
BULK_MEMORY_OBJS = $(call objs,$(BULK_MEMORY_SOURCES))
LIBWASI_EMULATED_MMAN_OBJS = $(call objs,$(LIBWASI_EMULATED_MMAN_SOURCES))
LIBWASI_EMULATED_PROCESS_CLOCKS_OBJS = $(call objs,$(LIBWASI_EMULATED_PROCESS_CLOCKS_SOURCES))
LIBWASI_EMULATED_GETPID_OBJS = $(call objs,$(LIBWASI_EMULATED_GETPID_SOURCES))
@@ -384,6 +389,9 @@ $(MUSL_PRINTSCAN_NO_FLOATING_POINT_OBJS): CFLAGS += \
-D__wasilibc_printscan_no_floating_point \
-D__wasilibc_printscan_floating_point_support_option="\"remove -lc-printscan-no-floating-point from the link command\""

$(BULK_MEMORY_OBJS): CFLAGS += \
-mbulk-memory

$(LIBWASI_EMULATED_SIGNAL_MUSL_OBJS): CFLAGS += \
-D_WASI_EMULATED_SIGNAL

1 change: 0 additions & 1 deletion expected/wasm32-wasi/predefined-macros.txt
Original file line number Diff line number Diff line change
@@ -3061,7 +3061,6 @@
#define __wasm32 1
#define __wasm32__ 1
#define __wasm__ 1
#define __wasm_bulk_memory__ 1
#define _tolower(a) ((a)|0x20)
#define _toupper(a) ((a)&0x5f)
#define acos(x) __tg_real_complex(acos, (x))
1 change: 0 additions & 1 deletion expected/wasm32-wasi/undefined-symbols.txt
Original file line number Diff line number Diff line change
@@ -61,7 +61,6 @@ __lttf2
__netf2
__stack_pointer
__subtf3
__tls_base
__trunctfdf2
__trunctfsf2
__unordtf2