[llvm-commits] [llvm] r169064 - /llvm/trunk/utils/emacs/llvm-mode.el
Michael Ilseman
milseman at apple.com
Fri Nov 30 16:42:28 PST 2012
Author: milseman
Date: Fri Nov 30 18:42:27 2012
New Revision: 169064
URL: http://llvm.org/viewvc/llvm-project?rev=169064&view=rev
Log:
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
Modified:
llvm/trunk/utils/emacs/llvm-mode.el
Modified: llvm/trunk/utils/emacs/llvm-mode.el
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/emacs/llvm-mode.el?rev=169064&r1=169063&r2=169064&view=diff
==============================================================================
--- llvm/trunk/utils/emacs/llvm-mode.el (original)
+++ llvm/trunk/utils/emacs/llvm-mode.el Fri Nov 30 18:42:27 2012
@@ -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
@@ -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
@@ -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
More information about the llvm-commits
mailing list