Lines Matching defs:r_m
373 * this decodes the r_m field for mode's 0, 1, 2 in 16 bit mode
386 * This decodes 32 bit addressing mode r_m field for modes 0, 1, 2
399 * This decodes 64 bit addressing mode r_m field for modes 0, 1, 2
2271 #define REX_B 0x01 /* extends ModRM r_m, SIB base, or opcode reg */
2452 dtrace_get_modrm(dis86_t *x, uint_t *mode, uint_t *reg, uint_t *r_m)
2457 dtrace_get_SIB(x, mode, reg, r_m);
2467 dtrace_rex_adjust(uint_t rex_prefix, uint_t mode, uint_t *reg, uint_t *r_m)
2469 if (reg != NULL && r_m == NULL) {
2475 if (r_m != NULL && (REX_B & rex_prefix) != 0)
2476 *r_m += 8;
2486 dtrace_vex_adjust(uint_t vex_byte1, uint_t mode, uint_t *reg, uint_t *r_m)
2488 if (reg != NULL && r_m == NULL) {
2494 if (r_m != NULL && ((VEX_B & vex_byte1) == 0))
2495 *r_m += 8;
2600 * r_m = r_m (or reg if mode == 3) field from ModRM byte
2604 * the value of reg or r_m must have already been adjusted for any REX prefix.
2608 dtrace_get_operand(dis86_t *x, uint_t mode, uint_t r_m, int wbit, int opindex)
2632 (void) strlcat(opnd, dis_MMREG[r_m], OPLEN);
2635 (void) strlcat(opnd, dis_XMMREG[r_m], OPLEN);
2638 (void) strlcat(opnd, dis_YMMREG[r_m], OPLEN);
2641 (void) strlcat(opnd, dis_SEGREG[r_m], OPLEN);
2644 (void) strlcat(opnd, dis_CONTROLREG[r_m], OPLEN);
2647 (void) strlcat(opnd, dis_DEBUGREG[r_m], OPLEN);
2650 (void) strlcat(opnd, dis_TESTREG[r_m], OPLEN);
2654 (void) strlcat(opnd, dis_REG8[r_m], OPLEN);
2656 (void) strlcat(opnd, dis_REG8_REX[r_m], OPLEN);
2659 (void) strlcat(opnd, dis_REG16[r_m], OPLEN);
2663 (void) strlcat(opnd, dis_REG16[r_m], OPLEN);
2665 (void) strlcat(opnd, dis_REG32[r_m], OPLEN);
2667 (void) strlcat(opnd, dis_REG64[r_m], OPLEN);
2682 * mode 1 is r_m + 8 bit displacement
2683 * mode 2 is r_m + 16 bit displacement
2684 * mode 0 is just r_m, unless r_m is 6 which is 16 bit disp
2687 if ((mode == 0 && r_m == 6) || mode == 2)
2692 if (mode == 0 && r_m == 6)
2698 (void) strlcat(opnd, dis_addr16[mode][r_m], OPLEN);
2707 if (r_m == ESP_REGNO || r_m == ESP_REGNO + 8) {
2718 base = r_m;
2730 else if ((r_m & 7) == EBP_REGNO ||
2748 (void) strlcat(opnd, dis_addr32_mode0[r_m],
2751 (void) strlcat(opnd, dis_addr32_mode12[r_m],
2755 (void) strlcat(opnd, dis_addr64_mode0[r_m],
2757 if (r_m == 5) {
2762 (void) strlcat(opnd, dis_addr64_mode12[r_m],
2819 * vbit indicates direction (0 for "opcode r,r_m") or (1 for "opcode r_m, r")
2821 #define STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, vbit) { \
2822 dtrace_get_modrm(x, &mode, ®, &r_m); \
2823 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
2824 dtrace_get_operand(x, mode, r_m, wbit, vbit); \
2831 * wbit is for the r_m operand
2834 #define MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, w2, vbit) { \
2835 dtrace_get_modrm(x, &mode, ®, &r_m); \
2836 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
2837 dtrace_get_operand(x, mode, r_m, wbit, vbit); \
2844 * 0 for "opcode imm, r, r_m" or
2845 * 1 for "opcode imm, r_m, r"
2847 #define THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, w2, immsize, vbit) { \
2848 dtrace_get_modrm(x, &mode, ®, &r_m); \
2849 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
2850 dtrace_get_operand(x, mode, r_m, wbit, 2-vbit); \
2858 #define FOUROPERAND(x, mode, reg, r_m, rex_prefix, wbit, w2, immsize) { \
2859 dtrace_get_modrm(x, &mode, ®, &r_m); \
2860 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
2861 dtrace_get_operand(x, mode, r_m, wbit, 2); \
2870 #define ONEOPERAND_TWOIMM(x, mode, reg, r_m, rex_prefix, wbit, immsize) { \
2871 dtrace_get_modrm(x, &mode, ®, &r_m); \
2872 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m); \
2873 dtrace_get_operand(x, mode, r_m, wbit, 2); \
2906 uint_t r_m; /* r_m value from ModRM byte */
3070 dtrace_get_modrm(x, &mode, ®, &r_m);
3078 opcode4 = ((reg << 3) | r_m) & 0x0F;
3416 dtrace_get_modrm(x, &mode, &opcode3, &r_m);
3426 dp = (instable_t *)&dis_opFP5[r_m];
3432 dp = (instable_t *)&dis_opFP4[opcode3 - 4][r_m];
3552 dtrace_get_modrm(x, &mode, ®, &r_m);
3702 dtrace_get_modrm(x, &mode, ®, &r_m);
3703 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
3708 dtrace_get_operand(x, mode, r_m, wbit, 0);
3722 dtrace_get_modrm(x, &mode, ®, &r_m);
3723 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
3727 dtrace_get_operand(x, mode, r_m, wbit, 0);
3735 dtrace_get_modrm(x, &mode, ®, &r_m);
3736 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
3741 dtrace_get_operand(x, mode, r_m, wbit, 0);
3749 dtrace_get_modrm(x, &mode, ®, &r_m);
3750 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
3757 dtrace_get_operand(x, mode, r_m, wbit, 1);
3761 dtrace_get_operand(x, mode, r_m, wbit, 0);
3771 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND,
3779 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0);
3789 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
3795 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
3806 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 1);
3811 dtrace_get_modrm(x, &mode, ®, &r_m);
3815 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 1);
3821 dtrace_get_modrm(x, &mode, ®, &r_m);
3822 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
3823 dtrace_get_operand(x, mode, r_m, wbit, 2);
3833 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
3839 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
3840 dtrace_get_operand(x, mode, r_m, wbit, 1);
3851 dtrace_get_modrm(x, &mode, ®, &r_m);
3852 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
3853 dtrace_get_operand(x, mode, r_m, wbit, 1);
3865 r_m = reg;
3866 dtrace_get_operand(x, mode, r_m, wbit, 1);
3910 dtrace_get_modrm(x, &mode, ®, &r_m);
3911 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
3912 dtrace_get_operand(x, mode, r_m, LONG_OPND, vbit);
3923 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
3924 dtrace_get_operand(x, mode, r_m, wbit, 1);
3941 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
3942 dtrace_get_operand(x, mode, r_m, wbit, 1);
3955 dtrace_get_modrm(x, &mode, ®, &r_m);
3956 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
3957 dtrace_get_operand(x, mode, r_m, wbit, 0);
3961 if (cpu_mode == SIZE64 && mode == 3 && r_m == 0) {
3967 } else if (mode == 3 && r_m == 1) {
3998 switch (r_m) {
4017 if (r_m < 1 || r_m > 4)
4030 switch (r_m) {
4065 if (r_m == 0) {
4071 } else if (r_m == 1) {
4077 } else if (r_m == 2) {
4083 } else if (r_m == 3) {
4096 if (r_m == 0) {
4102 } else if (r_m == 1) {
4117 dtrace_get_modrm(x, &mode, ®, &r_m);
4120 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
4121 dtrace_get_operand(x, mode, r_m, wbit, 0);
4150 dtrace_get_modrm(x, &mode, ®, &r_m);
4151 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
4153 dtrace_get_operand(x, REG_ONLY, r_m, LONG_OPND, 1 - vbit);
4209 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0);
4215 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 1);
4226 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 0);
4235 dtrace_get_modrm(x, &mode, ®, &r_m);
4239 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
4240 dtrace_get_operand(x, mode, r_m, wbit, 0);
4252 dtrace_get_modrm(x, &mode, ®, &r_m);
4256 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND, 1,
4262 THREEOPERAND(x, mode, reg, r_m, rex_prefix, LONG_OPND, XMM_OPND,
4276 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, w2, 1, 1);
4288 dtrace_get_modrm(x, &mode, ®, &r_m);
4292 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND, 0);
4302 STANDARD_MODRM(x, mode, reg, r_m, rex_prefix, wbit, 0);
4329 dtrace_get_modrm(x, &mode, ®, &r_m);
4338 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 1);
4346 dtrace_get_modrm(x, &mode, ®, &r_m);
4355 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 0);
4361 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 0);
4366 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 1);
4374 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 0);
4382 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, MM_OPND, 0);
4389 MIXED_MM(x, mode, reg, r_m, rex_prefix, wbit, LONG_OPND, 0);
4395 dtrace_get_modrm(x, &mode, ®, &r_m);
4398 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
4399 dtrace_get_operand(x, mode, r_m, XMM_OPND, 0);
4410 THREEOPERAND(x, mode, reg, r_m, rex_prefix, wbit, XMM_OPND, 1,
4443 FOUROPERAND(x, mode, reg, r_m, rex_prefix, XMM_OPND, XMM_OPND,
4449 ONEOPERAND_TWOIMM(x, mode, reg, r_m, rex_prefix, XMM_OPND, 1);
4464 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
4465 dtrace_get_operand(x, mode, r_m, wbit, 0);
4545 dtrace_rex_adjust(rex_prefix, mode, NULL, &r_m);
4546 dtrace_get_operand(x, mode, r_m, LONG_OPND, 0);
4692 dtrace_get_modrm(x, &mode, ®, &r_m);
4700 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
4701 dtrace_get_operand(x, mode, r_m, BYTE_OPND, 0);
4706 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
4707 dtrace_get_operand(x, mode, r_m, LONG_OPND, 0);
4728 dtrace_get_modrm(x, &mode, ®, &r_m);
4744 dtrace_rex_adjust(rex_prefix, mode, ®, &r_m);
4745 dtrace_get_operand(x, mode, r_m, BYTE_OPND, 0);
4754 x->d86_opnd[0].d86_opnd[4] = r_m + '0';
4768 x->d86_opnd[vbit].d86_opnd[4] = r_m + '0';
4777 dtrace_get_modrm(x, &mode, ®, &r_m);
4782 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4783 dtrace_get_operand(x, mode, r_m, wbit, 0);
4789 dtrace_get_modrm(x, &mode, ®, &r_m);
4790 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4845 dtrace_get_operand(x, mode, r_m, wbit, 0);
4852 dtrace_get_modrm(x, &mode, ®, &r_m);
4853 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4862 dtrace_get_operand(x, mode, r_m, wbit, 1);
4883 dtrace_get_modrm(x, &mode, ®, &r_m);
4884 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4893 dtrace_get_operand(x, mode, r_m, vreg->dgr_arg1, 1);
4900 dtrace_get_modrm(x, &mode, ®, &r_m);
4901 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4913 dtrace_get_operand(x, mode, r_m, wbit, 2);
4919 /* ModR/M.reg := op(VEX.vvvv, ModR/M.r_m, imm8[7:4]) */
4922 dtrace_get_modrm(x, &mode, ®, &r_m);
4923 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4928 dtrace_get_operand(x, mode, r_m, XMM_OPND, 1);
4933 dtrace_get_operand(x, mode, r_m, LONG_OPND, 1);
4940 dtrace_get_operand(x, mode, r_m, LONG_OPND, 1);
4942 dtrace_get_operand(x, mode, r_m, wbit, 1);
4971 dtrace_get_modrm(x, &mode, ®, &r_m);
4972 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
4982 dtrace_get_operand(x, mode, r_m, wbit, 0);
4997 dtrace_get_operand(x, mode, r_m, XMM_OPND, 0);
5005 dtrace_get_operand(x, mode, r_m, LONG_OPND, 0);
5008 dtrace_get_operand(x, mode, r_m, wbit, 0);
5017 dtrace_get_modrm(x, &mode, ®, &r_m);
5018 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5021 dtrace_get_operand(x, mode, r_m, wbit, 1);
5031 dtrace_get_modrm(x, &mode, ®, &r_m);
5036 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5039 dtrace_get_operand(x, REG_ONLY, r_m, wbit, 1);
5056 dtrace_get_modrm(x, &mode, ®, &r_m);
5057 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5059 dtrace_get_operand(x, mode, r_m, wbit, vbit - 1);
5070 dtrace_get_modrm(x, &mode, ®, &r_m);
5071 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5073 dtrace_get_operand(x, mode, r_m, wbit, 0);
5083 dtrace_get_modrm(x, &mode, ®, &r_m);
5084 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5086 dtrace_get_operand(x, mode, r_m, XMM_OPND, 2);
5096 dtrace_get_modrm(x, &mode, ®, &r_m);
5097 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5098 dtrace_get_operand(x, mode, r_m, wbit, 1);
5106 dtrace_get_modrm(x, &mode, ®, &r_m);
5107 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5115 dtrace_get_operand(x, mode, r_m, LONG_OPND, 1);
5117 dtrace_get_operand(x, mode, r_m, wbit, 1);
5126 dtrace_get_modrm(x, &mode, ®, &r_m);
5127 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5136 dtrace_get_operand(x, mode, r_m, LONG_OPND, 2);
5146 dtrace_get_modrm(x, &mode, ®, &r_m);
5147 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5149 dtrace_get_operand(x, mode, r_m, XMM_OPND, 2);
5160 dtrace_get_modrm(x, &mode, ®, &r_m);
5161 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5163 dtrace_get_operand(x, mode, r_m, LONG_OPND, 2);
5171 dtrace_get_modrm(x, &mode, ®, &r_m);
5172 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5175 dtrace_get_operand(x, mode, r_m, wbit, vbit);
5184 dtrace_get_modrm(x, &mode, ®, &r_m);
5185 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5186 dtrace_get_operand(x, mode, r_m, wbit, 2);
5196 dtrace_get_modrm(x, &mode, ®, &r_m);
5197 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5200 dtrace_get_operand(x, REG_ONLY, r_m, wbit, 0);
5220 dtrace_get_modrm(x, &mode, ®, &r_m);
5221 dtrace_vex_adjust(vex_byte1, mode, ®, &r_m);
5248 dtrace_get_operand(x, mode, r_m, wbit, 0);