diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-22 17:21:19 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-23 16:03:06 -0700 |
commit | 2a0f90ac5964f73e5e5b8bee35a8962ba9cca4a2 (patch) | |
tree | ea3d0d2c57f10b1e2555ff7279d6fa2f048c8c24 /src | |
parent | 46aac5343e53225f1e9bc74c584ecb9b6afd74a1 (diff) |
asm coerce in atomicrmw; fixes #1637
Diffstat (limited to 'src')
-rw-r--r-- | src/jsifier.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index a8c8d32d..05dd256c 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -1237,8 +1237,8 @@ function JSify(data, functionsOnly, givenFunctions) { var param1 = finalizeLLVMParameter(item.params[0]); var param2 = finalizeLLVMParameter(item.params[1]); switch (item.op) { - case 'add': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue+' + param2, type, null, null, null, null, ',') + ',tempValue)'; - case 'sub': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue-' + param2, type, null, null, null, null, ',') + ',tempValue)'; + case 'add': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, asmCoercion('tempValue+' + param2, type), type, null, null, null, null, ',') + ',tempValue)'; + case 'sub': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, asmCoercion('tempValue-' + param2, type), type, null, null, null, null, ',') + ',tempValue)'; case 'or': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue|' + param2, type, null, null, null, null, ',') + ',tempValue)'; case 'and': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue&' + param2, type, null, null, null, null, ',') + ',tempValue)'; case 'xor': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue^' + param2, type, null, null, null, null, ',') + ',tempValue)'; |