[PATCH] Update emacs llvm mode

Matt Arsenault Matthew.Arsenault at amd.com
Tue Nov 12 19:51:16 PST 2013

It seems this hasn't been done in a while.



Index: utils/emacs/llvm-mode.el
--- utils/emacs/llvm-mode.el
+++ utils/emacs/llvm-mode.el
@@ -32,16 +32,23 @@
                     "null" "undef" "to" "except" "not" "target" "endian" "little" "big"
                     "pointersize" "volatile" "fastcc" "coldcc" "cc") 'words) . font-lock-keyword-face)
    ;; Arithmetic and Logical Operators
-   `(,(regexp-opt '("add" "sub" "mul" "div" "rem" "and" "or" "xor"
+   `(,(regexp-opt '("add" "sub" "mul" "sdiv" "udiv" "urem" "srem" "and" "or" "xor"
                     "setne" "seteq" "setlt" "setgt" "setle" "setge") 'words) . font-lock-keyword-face)
    ;; Floating-point operators
    `(,(regexp-opt '("fadd" "fsub" "fmul" "fdiv" "frem") 'words) . font-lock-keyword-face)
    ;; Special instructions
-   `(,(regexp-opt '("phi" "tail" "call" "cast" "select" "to" "shl" "shr" "fcmp" "icmp" "vaarg" "vanext") 'words) . font-lock-keyword-face)
+   `(,(regexp-opt '("phi" "tail" "call" "select" "to" "shl" "lshr" "ashr" "fcmp" "icmp" "va_arg" "landingpad") 'words) . font-lock-keyword-face)
    ;; Control instructions
-   `(,(regexp-opt '("ret" "br" "switch" "invoke" "unwind" "unreachable") 'words) . font-lock-keyword-face)
+   `(,(regexp-opt '("ret" "br" "switch" "invoke" "resume" "unwind" "unreachable" "indirectbr") 'words) . font-lock-keyword-face)
    ;; Memory operators
-   `(,(regexp-opt '("malloc" "alloca" "free" "load" "store" "getelementptr") 'words) . font-lock-keyword-face)
+   `(,(regexp-opt '("malloc" "alloca" "free" "load" "store" "getelementptr" "fence" "cmpxchg" "atomicrmw") 'words) . font-lock-keyword-face)
+   ;; Casts
+   `(,(regexp-opt '("bitcast" "inttoptr" "ptrtoint" "trunc" "zext" "sext" "fptrunc" "fpext" "fptoui" "fptosi" "uitofp" "sitofp") 'words) . font-lock-keyword-face)
+   ;; Vector ops
+   `(,(regexp-opt '("extractelement" "insertelement" "shufflevector") 'words) . font-lock-keyword-face)
+   ;; Aggregate ops
+   `(,(regexp-opt '("extractvalue" "insertvalue") 'words) . font-lock-keyword-face)
   "Syntax highlighting for LLVM"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2160.1.patch
Type: text/x-patch
Size: 2101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131112/84ddfd43/attachment.bin>

More information about the llvm-commits mailing list