Handbook
Glossary
(MOV-I) ( dst src -- )
Vocabulary
cpu
.
x86
.
assembler
.
private
Inputs
dst
destination
src
immediate value
Outputs
None
Word description
MOV where 'src' is immediate. If dst is a 64-bit register and the 'src' value fits in 32 bits, then zero extension is taken advantage of by downgrading 'dst' to a 32-bit register. That way, the instruction gets a shorter encoding.
Definition
IN:
cpu.x86.assembler.private
GENERIC#:
(MOV-I)
1
( dst src -- )
Methods
USING:
cpu.x86.assembler.operands
cpu.x86.assembler.operands.private
cpu.x86.assembler.private
kernel
;
M:
operand
(MOV-I)
{
0
t
198
}
over
byte?
[
immediate-1
]
[
immediate-4
]
if
;
USING:
combinators
cpu.x86.assembler.operands
cpu.x86.assembler.private
kernel
;
M:
register
(MOV-I)
{
{
[
dup
byte?
]
[
[
t
176
short-operand
]
[
1,
]
bi*
]
}
{
[
dup
zero-extendable?
]
[
[
32-bit-version-of
t
184
short-operand
]
[
4,
]
bi*
]
}
[
[
t
184
short-operand
]
[
cell,
]
bi*
]
}
cond
;