-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply the sbrk/brk value at compile time (#2366)
We've had an option to set the location of the sbrk ptr, but not the value. Applying the value as well is necessary for standalone wasm, as otherwise we set it in JS.
- Loading branch information
Showing
4 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...asses/post-emscripten_pass-arg=emscripten-sbrk-ptr@16_pass-arg=emscripten-sbrk-val@42.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 1 1) | ||
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) | ||
(module | ||
(memory $0 1 1) | ||
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00") | ||
) | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 10 10) | ||
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 10 10) | ||
(data (i32.const 0) "1234567890123456*\00\00\00") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 10 10) | ||
(data (i32.const 0) "1234567890\00\00\00\00\00\00*\00\00\00") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 10 10) | ||
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00123456*\00\00\001234567890") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 10 10) | ||
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00123456*\00\00\00") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) | ||
(module | ||
(type $FUNCSIG$i (func (result i32))) | ||
(memory $0 10 10) | ||
(data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00*\00\00\00\00\00\00\001234567890") | ||
(func $internal (; 0 ;) (type $FUNCSIG$i) (result i32) | ||
(i32.const 16) | ||
) | ||
) |
35 changes: 35 additions & 0 deletions
35
...sses/post-emscripten_pass-arg=emscripten-sbrk-ptr@16_pass-arg=emscripten-sbrk-val@42.wast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
(module | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
(module | ||
) | ||
(module | ||
(memory $0 10 10) | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
(module | ||
(memory $0 10 10) | ||
(data (i32.const 0) "12345678901234567890") | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
(module | ||
(memory $0 10 10) | ||
(data (i32.const 0) "1234567890") | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
(module | ||
(memory $0 10 10) | ||
(data (i32.const 10) "12345678901234567890") | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
(module | ||
(memory $0 10 10) | ||
(data (i32.const 10) "1234567890") | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
(module | ||
(memory $0 10 10) | ||
(data (i32.const 24) "1234567890") | ||
(import "env" "emscripten_get_sbrk_ptr" (func $internal(result i32))) | ||
) | ||
|