aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-02 20:52:39 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-03-02 20:52:39 -0800
commitedb28adc2264aa3db34a406d91e369a8f2ba6eaf (patch)
tree3e7d10229232906d864c8c11eb896e488c063754 /src/jsifier.js
parent3ed696033deb7fb2b9475c4f91c9a9a69a19c583 (diff)
more atomic implementations, closes #874
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 7066f8c5..ca404258 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1204,6 +1204,9 @@ function JSify(data, functionsOnly, givenFunctions) {
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 '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)';
case 'xchg': return '(tempValue=' + makeGetValue(param1, 0, type) + ',' + makeSetValue(param1, 0, param2, type, null, null, null, null, ',') + ',tempValue)';
case 'cmpxchg': {
var param3 = finalizeLLVMParameter(item.params[2]);