aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-22 18:17:08 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-22 18:17:08 -0800
commit89c4e91bb9c5662cda6d76c3510ad8e88cdfa99f (patch)
treeedd56401343b9e175cbc1e7c3d298b2cb35bbfb2 /src/jsifier.js
parent2c14a7b749fff05b62bdb69afff9de7dfff96572 (diff)
support sub atomic
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js1
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]);