diff options
| author | Shagun Agrawal <agrawalshagun07@gmail.com> | 2024-08-11 00:22:05 +0530 |
|---|---|---|
| committer | Shagun Agrawal <agrawalshagun07@gmail.com> | 2024-08-11 00:22:05 +0530 |
| commit | 0f4b96b2b02822abf6f84903366709b1336905a2 (patch) | |
| tree | ae43a57952f8dd3a3fd063aaf130db38dfe5a692 /src/cljcc/emit.clj | |
| parent | 399bb5ab8bce44f5aeb43909dd10ad4ef5c93de1 (diff) | |
Add bitwise operators
Diffstat (limited to 'src/cljcc/emit.clj')
| -rw-r--r-- | src/cljcc/emit.clj | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cljcc/emit.clj b/src/cljcc/emit.clj index 080886e..d326c55 100644 --- a/src/cljcc/emit.clj +++ b/src/cljcc/emit.clj @@ -60,6 +60,11 @@ :add "addl" :sub "subl" :mul "imull" + :bit-and "andl" + :bit-xor "xorl" + :bit-or "orl" + :bit-left-shift "sall" + :bit-right-shift "sarl" (throw (AssertionError. (str "Invalid binary operator: " instruction))))] [(format " %s %s, %s" binop-operator src dst)])) |
