summaryrefslogtreecommitdiff
path: root/src/c-writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/c-writer.cc')
-rw-r--r--src/c-writer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c-writer.cc b/src/c-writer.cc
index 29bf131a..96ca2980 100644
--- a/src/c-writer.cc
+++ b/src/c-writer.cc
@@ -1033,9 +1033,9 @@ void CWriter::WriteDataInitializers() {
}
data_segment_index = 0;
for (const DataSegment* data_segment : module_->data_segments) {
- Write("memcpy(&(", ExternalRef(memory->name), ".data[");
+ Write("LOAD_DATA(", ExternalRef(memory->name), ", ");
WriteInitExpr(data_segment->offset);
- Write("]), data_segment_data_", data_segment_index, ", ",
+ Write(", data_segment_data_", data_segment_index, ", ",
data_segment->data.size(), ");", Newline());
++data_segment_index;
}