Instruction
TEST
ANDs two operands to set SF, ZF and PF and clear CF and OF, discarding the result; TEST with the same register twice checks it for zero.
- Extensions
- Forms
- 14 (14 Legacy)
- Data
- Intel XED v2026.08.23
Forms
| Instruction | Encoding | Requires |
|---|---|---|
TEST m8, imm8
TEST_MEMb_IMMb_F6r0 | F6 /0 ib | Base instruction set |
TEST r8, imm8
TEST_GPR8_IMMb_F6r0 | F6 /0 ib | Base instruction set |
TEST m8, imm8
TEST_MEMb_IMMb_F6r1 | F6 /1 ib | Base instruction set |
TEST r8, imm8
TEST_GPR8_IMMb_F6r1 | F6 /1 ib | Base instruction set |
TEST m16/32/64, imm16/32
TEST_MEMv_IMMz_F7r0 | F7 /0 iw/id | Base instruction set |
TEST r16/32/64, imm16/32
TEST_GPRv_IMMz_F7r0 | F7 /0 iw/id | Base instruction set |
TEST m16/32/64, imm16/32
TEST_MEMv_IMMz_F7r1 | F7 /1 iw/id | Base instruction set |
TEST r16/32/64, imm16/32
TEST_GPRv_IMMz_F7r1 | F7 /1 iw/id | Base instruction set |
TEST m8, r8
TEST_MEMb_GPR8 | 84 /r | Base instruction set |
TEST r8, r8
TEST_GPR8_GPR8 | 84 /r | Base instruction set |
TEST m16/32/64, r16/32/64
TEST_MEMv_GPRv | 85 /r | Base instruction set |
TEST r16/32/64, r16/32/64
TEST_GPRv_GPRv | 85 /r | Base instruction set |
TEST AL, imm8
TEST_AL_IMMb | A8 ib | Base instruction set |
TEST rAX, imm16/32
TEST_OrAX_IMMz | A9 iw/id | Base instruction set |
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors in XED |
|---|---|---|
I86 | No CPUID bit: part of the base instruction set. | Every x86-64 processor in XED’s model |
More General-purpose instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, ISA sets, CPUID bits and chip model. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-092, June 2026)
- Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026)
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The text is our own.