| 1 |
/* |
| 2 |
* FCML - Free Code Manipulation Library. |
| 3 |
* Copyright (C) 2010-2020 Slawomir Wojtasiak |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library; if not, write to the Free Software |
| 17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef FCML_MODRM_H_ |
| 21 |
#define FCML_MODRM_H_ |
| 22 |
|
| 23 |
#include <fcml_common.h> |
| 24 |
#include <fcml_types.h> |
| 25 |
|
| 26 |
typedef struct fcml_st_modrm { |
| 27 |
/* Register number specified by reg_opcode.*/ |
| 28 |
fcml_uint8_t reg_opcode; |
| 29 |
/* True if register needs REX prefix to be encoded.*/ |
| 30 |
fcml_bool reg_opcode_needs_rex; |
| 31 |
/* Register number specified by r/m when mod == 3.*/ |
| 32 |
fcml_nuint8_t reg; |
| 33 |
/* Effective address.*/ |
| 34 |
fcml_st_address address; |
| 35 |
/* True if RIP encoding is used.*/ |
| 36 |
fcml_bool is_rip; |
| 37 |
} fcml_st_modrm; |
| 38 |
|
| 39 |
#endif /* FCML_MODRM_H_ */ |