llvm.org GIT mirror llvm / 1854e14
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169064 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Ilseman 6 years ago
1 changed file(s) with 4 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
44 ;; Create mode-specific tables.
55 (defvar llvm-mode-syntax-table nil
66 "Syntax table used while in LLVM mode.")
7
87 (defvar llvm-font-lock-keywords
98 (list
109 ;; Comments
3433 ;; Arithmetic and Logical Operators
3534 `(,(regexp-opt '("add" "sub" "mul" "div" "rem" "and" "or" "xor"
3635 "setne" "seteq" "setlt" "setgt" "setle" "setge") 'words) . font-lock-keyword-face)
36 ;; Floating-point operators
37 `(,(regexp-opt '("fadd" "fsub" "fmul" "fdiv" "frem") 'words) . font-lock-keyword-face)
3738 ;; Special instructions
38 `(,(regexp-opt '("phi" "tail" "call" "cast" "select" "to" "shl" "shr" "vaarg" "vanext") 'words) . font-lock-keyword-face)
39 `(,(regexp-opt '("phi" "tail" "call" "cast" "select" "to" "shl" "shr" "fcmp" "icmp" "vaarg" "vanext") 'words) . font-lock-keyword-face)
3940 ;; Control instructions
4041 `(,(regexp-opt '("ret" "br" "switch" "invoke" "unwind" "unreachable") 'words) . font-lock-keyword-face)
4142 ;; Memory operators
110111 (interactive)
111112 (kill-all-local-variables)
112113 (use-local-map llvm-mode-map) ; Provides the local keymap.
113 (setq major-mode 'llvm-mode)
114 (setq major-mode 'llvm-mode)
114115
115116 (make-local-variable 'font-lock-defaults)
116117 (setq major-mode 'llvm-mode ; This is how describe-mode