Skip to content

Commit deb4977

Browse files
committed
add Runtime.setTempRet0 method for symmetry
1 parent 733dda0 commit deb4977

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

emscripten.py

+2
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ def math_fix(g):
651651
Runtime.stackAlloc = asm['stackAlloc'];
652652
Runtime.stackSave = asm['stackSave'];
653653
Runtime.stackRestore = asm['stackRestore'];
654+
Runtime.setTempRet0 = asm['setTempRet0'];
654655
Runtime.getTempRet0 = asm['getTempRet0'];
655656
''')
656657

@@ -1232,6 +1233,7 @@ def math_fix(g):
12321233
Runtime.stackAlloc = asm['stackAlloc'];
12331234
Runtime.stackSave = asm['stackSave'];
12341235
Runtime.stackRestore = asm['stackRestore'];
1236+
Runtime.setTempRet0 = asm['setTempRet0'];
12351237
Runtime.getTempRet0 = asm['getTempRet0'];
12361238
''')
12371239

src/runtime.js

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ var Runtime = {
9999
// When a 64 bit long is returned from a compiled function the least significant
100100
// 32 bit word is passed in the return value, but the most significant 32 bit
101101
// word is placed in tempRet0. This provides an accessor for that value.
102+
setTempRet0: function(value) {
103+
tempRet0 = value;
104+
},
102105
getTempRet0: function() {
103106
return tempRet0;
104107
},

0 commit comments

Comments
 (0)