1 ;;;;------------------------------------------------------------------
3 ;;;; Copyright (C) 2000-2002,
4 ;;;; Department of Computer Science, University of Tromso, Norway
6 ;;;; Filename: instr-sub.lisp
8 ;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
9 ;;;; Created at: Tue Feb 1 14:16:58 2000
10 ;;;; Distribution: See the accompanying file COPYING.
12 ;;;; $Id: instr-sub.lisp,v 1.2 2004/01/16 11:54:14 ffjeld Exp $
14 ;;;;------------------------------------------------------------------
16 (in-package "IA-X86-INSTR")
18 ;;; ----------------------------------------------------------------
19 ;;; SUB [IISR page 11-375]
20 ;;; ----------------------------------------------------------------
22 (def-instr sub
(instruction))
24 (:plain
#x2c
(0 1) (imm8 al
))
25 (:digit
(#x80
5) 1 (imm8 r
/m8
))
30 (:plain
#x2d
(0 2) (imm16 ax
) :operand-mode
:16-bit
)
31 (:digit
(#x81
5) 2 (imm16 r
/m16
) :operand-mode
:16-bit
)
32 (:digit
(#x83
5) 1 (simm8 r
/m16
) :operand-mode
:16-bit
)
33 (:r
#x29
(r16 r
/m16
) :operand-mode
:16-bit
)
34 (:r
#x2b
(r/m16 r16
) :operand-mode
:16-bit
))
37 (:plain
#x2d
(0 4) (simm32 eax
) :operand-mode
:32-bit
)
38 (:digit
(#x81
5) 4 (simm32 r
/m32
) :operand-mode
:32-bit
)
39 (:digit
(#x83
5) 1 (simm8 r
/m32
) :operand-mode
:32-bit
)
40 (:r
#x29
(r32 r
/m32
) :operand-mode
:32-bit
)
41 (:r
#x2b
(r/m32 r32
) :operand-mode
:32-bit
))
43 ;;; ----------------------------------------------------------------
44 ;;; SBB [IISR page 11-349]
45 ;;; ----------------------------------------------------------------
47 (def-instr sbb
(instruction))
49 (:plain
#x1c
(0 1) (simm8 al
))
50 (:digit
(#x80
3) 1 (simm8 r
/m8
))
55 (:plain
#x1d
(0 2) (imm16 ax
) :operand-mode
:16-bit
)
56 (:digit
(#x81
3) 2 (imm16 r
/m16
) :operand-mode
:16-bit
)
57 (:digit
(#x83
3) 1 (imm8 r
/m16
) :operand-mode
:16-bit
)
58 (:r
#x19
(r16 r
/m16
) :operand-mode
:16-bit
)
59 (:r
#x1b
(r/m16 r16
) :operand-mode
:16-bit
))
62 (:plain
#x1d
(0 4) (simm32 eax
) :operand-mode
:32-bit
)
63 (:digit
(#x81
3) 4 (simm32 r
/m32
) :operand-mode
:32-bit
)
64 (:digit
(#x83
3) 1 (simm8 r
/m32
) :operand-mode
:32-bit
)
65 (:r
#x19
(r32 r
/m32
) :operand-mode
:32-bit
)
66 (:r
#x1b
(r/m32 r32
) :operand-mode
:32-bit
))
68 ;;; ----------------------------------------------------------------
69 ;;; DEC [IISR page 11-84]
70 ;;; ----------------------------------------------------------------
72 (def-instr dec
(instruction))
75 (:digit
(#xfe
1) 0 (r/m8
)))
77 (:+ #x48
0 (+r16
) :operand-mode
:16-bit
)
78 (:digit
(#xff
1) 0 (r/m16
) :operand-mode
:16-bit
))
80 (:+ #x48
0 (+r32
) :operand-mode
:32-bit
)
81 (:digit
(#xff
1) 0 (r/m32
) :operand-mode
:32-bit
))
84 ;;; ----------------------------------------------------------------
86 ;;; ----------------------------------------------------------------
88 (def-instr neg
(instruction))
89 (def-instr negb
(neg) (:digit
(#xf6
3) 0 (r/m8
)))
90 (def-instr negw
(neg) (:digit
(#xf7
3) 0 (r/m16
) :operand-mode
:16-bit
))
91 (def-instr negl
(neg) (:digit
(#xf7
3) 0 (r/m32
) :operand-mode
:32-bit
))