;ELC
|
;;; Compiled
|
;;; in Emacs version 26.1
|
;;; with all optimizations.
|
|
;;; This file contains utf-8 non-ASCII characters,
|
;;; and so cannot be loaded into Emacs 22 or earlier.
|
(and (boundp 'emacs-version)
|
(< (aref emacs-version (1- (length emacs-version))) ?A)
|
(string-lessp emacs-version "23")
|
(error "`%s' was compiled for Emacs 23 or later" #$))
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
(byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310%\210\311\312\313\314\315DD\316\307\304\317\320&\210\311\321\313\314\322DD\323\307\304\317\324&\210\311\325\313\314\326DD\327\307\304\317\330&\210\311\331\313\314\332DD\333\317\324%\207" [require cl-lib doc-view custom-declare-group x86-lookup nil "Options for x86 instruction set lookup." :group extensions custom-declare-variable x86-lookup-pdf funcall function #[0 "\300\207" [nil] 1] "Path to Intel's manual containing the instruction set reference." :type (choice (const nil) (file :must-match t)) x86-lookup-pdftotext-program #[0 "\300\207" [#1="pdftotext"] 1 #1#] "Path to pdftotext, part of Popper." string x86-lookup-browse-pdf-function #[0 "\300\207" [x86-lookup-browse-pdf-any] 1] "A function that launches a PDF viewer at a specific page.\nThis function accepts two arguments: filename and page number." (choice (function-item :tag "First suitable PDF reader" :value x86-lookup-browse-pdf-any) (function-item :tag "Evince" :value x86-lookup-browse-pdf-evince) (function-item :tag "Xpdf" :value x86-lookup-browse-pdf-xpdf) (function-item :tag "Okular" :value x86-lookup-browse-pdf-okular) (function-item :tag "gv" :value x86-lookup-browse-pdf-gv) (function-item :tag "zathura" :value x86-lookup-browse-pdf-zathura) (function-item :tag "MuPDF" :value x86-lookup-browse-pdf-mupdf) (function-item :tag "Sumatra PDF" :value x86-lookup-browse-pdf-sumatrapdf) (function-item :tag "browse-url" :value x86-lookup-browse-pdf-browser) (function :tag "Your own function")) x86-lookup-cache-directory #[0 "\300\301!\206 \300\302!\206 \303\304\305\"\207" [getenv "XDG_CACHE_HOME" "LocalAppData" "~/.cache" expand-file-name "x86-lookup"] 4] "Directory where the PDF mnemonic index with be cached."] 8)
|
#@45 Alist mapping instructions to page numbers.
|
(defvar x86-lookup-index nil (#$ . 2175))
|
#@50 How to expand mnemonics into multiple mnemonics.
|
(defvar x86-lookup--expansions '(("^PREFETCH\\(h\\)$" #1="" "nta" "t0" "t1" "t2") ("^J\\(cc\\)$" "a" "ae" "b" "be" "c" "cxz" "e" "ecxz" "g" "ge" "l" "le" "na" "nae" "nb" "nbe" "nc" "ne" "ng" "nge" "nl" "nle" "no" "np" "ns" "nz" "o" "p" "pe" "po" "rcxz" "s" "z") ("^SET\\(cc\\)$" "a" "ae" "b" "be" "c" "e" "g" "ge" "l" "le" "na" "nae" "nb" "nbe" "nc" "ne" "ng" "nge" "nl" "nle" "no" "np" "ns" "nz" "o" "p" "pe" "po" "s" "z") ("^CMOV\\(cc\\)$" "a" "ae" "b" "be" "c" "e" "g" "ge" "l" "le" "na" "nae" "nb" "nbe" "nc" "ne" "ng" "nge" "nl" "nle" "no" "np" "ns" "nz" "o" "p" "pe" "po" "s" "z") ("^FCMOV\\(cc\\)$" "b" "e" "be" "u" "nb" "ne" "nbe" "nu") ("^LOOP\\(cc\\)$" "e" "ne") ("^VBROADCAST\\(\\)$" #1# "ss" "sd" "f128") ("^VMASKMOV\\(\\)$" #1# "ps" "pd") ("^VPBROADCAST\\(\\)$" #1# "b" "w" "d" "q" "I128") ("^VPMASKMOV\\(\\)$" #1# "d" "q") ("\\(\\)" #1#)) (#$ . 2267))
|
#@87 Expand string of PDF-sourced mnemonics into user-friendly mnemonics.
|
|
(fn NAMES PAGE)
|
(defalias 'x86-lookup--expand #[514 "\302\303\304 \305\306\307\310\311!\312\"\313$\216\314\315\"\302\211\211\211\211:\203t @\262\316\317\320#\262\321 \322$\262\211A\262\242\262\302\211\211:\203d @\262\323\302\211\324%\262\227BB\262A\262\202A \211\237\266\204\237\244\262A\262\202 \211\237\266\206)\262)\207" [case-fold-search x86-lookup--expansions nil #[514 "\300\"\207" [string-match] 5 "\n\n(fn S RE)"] match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 split-string " */ *" replace-regexp-in-string " .+$" "" cl-assoc :test replace-match 1] 21 (#$ . 3188)])
|
#@163 Create an index alist from PDF mapping mnemonics to page numbers.
|
This function requires the pdftotext command line program.
|
|
(fn &optional (PDF x86-lookup-pdf))
|
(defalias 'x86-lookup-create-index #[128 "\211\203 \211A\262\242\202 \203 \305\306\307GTD\"\210\310\311\211\312\313\314!r\211q\210\315\316\317\320\321!\322\"\323$\216\324\f\325\312\325\326!\327&\210eb\210\3302} \331\325`dW\203k \332!\203a \211\333\334\331!\"\244\262\335 \210T\262\202K \336\330\337\340\341\342\343\344\312&\"\210\325\266\2020*\262+\262\207" [x86-lookup-pdf case-fold-search coding-system-for-write coding-system-for-read x86-lookup-pdftotext-program signal wrong-number-of-arguments x86-lookup-create-index "\\(?:.*\n\n?\\)?\\([[:alnum:]/[:blank:]]+\\)[[:blank:]]*\\(?:--\\|—\\)\\(?:.*\n\n?\\)\\{1,3\\}[[:blank:]]*Opcode" utf-8 t generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 |