diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-22 18:17:08 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-22 18:17:08 -0800 |
commit | 89c4e91bb9c5662cda6d76c3510ad8e88cdfa99f (patch) | |
tree | edd56401343b9e175cbc1e7c3d298b2cb35bbfb2 /src | |
parent | 2c14a7b749fff05b62bdb69afff9de7dfff96572 (diff) |
support sub atomic
Diffstat (limited to 'src')
-rw-r--r-- | src/jsifier.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index bc827135..e1d2921f 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -979,6 +979,7 @@ function JSify(data, functionsOnly, givenFunctions) { var param2 = finalizeLLVMParameter(item.params[1]); switch (item.op) { case 'add': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue+' + param2, type) + ',tempValue)'; + case 'sub': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, 'tempValue-' + param2, type) + ',tempValue)'; case 'xchg': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, param2, type) + ',tempValue)'; case 'cmpxchg': { var param3 = finalizeLLVMParameter(item.params[2]); |