Skip to content

Commit

Permalink
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp…
Browse files Browse the repository at this point in the history
…, icmp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169064 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
milseman committed Dec 1, 2012
1 parent 98e237f commit 1854e14
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/emacs/llvm-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
;; Create mode-specific tables.
(defvar llvm-mode-syntax-table nil
"Syntax table used while in LLVM mode.")

(defvar llvm-font-lock-keywords
(list
;; Comments
Expand Down Expand Up @@ -35,8 +34,10 @@
;; Arithmetic and Logical Operators
`(,(regexp-opt '("add" "sub" "mul" "div" "rem" "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" "vaarg" "vanext") 'words) . font-lock-keyword-face)
`(,(regexp-opt '("phi" "tail" "call" "cast" "select" "to" "shl" "shr" "fcmp" "icmp" "vaarg" "vanext") 'words) . font-lock-keyword-face)
;; Control instructions
`(,(regexp-opt '("ret" "br" "switch" "invoke" "unwind" "unreachable") 'words) . font-lock-keyword-face)
;; Memory operators
Expand Down Expand Up @@ -111,7 +112,7 @@
(interactive)
(kill-all-local-variables)
(use-local-map llvm-mode-map) ; Provides the local keymap.
(setq major-mode 'llvm-mode)
(setq major-mode 'llvm-mode)

(make-local-variable 'font-lock-defaults)
(setq major-mode 'llvm-mode ; This is how describe-mode
Expand Down

0 comments on commit 1854e14

Please sign in to comment.