Lines Matching defs:reg
147 LSEG, /* for 3-bit seg reg encoding */
502 *bit pattern: 0000 1111 1100 1reg
1242 #define REX_R 0x04 /* high order bit extension of ModRM reg field */
1244 #define REX_B 0x01 /* extends ModRM r_m, SIB base, or opcode reg */
1268 #define MM_OPND 2 /* "value" used to indicate a mmx reg */
1269 #define XMM_OPND 3 /* "value" used to indicate a xmm reg */
1270 #define SEG_OPND 4 /* "value" used to indicate a segment reg */
1271 #define CONTROL_OPND 5 /* "value" used to indicate a control reg */
1272 #define DEBUG_OPND 6 /* "value" used to indicate a debug reg */
1273 #define TEST_OPND 7 /* "value" used to indicate a test reg */
1274 #define WORD_OPND 8 /* w-bit value indicating word size reg */
1330 dtrace_get_modrm(dis86_t *x, uint_t *mode, uint_t *reg, uint_t *r_m)
1335 dtrace_get_SIB(x, mode, reg, r_m);
1345 dtrace_rex_adjust(uint_t rex_prefix, uint_t mode, uint_t *reg, uint_t *r_m)
1347 if (reg != NULL && r_m == NULL) {
1349 *reg += 8;
1351 if (reg != NULL && (REX_R & rex_prefix) != 0)
1352 *reg += 8;
1458 * r_m = r_m (or reg if mode == 3) field from ModRM byte
1462 * the value of reg or r_m must have already been adjusted for any REX prefix.
1663 #define STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, vbit) { \
1664 dtrace_get_modrm(x, &mode, ®, &r_m); \
1665 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
1667 dtrace_get_operand(x, REG_ONLY, reg, wbit, 1 - vbit); \
1674 * w2 is for the reg operand
1676 #define MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, w2, vbit) { \
1677 dtrace_get_modrm(x, &mode, ®, &r_m); \
1678 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
1680 dtrace_get_operand(x, REG_ONLY, reg, w2, 1 - vbit); \
1686 #define THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, w2, immsize) { \
1687 dtrace_get_modrm(x, &mode, ®, &r_m); \
1688 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
1690 dtrace_get_operand(x, REG_ONLY, reg, w2, 2); \
1719 uint_t reg; /* reg value from ModRM byte */
1908 reg = opcode3;
2091 vbit = 0; /* initialize for mem/reg -> reg */
2094 * amd64 instruction to sign extend 32 bit reg/mem operands
2102 dtrace_get_modrm(x, &mode, ®, &r_m);
2103 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2105 dtrace_get_operand(x, REG_ONLY, reg, LONG_OPND, 1);
2122 dtrace_get_modrm(x, &mode, ®, &r_m);
2123 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2124 dtrace_get_operand(x, REG_ONLY, reg, LONG_OPND, 1);
2136 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND,
2143 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0);
2153 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
2159 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
2170 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 1);
2175 dtrace_get_modrm(x, &mode, ®, &r_m);
2179 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 1);
2185 dtrace_get_modrm(x, &mode, ®, &r_m);
2186 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2188 dtrace_get_operand(x, REG_ONLY, reg, LONG_OPND, 1);
2197 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
2215 dtrace_get_modrm(x, &mode, ®, &r_m);
2226 reg = REGNO(opcode2);
2227 dtrace_rex_adjust(rex_prefix, mode, ®, NULL);
2229 r_m = reg;
2244 reg = REGNO(opcode7);
2245 dtrace_rex_adjust(rex_prefix, mode, ®, NULL);
2246 dtrace_get_operand(x, REG_ONLY, reg, wbit, 1);
2274 dtrace_get_modrm(x, &mode, ®, &r_m);
2277 dtrace_get_operand(x, REG_ONLY, reg, SEG_OPND, 1 - vbit);
2319 dtrace_get_modrm(x, &mode, ®, &r_m);
2352 dtrace_get_modrm(x, &mode, ®, &r_m);
2385 dtrace_get_modrm(x, &mode, ®, &r_m);
2386 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2387 dtrace_get_operand(x, REG_ONLY, reg, wbit, vbit);
2398 reg = REGNO(opcode5);
2400 reg = REGNO(opcode2);
2401 dtrace_rex_adjust(rex_prefix, mode, ®, NULL);
2402 dtrace_get_operand(x, REG_ONLY, reg, LONG_OPND, 0);
2412 reg = REGNO(opcode2);
2413 dtrace_rex_adjust(rex_prefix, mode, ®, NULL);
2414 dtrace_get_operand(x, REG_ONLY, reg, LONG_OPND, 0);
2424 reg = (x->d86_bytes[x->d86_len - 1] >> 3) & 0x3;
2425 dtrace_get_operand(x, REG_ONLY, reg, SEG_OPND, 0);
2434 /* long seg reg from opcode */
2435 reg = (x->d86_bytes[x->d86_len - 1] >> 3) & 0x7;
2436 dtrace_get_operand(x, REG_ONLY, reg, SEG_OPND, 0);
2442 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0);
2447 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
2450 /* MMX/SIMD-Int memory or mm reg to mm reg */
2458 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 0);
2467 dtrace_get_modrm(x, &mode, ®, &r_m);
2471 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2473 dtrace_get_operand(x, REG_ONLY, reg, MM_OPND, 1);
2477 /* MMX/SIMD-Int and SIMD-FP predicated mm reg to r32 */
2484 dtrace_get_modrm(x, &mode, ®, &r_m);
2488 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND, 1);
2492 /* MMX/SIMD-Int predicated r32/mem to mm reg */
2501 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, w2, 1);
2504 /* MMX/SIMD-Int predicated mm/mem to mm reg */
2509 /* MMX/SIMD-Int mm reg to r32 */
2512 dtrace_get_modrm(x, &mode, ®, &r_m);
2516 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND, 0);
2519 /* SIMD memory or xmm reg operand to xmm reg */
2524 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0);
2546 /* SIMD xmm reg to memory or xmm reg */
2551 dtrace_get_modrm(x, &mode, ®, &r_m);
2560 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 1);
2563 /* SIMD memory to xmm reg */
2567 dtrace_get_modrm(x, &mode, ®, &r_m);
2576 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 0);
2579 /* SIMD memory or r32 to xmm reg */
2582 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 0);
2587 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 1);
2590 /* SIMD memory or mm reg to xmm reg */
2595 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 0);
2598 /* SIMD memory or xmm reg to mm reg */
2603 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 0);
2607 /* SIMD memory or xmm reg to r32 */
2610 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND, 0);
2616 dtrace_get_modrm(x, &mode, ®, &r_m);
2619 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2621 dtrace_get_operand(x, REG_ONLY, reg, LONG_OPND, 1);
2625 /* SIMD predicated memory or xmm reg with/to xmm reg */
2629 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 1);
2899 dtrace_get_modrm(x, &mode, ®, &r_m);
2907 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2913 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
2945 /* float reg */
2955 /* float reg to float reg, with ret bit present */