├── AUTHORS ├── COPYING ├── README ├── libquix86 ├── Makefile ├── qx86-d-amode.c ├── qx86-d-flip-case.c ├── qx86-d-modrm.c ├── qx86-d-mtab │ ├── 3dnow.mtab │ ├── aes.mtab │ ├── base.mtab │ ├── clmul.mtab │ ├── mmx.mtab │ ├── smx.mtab │ ├── sse.mtab │ ├── sse2.mtab │ ├── sse3.mtab │ ├── sse4.1.mtab │ ├── sse4.2.mtab │ ├── sse4a.mtab │ ├── ssse3.mtab │ ├── svm.mtab │ ├── system.mtab │ ├── tsx.mtab │ ├── vtx.mtab │ └── x87.mtab ├── qx86-d-opcode-map.c ├── qx86-d-opcode-map │ ├── qx86-opcode-map-1.map │ ├── qx86-opcode-map-2.map │ ├── qx86-opcode-map-3A.map │ ├── qx86-opcode-map-3B.map │ ├── qx86-opcode-map-D8.map │ ├── qx86-opcode-map-D9.map │ ├── qx86-opcode-map-DA.map │ ├── qx86-opcode-map-DB.map │ ├── qx86-opcode-map-DC.map │ ├── qx86-opcode-map-DD.map │ ├── qx86-opcode-map-DE.map │ ├── qx86-opcode-map-DF.map │ ├── qx86-opcode-map-M10.map │ ├── qx86-opcode-map-M11_C6.map │ ├── qx86-opcode-map-M11_C7.map │ ├── qx86-opcode-map-M12.map │ ├── qx86-opcode-map-M13.map │ ├── qx86-opcode-map-M14.map │ ├── qx86-opcode-map-M15.map │ ├── qx86-opcode-map-M16.map │ ├── qx86-opcode-map-M17.map │ ├── qx86-opcode-map-M1A.map │ ├── qx86-opcode-map-M1_Eb_Ib.map │ ├── qx86-opcode-map-M1_Ev_Fb.map │ ├── qx86-opcode-map-M1_Ev_Fz.map │ ├── qx86-opcode-map-M2.map │ ├── qx86-opcode-map-M3.map │ ├── qx86-opcode-map-M4.map │ ├── qx86-opcode-map-M5.map │ ├── qx86-opcode-map-M6.map │ ├── qx86-opcode-map-M7.map │ ├── qx86-opcode-map-M8.map │ ├── qx86-opcode-map-M9.map │ └── qx86-opcode-map-MP.map ├── qx86-d-rtab.c ├── qx86-d-rtuple.c ├── qx86-d-sib.c ├── qx86-d-size.c ├── qx86-d-stuple.c ├── qx86-e-cc.h ├── qx86-e-defect.h ├── qx86-e-disp.h ├── qx86-e-error.h ├── qx86-e-iclass.h ├── qx86-e-limit.h ├── qx86-e-mattribute.h ├── qx86-e-modrm-field.h ├── qx86-e-opcode-escape.h ├── qx86-e-opcode-map-index.h ├── qx86-e-opcode-map-item-code.h ├── qx86-e-opcode-prefix.h ├── qx86-e-operand-attribute.h ├── qx86-e-operand-form-type.h ├── qx86-e-operand-type.h ├── qx86-e-rclass.h ├── qx86-e-register.h ├── qx86-e-scale.h ├── qx86-e-size.h ├── qx86-e-subreg.h ├── qx86-f-calculate-effective-address.c ├── qx86-f-calculate-linear-address.c ├── qx86-f-decode-amode-a.c ├── qx86-f-decode-amode-i.c ├── qx86-f-decode-amode-j.c ├── qx86-f-decode-amode-m.c ├── qx86-f-decode-amode-o.c ├── qx86-f-decode-amode-x.c ├── qx86-f-decode-amode-y.c ├── qx86-f-decode-amode.c ├── qx86-f-decode-implicit-1.c ├── qx86-f-decode-modifiers.c ├── qx86-f-decode-opcode.c ├── qx86-f-decode-operand.c ├── qx86-f-decode-prefixes.c ├── qx86-f-decode-rtuple.c ├── qx86-f-decode.c ├── qx86-f-extract-address.inl ├── qx86-f-minfo-rename.c ├── qx86-f-minfo.c ├── qx86-f-opcode-map-choose.c ├── qx86-f-print-intel.c ├── qx86-f-print.c ├── qx86-f-pump.inl ├── qx86-f-rinfo-rename.c ├── qx86-f-rinfo.c ├── qx86-f-unpump.inl ├── qx86-t-amode.h ├── qx86-t-callback.h ├── qx86-t-ctx.h ├── qx86-t-insn-attributes.h ├── qx86-t-insn-modifiers.h ├── qx86-t-insn.h ├── qx86-t-mtab-item.h ├── qx86-t-opcode-map-item.h ├── qx86-t-opcode-map.h ├── qx86-t-operand-far-pointer.h ├── qx86-t-operand-form-amode.h ├── qx86-t-operand-form-rtuple.h ├── qx86-t-operand-form-union.h ├── qx86-t-operand-form.h ├── qx86-t-operand-immediate.h ├── qx86-t-operand-jump-offset.h ├── qx86-t-operand-memory.h ├── qx86-t-operand-register.h ├── qx86-t-operand-union.h ├── qx86-t-operand.h ├── qx86-t-print-item.h ├── qx86-t-print-options-intel.h ├── qx86-t-rtab-item.h ├── qx86-t-rtuple.h ├── qx86-t-stuple.h ├── qx86.c ├── qx86.h └── qx86test.c └── scripts ├── amalgamate.awk ├── make-mtab.awk └── map2c /AUTHORS: -------------------------------------------------------------------------------- 1 | Michael Solovyov 2 | Alexander Kudryavtsev 3 | 4 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | An x86-64 instruction decoder. 2 | 3 | 4 | -------------------------------------------------------------------------------- /libquix86/qx86-d-flip-case.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | /* Reference: Latin-1. */ 26 | static char qx86_flip_case[128] 27 | = 28 | { 29 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 30 | 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 31 | 32 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 33 | 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 34 | 35 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 36 | 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 37 | 38 | 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 39 | 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 40 | 41 | 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 42 | 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 43 | 44 | 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 45 | 0x78, 0x79, 0x7A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 46 | 47 | 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 48 | 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 49 | 50 | 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 51 | 0x58, 0x59, 0x5A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F 52 | }; 53 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/3dnow.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for 3DNow! subset. 26 | * . 27 | 28 | ## 3DNow! subset instructions. 29 | FEMMS . 30 | PAVGUSB . 31 | PF2ID . 32 | PF2IW . 33 | PFACC . 34 | PFADD . 35 | PFCMPEQ . 36 | PFCMPGE . 37 | PFCMPGT . 38 | PFMAX . 39 | PFMIN . 40 | PFMUL . 41 | PFNACC . 42 | PFPNACC . 43 | PFRCP . 44 | PFRCPIT1 . 45 | PFRCPIT2 . 46 | PFRSQIT1 . 47 | PFRSQRT . 48 | PFSUB . 49 | PFSUBR . 50 | PI2FD . 51 | PI2FW . 52 | PMULHRW . 53 | PSWAPD . 54 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/aes.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for AES subset. 26 | * . 27 | 28 | ## AES subset instructions. 29 | AESDEC . 30 | AESDECLAST . 31 | AESENC . 32 | AESENCLAST . 33 | AESIMC . 34 | AESKEYGENASSIST . 35 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/clmul.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for CLMUL subset. 26 | * . 27 | 28 | ## CLMUL subset instructions. 29 | PCLMULQDQ . 30 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/mmx.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for MMX subset. 26 | * . 27 | 28 | ## MMX subset instructions. 29 | EMMS . 30 | MASKMOVQ . 31 | MOVNTQ . 32 | PSHUFW . 33 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/smx.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for Intel SMX subset. 26 | * . 27 | 28 | ## Intel SMX subset instructions. 29 | GETSEC . 30 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/sse3.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for SSE3 subset. 26 | * . 27 | 28 | ## SSE3 subset instructions. 29 | ADDSUBPD . 30 | ADDSUBPS . 31 | HADDPD . 32 | HADDPS . 33 | HSUBPD . 34 | HSUBPS . 35 | LDDQU . 36 | MOVDDUP . 37 | MOVSHDUP . 38 | MOVSLDUP . 39 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/sse4.1.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for SSE4.1 subset. 26 | * . 27 | 28 | ## SSE4.1 subset instructions. 29 | BLENDPD . 30 | BLENDPS . 31 | BLENDVPD . 32 | BLENDVPS . 33 | DPPD . 34 | DPPS . 35 | EXTRACTPS . 36 | INSERTPS . 37 | MOVNTDQA . 38 | MPSADBW . 39 | PACKUSDW . 40 | PBLENDVB . 41 | PBLENDW . 42 | PCMPEQQ . 43 | PEXTRB . 44 | PEXTRD . 45 | PEXTRQ . 46 | PHMINPOSUW . 47 | PINSRB . 48 | PINSRD . 49 | PINSRQ . 50 | PMAXSB . 51 | PMAXSD . 52 | PMAXUD . 53 | PMAXUW . 54 | PMINSB . 55 | PMINSD . 56 | PMINUD . 57 | PMINUW . 58 | PMOVSXBD . 59 | PMOVSXBQ . 60 | PMOVSXBW . 61 | PMOVSXWD . 62 | PMOVSXWQ . 63 | PMOVSXDQ . 64 | PMOVZXBD . 65 | PMOVZXBQ . 66 | PMOVZXBW . 67 | PMOVZXWD . 68 | PMOVZXWQ . 69 | PMOVZXDQ . 70 | PMULDQ . 71 | PMULLD . 72 | PTEST . 73 | ROUNDPD . 74 | ROUNDPS . 75 | ROUNDSD . 76 | ROUNDSS . 77 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/sse4.2.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for SSE4.2 subset. 26 | * . 27 | 28 | ## SSE4.2 subset instructions. 29 | CRC32 . 30 | PCMPESTRI . 31 | PCMPESTRM . 32 | PCMPISTRI . 33 | PCMPISTRM . 34 | PCMPGTQ . 35 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/sse4a.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for SSE4A subset. 26 | * . 27 | 28 | ## SSE4A subset instructions. 29 | EXTRQ . 30 | INSERTQ . 31 | MOVNTSD . 32 | MOVNTSS . 33 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/ssse3.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for SSSE3 subset. 26 | * . 27 | 28 | ## SSSE3 subset instructions. 29 | PABSB . 30 | PABSD . 31 | PABSW . 32 | PALIGNR . 33 | PHADDD . 34 | PHADDSW . 35 | PHADDW . 36 | PHSUBD . 37 | PHSUBSW . 38 | PHSUBW . 39 | PMADDUBSW . 40 | PMULHRSW . 41 | PSHUFB . 42 | PSIGNB . 43 | PSIGND . 44 | PSIGNW . 45 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/svm.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for AMD SVM subset. 26 | * . 27 | 28 | ## AMD SVM subset instructions. 29 | CLGI . 30 | INVLPGA . 31 | SKINIT . 32 | STGI . 33 | VMLOAD . 34 | VMMCALL . 35 | VMRUN . 36 | VMSAVE . 37 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/tsx.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for Intel Transactional Synchronization Extensions subset. 26 | * . 27 | 28 | ## Intel TSX subset instructions. 29 | XABORT . 30 | XBEGIN . 31 | XEND . 32 | XTEST . 33 | -------------------------------------------------------------------------------- /libquix86/qx86-d-mtab/vtx.mtab: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Default properties for Intel VT-x subset. 26 | * . 27 | 28 | ## Intel VT-x subset instructions. 29 | INVEPT . 30 | INVVPID . 31 | VMCALL . 32 | VMCLEAR . 33 | VMFUNC . 34 | VMLAUNCH . 35 | VMPTRLD . 36 | VMPTRST . 37 | VMREAD . 38 | VMRESUME . 39 | VMWRITE . 40 | VMXOFF . 41 | VMXON . 42 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M10.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M10 reg 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M11_C6.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M11_C6 reg 27 | { 28 | 00: MOV Eb+ Ib- 29 | 07: XABORT Ib- [ rm = 00 ] # TSX 30 | } 31 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M11_C7.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M11_C7 reg 27 | { 28 | 00: MOV Ev+ Fz- 29 | 07: XBEGIN Jz- [ rm = 00 ] # TSX 30 | } 31 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M12.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 27 | Map M12 reg 28 | { 29 | 02: [ sp ] 30 | 00: PSRLW Nq* Ib- 31 | 66: PSRLW Udq* Ib- 32 | 04: [ sp ] 33 | 00: PSRAW Nq* Ib- 34 | 66: PSRAW Udq* Ib- 35 | 06: [ sp ] 36 | 00: PSLLW Nq* Ib- 37 | 66: PSLLW Udq* Ib- 38 | } 39 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M13.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 27 | Map M13 reg 28 | { 29 | 02: [ sp ] 30 | 00: PSRLD Nq* Ib- 31 | 66: PSRLD Udq* Ib- 32 | 04: [ sp ] 33 | 00: PSRAD Nq* Ib- 34 | 66: PSRAD Udq* Ib- 35 | 06: [ sp ] 36 | 00: PSLLD Nq* Ib- 37 | 66: PSLLD Udq* Ib- 38 | } 39 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M14.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 27 | Map M14 reg 28 | { 29 | 02: [ sp ] 30 | 00: PSRLQ Nq* Ib- 31 | 66: PSRLQ Udq* Ib- 32 | 03: PSRLDQ Udq* Ib- [ sp = 66 ] 33 | 06: [ sp ] 34 | 00: PSLLQ Nq* Ib- 35 | 66: PSLLQ Udq* Ib- 36 | 07: PSLLDQ Udq* Ib- [ sp = 66 ] 37 | } 38 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M16.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Tables A-6, A-7. 26 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 27 | Map M16 reg 28 | { 29 | 00: PREFETCHNTA Mi- 30 | 01: PREFETCHT0 Mi- 31 | 02: PREFETCHT1 Mi- 32 | 03: PREFETCHT2 Mi- 33 | # TODO: AMD says NOP, Intel - undefined.. Using AMD version. 34 | 04: NOP . 35 | 05: NOP . 36 | 06: NOP . 37 | 07: NOP . 38 | } 39 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M17.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | # TODO: this separate map is present only on AMD. 26 | 27 | ## Reference: AMD Architecture Programmer's Manual 3: Tables A-6, A-7. 28 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 29 | Map M17 reg 30 | { 31 | 00: EXTRQ Vdq* Ib- Ib- [ sp = 66 ] # Instruction from AMD SSE4A 32 | } 33 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M1A.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M1A reg 27 | { 28 | 00: POP 29 | } 30 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M1_Eb_Ib.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M1_Eb_Ib reg 27 | { 28 | 00: ADD Eb* Ib- 29 | 01: OR Eb* Ib- 30 | 02: ADC Eb* Ib- 31 | 03: SBB Eb* Ib- 32 | 04: AND Eb* Ib- 33 | 05: SUB Eb* Ib- 34 | 06: XOR Eb* Ib- 35 | 07: CMP Eb- Ib- 36 | } 37 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M1_Ev_Fb.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M1_Ev_Fb reg 27 | { 28 | 00: ADD Ev* Fb- 29 | 01: OR Ev* Fb- 30 | 02: ADC Ev* Fb- 31 | 03: SBB Ev* Fb- 32 | 04: AND Ev* Fb- 33 | 05: SUB Ev* Fb- 34 | 06: XOR Ev* Fb- 35 | 07: CMP Ev- Fb- 36 | } 37 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M1_Ev_Fz.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M1_Ev_Fz reg 27 | { 28 | 00: ADD Ev* Fz- 29 | 01: OR Ev* Fz- 30 | 02: ADC Ev* Fz- 31 | 03: SBB Ev* Fz- 32 | 04: AND Ev* Fz- 33 | 05: SUB Ev* Fz- 34 | 06: XOR Ev* Fz- 35 | 07: CMP Ev- Fz- 36 | } 37 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M2.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M2 reg 27 | { 28 | 00: ROL 29 | 01: ROR 30 | 02: RCL 31 | 03: RCR 32 | 04: SHL 33 | 05: SHR 34 | 06: SHL 35 | 07: SAR 36 | } 37 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M3.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M3 reg 27 | { 28 | 00: TEST Eb- Ib- [ pb = F6 ] 29 | 00: TEST Ev- Fz- [ pb = F7 ] 30 | 01: TEST Eb- Ib- [ pb = F6 ] 31 | 01: TEST Ev- Fz- [ pb = F7 ] 32 | 02: NOT Eb* [ pb = F6 ] 33 | 02: NOT Ev* [ pb = F7 ] 34 | 03: NEG Eb* [ pb = F6 ] 35 | 03: NEG Ev* [ pb = F7 ] 36 | 04: MUL Eb- [ pb = F6 ] 37 | 04: MUL Ev- [ pb = F7 ] 38 | 05: IMUL Eb- [ pb = F6 ] 39 | 05: IMUL Ev- [ pb = F7 ] 40 | 06: DIV Eb- [ pb = F6 ] 41 | 06: DIV Ev- [ pb = F7 ] 42 | 07: IDIV Eb- [ pb = F6 ] 43 | 07: IDIV Ev- [ pb = F7 ] 44 | } 45 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M4.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M4 reg 27 | { 28 | 00: INC 29 | 01: DEC 30 | } 31 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M5.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M5 reg 27 | { 28 | 00: INC Ev* 29 | 01: DEC Ev* 30 | 02: CALL Ev- 31 | 03: CALLF Mp- 32 | 04: JMP Ev- 33 | 05: JMPF Mp- 34 | 06: PUSH Ev- 35 | } 36 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M6.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M6 reg 27 | { 28 | 00: SLDT Mw+ [ mod = 0 ] 29 | 00: SLDT Mw+ [ mod = 1 ] 30 | 00: SLDT Mw+ [ mod = 2 ] 31 | 00: SLDT Rv+ [ mod = 3 ] 32 | 01: STR Mw+ [ mod = 0 ] 33 | 01: STR Mw+ [ mod = 1 ] 34 | 01: STR Mw+ [ mod = 2 ] 35 | 01: STR Rv+ [ mod = 3 ] 36 | 02: LLDT Ew- 37 | 03: LTR Ew- 38 | 04: VERR Ew- 39 | 05: VERW Ew- 40 | } 41 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M8.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | Map M8 reg 27 | { 28 | 04: BT Ev- Ib- 29 | 05: BTS Ev* Ib- 30 | 06: BTR Ev* Ib- 31 | 07: BTC Ev* Ib- 32 | } 33 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-M9.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | ## Reference: AMD Architecture Programmer's Manual 3: Table A-6. 26 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 27 | Map M9 reg 28 | { 29 | 01: CMPXCHG8B Mq*? [ os = 0 ] # Intel opcode map says that prefixes 66, f3 make this opcode undefined, but AMD is OK 30 | 01: CMPXCHG8B Mq*? [ os = 1 ] 31 | 01: CMPXCHG16B Mdq*? [ os = 2 ] 32 | 06: [ sp ] 33 | 00: VMPTRLD Mq- [ cs = 1 ] # VMX 34 | 00: VMPTRLD Mq- [ cs = 2 ] # VMX 35 | 66: VMCLEAR Mq- [ cs = 1 ] # VMX 36 | 66: VMCLEAR Mq- [ cs = 2 ] # VMX 37 | F3: VMXON Mq- [ cs = 1 ] # VMX 38 | F3: VMXON Mq- [ cs = 2 ] # VMX 39 | 07: [ sp ] 40 | 00: VMPTRST Mq+ [ cs = 1 ] # VMX 41 | 00: VMPTRST Mq+ [ cs = 2 ] # VMX 42 | F3: VMPTRST Mq+ [ cs = 1 ] # VMX 43 | F3: VMPTRST Mq+ [ cs = 2 ] # VMX 44 | } 45 | -------------------------------------------------------------------------------- /libquix86/qx86-d-opcode-map/qx86-opcode-map-MP.map: -------------------------------------------------------------------------------- 1 | ## +------------------------------------------------------------------------+ 2 | ## | quix86 | 3 | ## +------------------------------------------------------------------------+ 4 | ## | This file is part of quix86, an x86-64 instruction decoder. | 5 | ## | | 6 | ## | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | ## | of Sciences. | 8 | ## | | 9 | ## | Contact e-mail: . | 10 | ## | | 11 | ## | quix86 is free software: you can redistribute it and/or modify it | 12 | ## | under the terms of the GNU Lesser General Public License as published | 13 | ## | by the Free Software Foundation, either version 3 of the License, or | 14 | ## | (at your option) any later version. | 15 | ## | | 16 | ## | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | ## | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | ## | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | ## | License for more details. | 20 | ## | | 21 | ## | You should have received a copy of the GNU Lesser General Public | 22 | ## | License along with quix86. If not, see . | 23 | ## +------------------------------------------------------------------------+ 24 | 25 | # TODO: this separate map is present only on AMD. 26 | 27 | ## Reference: AMD Architecture Programmer's Manual 3: Tables A-6, A-7. 28 | ## Reference: Intel Architecture Software Developer’s Manual 2B: Table A-6. 29 | Map MP reg 30 | { 31 | # TODO: Intel has 0F 0D as NOP Ev, AMD - PREFETCH. 32 | # Using AMD variant. 33 | 00: PREFETCH Mi- 34 | 01: PREFETCHW Mi- 35 | 02: PREFETCH Mi- # Reserved PREFETCH aliased to PREFETCH. 36 | 03: PREFETCHW Mi- 37 | 04: PREFETCH Mi- # Reserved PREFETCH aliased to PREFETCH. 38 | 05: PREFETCH Mi- # Reserved PREFETCH aliased to PREFETCH. 39 | 06: PREFETCH Mi- # Reserved PREFETCH aliased to PREFETCH. 40 | 07: PREFETCH Mi- # Reserved PREFETCH aliased to PREFETCH. 41 | } 42 | -------------------------------------------------------------------------------- /libquix86/qx86-e-cc.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_CC_H 26 | #define QX86_E_CC_H 27 | 28 | /** 29 | * Enumeration of x86 condition codes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_CC_O = 0, 37 | QX86_CC_NO = 1, 38 | QX86_CC_B = 2, 39 | QX86_CC_AE = 3, 40 | QX86_CC_Z = 4, 41 | QX86_CC_NZ = 5, 42 | QX86_CC_BE = 6, 43 | QX86_CC_A = 7, 44 | QX86_CC_S = 8, 45 | QX86_CC_NS = 9, 46 | QX86_CC_P = 10, 47 | QX86_CC_NP = 11, 48 | QX86_CC_L = 12, 49 | QX86_CC_GE = 13, 50 | QX86_CC_LE = 14, 51 | QX86_CC_G = 15, 52 | 53 | QX86_CC_NONE = 16, 54 | 55 | QX86_CC_CXZ = 17, 56 | QX86_CC_ECXZ = 18, 57 | QX86_CC_RCXZ = 19, 58 | QX86_CC_CXO = 20, 59 | QX86_CC_ECXO = 21, 60 | QX86_CC_RCXO = 22 61 | }; 62 | 63 | #endif /* QX86_E_CC_H */ 64 | -------------------------------------------------------------------------------- /libquix86/qx86-e-defect.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_DEFECT_H 26 | #define QX86_E_DEFECT_H 27 | 28 | /** 29 | * Enumeration of x86 instruction defects. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_DEFECT_NONE = 0, 37 | 38 | QX86_DEFECT_MODRM_MOD_NOT_3 = 1 << 0, 39 | QX86_DEFECT_MODRM_MOD_3 = 1 << 1 40 | }; 41 | 42 | #endif /* QX86_E_DEFECT_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-e-disp.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_DISP_H 26 | #define QX86_E_DISP_H 27 | 28 | /** 29 | * Enumeration of x86 displacement sizes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_DISP_NONE = 0, 37 | QX86_DISP_8 = 1, 38 | QX86_DISP_16 = 2, 39 | QX86_DISP_32 = 4, 40 | QX86_DISP_64 = 8, 41 | 42 | QX86_DISP_INVALID = 3 43 | }; 44 | 45 | #endif /* QX86_E_DISP_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-e-error.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_ERROR_H 26 | #define QX86_E_ERROR_H 27 | 28 | /** 29 | * Enumeration of quix86 error codes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_SUCCESS = 0, 37 | 38 | QX86_E_INTERNAL = 1, 39 | QX86_E_API = 2, 40 | 41 | QX86_E_INSN_INCOMPLETE = 3, 42 | QX86_E_INSN_UNDEFINED = 4, 43 | 44 | QX86_E_INSUFFICIENT_BUFFER = 5, 45 | 46 | QX86_E_CALLBACK = 6, 47 | 48 | QX86_E_COUNT = 7 49 | }; 50 | 51 | #endif /* QX86_E_ERROR_H */ 52 | -------------------------------------------------------------------------------- /libquix86/qx86-e-iclass.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_ICLASS_H 26 | #define QX86_E_ICLASS_H 27 | 28 | /** 29 | * Enumeration of instruction classes. 30 | * 31 | * An instruction can belong to multiple instruction classes at the same time. 32 | * 33 | * \author icee 34 | * \since 1.0 35 | */ 36 | enum 37 | { 38 | QX86_ICLASS_NONE = 0, 39 | 40 | QX86_ICLASS_CONDITIONAL_EXECUTION = 1 << 0, 41 | 42 | QX86_ICLASS_TRANSFER = 1 << 1, 43 | QX86_ICLASS_TRANSFER_LINKED = 1 << 2, 44 | QX86_ICLASS_TRANSFER_LINKED_BACK = 1 << 3, 45 | QX86_ICLASS_TRANSFER_SERVICE = 1 << 4 46 | }; 47 | 48 | #endif /* QX86_E_ICLASS_H */ 49 | -------------------------------------------------------------------------------- /libquix86/qx86-e-limit.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_LIMIT_H 26 | #define QX86_E_LIMIT_H 27 | 28 | /** 29 | * Architectural limits of the x86. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_IMMEDIATE_SIZE_MAX = 8, 37 | QX86_INSN_SIZE_MAX = 15, 38 | QX86_OPERAND_NMAX = 4, 39 | QX86_IMPLICIT_OPERAND_NMAX = 8 40 | }; 41 | 42 | #endif /* QX86_E_LIMIT_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-e-mattribute.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_MATTRIBUTE_H 26 | #define QX86_E_MATTRIBUTE_H 27 | 28 | /** 29 | * Enumeration of mnemonic attributes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_MATTRIBUTE_NONE = 0, 37 | QX86_MATTRIBUTE_REP = 1 << 0, 38 | QX86_MATTRIBUTE_REPZ = 1 << 1, 39 | QX86_MATTRIBUTE_DEFAULT_SIZE_64 = 1 << 2, 40 | QX86_MATTRIBUTE_FIXED_SIZE_64 = 1 << 3, 41 | QX86_MATTRIBUTE_INTERLOCKABLE = 1 << 4, 42 | QX86_MATTRIBUTE_IMPLICIT_LOCK = 1 << 5 43 | }; 44 | 45 | #endif /* QX86_E_MATTRIBUTE_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-e-modrm-field.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_MODRM_FIELD_H 26 | #define QX86_E_MODRM_FIELD_H 27 | 28 | /** 29 | * Enumeration of ModRM fields. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_MODRM_FIELD_NONE = 0, 37 | 38 | QX86_MODRM_FIELD_MOD = 1 << 0, 39 | QX86_MODRM_FIELD_REG = 1 << 2, 40 | QX86_MODRM_FIELD_RM = 1 << 3 41 | }; 42 | 43 | #endif /* QX86_E_MODRM_FIELD_H */ 44 | -------------------------------------------------------------------------------- /libquix86/qx86-e-opcode-escape.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPCODE_ESCAPE_H 26 | #define QX86_E_OPCODE_ESCAPE_H 27 | 28 | /** 29 | * Enumeration of x86 opcode escapes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_OPCODE_ESCAPE_NONE = 0, 37 | 38 | QX86_OPCODE_ESCAPE_0F = 1, 39 | QX86_OPCODE_ESCAPE_0F_38 = 2, 40 | QX86_OPCODE_ESCAPE_0F_3A = 3, 41 | 42 | QX86_OPCODE_ESCAPE_COUNT = 4 43 | }; 44 | 45 | #endif /* QX86_E_OPCODE_ESCAPE_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-e-opcode-map-index.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPCODE_MAP_INDEX_H 26 | #define QX86_E_OPCODE_MAP_INDEX_H 27 | 28 | /** 29 | * Enumeration of opcode map indexes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_OPCODE_MAP_INDEX_NONE = 0, 37 | 38 | QX86_OPCODE_MAP_INDEX_NB = 1, 39 | QX86_OPCODE_MAP_INDEX_PB = 2, 40 | 41 | QX86_OPCODE_MAP_INDEX_AS = 3, 42 | QX86_OPCODE_MAP_INDEX_CS = 4, 43 | QX86_OPCODE_MAP_INDEX_OS = 5, 44 | 45 | QX86_OPCODE_MAP_INDEX_SP = 6, 46 | 47 | QX86_OPCODE_MAP_INDEX_MOD = 7, 48 | QX86_OPCODE_MAP_INDEX_REG = 8, 49 | QX86_OPCODE_MAP_INDEX_RM = 9, 50 | 51 | QX86_OPCODE_MAP_INDEX_COUNT = 10 52 | }; 53 | 54 | #endif /* QX86_E_OPCODE_MAP_INDEX_H */ 55 | -------------------------------------------------------------------------------- /libquix86/qx86-e-opcode-map-item-code.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPCODE_MAP_ITEM_CODE_H 26 | #define QX86_E_OPCODE_MAP_ITEM_CODE_H 27 | 28 | /** 29 | * Enumeration of opcode map item codes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_OPCODE_MAP_ITEM_CODE_NONE = -0, 37 | QX86_OPCODE_MAP_ITEM_CODE_LINK = -1, 38 | QX86_OPCODE_MAP_ITEM_CODE_PREFIX = -2 39 | }; 40 | 41 | #endif /* QX86_E_OPCODE_MAP_ITEM_CODE_H */ 42 | -------------------------------------------------------------------------------- /libquix86/qx86-e-opcode-prefix.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPCODE_PREFIX_H 26 | #define QX86_E_OPCODE_PREFIX_H 27 | 28 | /** 29 | * Enumeration of x86 opcode extension prefixes. 30 | * 31 | * \author icee 32 | * \since 1.1 33 | */ 34 | enum 35 | { 36 | QX86_OPCODE_PREFIX_NONE = 0, 37 | 38 | QX86_OPCODE_PREFIX_66 = 1, 39 | QX86_OPCODE_PREFIX_F2 = 2, 40 | QX86_OPCODE_PREFIX_F3 = 3, 41 | 42 | QX86_OPCODE_PREFIX_COUNT = 4 43 | }; 44 | 45 | #endif /* QX86_E_OPCODE_PREFIX_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-e-operand-attribute.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPERAND_ATTRIBUTE_H 26 | #define QX86_E_OPERAND_ATTRIBUTE_H 27 | 28 | /** 29 | * Enumeration of x86 operand attributes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_OPERAND_ATTRIBUTE_NONE = 0, 37 | 38 | QX86_OPERAND_ATTRIBUTE_READ = 1, 39 | QX86_OPERAND_ATTRIBUTE_WRITTEN = 2, 40 | QX86_OPERAND_ATTRIBUTE_READWRITTEN = 3, 41 | 42 | QX86_OPERAND_ATTRIBUTE_RW_CERTAIN = 4 43 | }; 44 | 45 | #endif /* QX86_E_OPERAND_ATTRIBUTE_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-e-operand-form-type.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPERAND_FORM_TYPE_H 26 | #define QX86_E_OPERAND_FORM_TYPE_H 27 | 28 | /** 29 | * Enumeration of x86 operand form types. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_OPERAND_FORM_TYPE_NONE = 0, 37 | 38 | QX86_OPERAND_FORM_TYPE_AMODE = 1, 39 | QX86_OPERAND_FORM_TYPE_IMPLICIT_1 = 2, 40 | QX86_OPERAND_FORM_TYPE_RTUPLE = 3, 41 | 42 | QX86_OPERAND_FORM_COUNT = 4 43 | }; 44 | 45 | #endif /* QX86_E_OPERAND_FORM_TYPE_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-e-operand-type.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_OPERAND_TYPE_H 26 | #define QX86_E_OPERAND_TYPE_H 27 | 28 | /** 29 | * Enumeration of x86 operand types. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_OPERAND_TYPE_NONE = 0, 37 | 38 | QX86_OPERAND_TYPE_FAR_POINTER = 1, 39 | QX86_OPERAND_TYPE_IMMEDIATE = 2, 40 | QX86_OPERAND_TYPE_JUMP_OFFSET = 3, 41 | QX86_OPERAND_TYPE_MEMORY = 4, 42 | QX86_OPERAND_TYPE_REGISTER = 5, 43 | 44 | QX86_OPERAND_TYPE_COUNT = 6 45 | }; 46 | 47 | #endif /* QX86_E_OPERAND_TYPE_H */ 48 | -------------------------------------------------------------------------------- /libquix86/qx86-e-rclass.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_RCLASS_H 26 | #define QX86_E_RCLASS_H 27 | 28 | /** 29 | * Enumeration of x86 register classes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_RCLASS_NONE = 0, 37 | QX86_RCLASS_IP = 1, 38 | QX86_RCLASS_FLAGS = 2, 39 | QX86_RCLASS_RESERVED_3 = 3, 40 | 41 | QX86_RCLASS_REG8 = 4, 42 | QX86_RCLASS_REG16 = 5, 43 | QX86_RCLASS_REG32 = 6, 44 | QX86_RCLASS_REG64 = 7, 45 | 46 | QX86_RCLASS_CREG = 8, 47 | QX86_RCLASS_DREG = 9, 48 | QX86_RCLASS_SREG = 10, 49 | QX86_RCLASS_TREG = 11, 50 | 51 | QX86_RCLASS_X87 = 12, 52 | QX86_RCLASS_MMX = 13, 53 | QX86_RCLASS_XMM = 14, 54 | QX86_RCLASS_YMM = 15, 55 | 56 | QX86_RCLASS_COUNT = 16 57 | }; 58 | 59 | #endif /* QX86_E_RCLASS_H */ 60 | -------------------------------------------------------------------------------- /libquix86/qx86-e-scale.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_SCALE_H 26 | #define QX86_E_SCALE_H 27 | 28 | /** 29 | * Enumeration of ModRM and SIB scale values. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_SCALE_NONE = 0, 37 | QX86_SCALE_X2 = 1, 38 | QX86_SCALE_X4 = 2, 39 | QX86_SCALE_X8 = 3, 40 | QX86_SCALE_INVALID = 4 41 | }; 42 | 43 | #endif /* QX86_E_SCALE_H */ 44 | -------------------------------------------------------------------------------- /libquix86/qx86-e-size.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_SIZE_H 26 | #define QX86_E_SIZE_H 27 | 28 | /** 29 | * Enumeration of x86 code, address, operand, and stack sizes. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_SIZE_16 = 0, 37 | QX86_SIZE_32 = 1, 38 | QX86_SIZE_64 = 2, 39 | QX86_SIZE_INVALID = 3, 40 | QX86_SIZE_MASK = 3 41 | }; 42 | 43 | #endif /* QX86_E_SIZE_H */ 44 | -------------------------------------------------------------------------------- /libquix86/qx86-e-subreg.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_E_SUBREG_H 26 | #define QX86_E_SUBREG_H 27 | 28 | /** 29 | * Enumeration of x86 subregisters. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | enum 35 | { 36 | QX86_SUBREG_NONE = 0, 37 | 38 | QX86_SUBREG_BASE = 1, 39 | QX86_SUBREG_LIMIT = 2, 40 | QX86_SUBREG_FLAGS = 3, 41 | 42 | QX86_SUBREG_COUNT = 4 43 | }; 44 | 45 | #endif /* QX86_E_SUBREG_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-amode-j.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_amode_j(qx86_insn *insn, int index) 27 | { 28 | qx86_operand * operand; 29 | 30 | /* Initialize operand. */ 31 | operand = insn->operands + index; 32 | operand->ot = QX86_OPERAND_TYPE_JUMP_OFFSET; 33 | operand->u.j.offsetSize = (qx86_uint8) operand->size; 34 | 35 | /* Operand size has been recorded before. */ 36 | switch (operand->size) 37 | { 38 | case 1: 39 | case 2: 40 | case 4: 41 | case 8: 42 | /* Good operand size. */ 43 | return qx86_pump(insn, operand->u.j.offset, operand->size); 44 | 45 | default: 46 | /* Invalid operand size; internal error. */ 47 | return QX86_E_INTERNAL; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-amode-o.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_amode_o(qx86_insn *insn, int index) 27 | { 28 | qx86_operand * operand; 29 | 30 | /* Initialize operand. */ 31 | operand = insn->operands + index; 32 | operand->ot = QX86_OPERAND_TYPE_MEMORY; 33 | operand->u.m.sri = QX86_REGISTER_DS; 34 | operand->u.m.bri = 0; 35 | operand->u.m.iri = 0; 36 | operand->u.m.scale = 0; 37 | operand->u.m.addressSizeOverride = QX86_SIZE_INVALID; 38 | operand->u.m.dispSize = QX86_SIZE_OCTETS(insn->attributes.addressSize); 39 | 40 | /* Handle DS override. */ 41 | if (insn->modifiers.sriOverride) operand->u.m.sri = insn->modifiers.sriOverride; 42 | 43 | /* Pump offset octets. */ 44 | return qx86_pump(insn, operand->u.m.disp, operand->u.m.dispSize); 45 | } 46 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-amode-x.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_amode_x(qx86_insn *insn, int index) 27 | { 28 | qx86_operand * operand; 29 | 30 | /* Initialize operand. */ 31 | operand = insn->operands + index; 32 | operand->ot = QX86_OPERAND_TYPE_MEMORY; 33 | operand->u.m.sri = QX86_REGISTER_DS; 34 | operand->u.m.bri = 0; 35 | operand->u.m.iri = qx86_rtuple_rSI.rindexes[insn->attributes.addressSize << 2]; 36 | operand->u.m.scale = 0; 37 | operand->u.m.addressSizeOverride = QX86_SIZE_INVALID; 38 | operand->u.m.dispSize = 0; 39 | 40 | /* Handle DS override. */ 41 | if (insn->modifiers.sriOverride) operand->u.m.sri = insn->modifiers.sriOverride; 42 | 43 | /* Success. */ 44 | return QX86_SUCCESS; 45 | } 46 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-amode-y.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_amode_y(qx86_insn *insn, int index) 27 | { 28 | qx86_operand * operand; 29 | 30 | /* Initialize operand. */ 31 | operand = insn->operands + index; 32 | operand->ot = QX86_OPERAND_TYPE_MEMORY; 33 | operand->u.m.sri = QX86_REGISTER_ES; 34 | operand->u.m.bri = 0; 35 | operand->u.m.iri = qx86_rtuple_rDI.rindexes[insn->attributes.addressSize << 2]; 36 | operand->u.m.scale = 0; 37 | operand->u.m.addressSizeOverride = QX86_SIZE_INVALID; 38 | operand->u.m.dispSize = 0; 39 | 40 | /* Success. */ 41 | return QX86_SUCCESS; 42 | } 43 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-implicit-1.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_implicit_1(qx86_insn *insn, int index) 27 | { 28 | qx86_operand * operand; 29 | 30 | /* Initialize operand. */ 31 | operand = insn->operands + index; 32 | operand->ot = QX86_OPERAND_TYPE_IMMEDIATE; 33 | operand->size = 1; 34 | operand->u.i.value[0] = 1; 35 | operand->u.i.valueSize = 1; 36 | operand->u.i.extended[0] = 1; 37 | operand->u.i.extendedSize = 1; 38 | 39 | /* Success. */ 40 | return QX86_SUCCESS; 41 | } 42 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-operand.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_operand(qx86_insn *insn, int index) 27 | { 28 | /* Copy operand attributes. */ 29 | insn->operands[index].attributes = insn->operandForms[index]->attributes; 30 | 31 | /* Call appropriate functions. */ 32 | switch (insn->operandForms[index]->ft) 33 | { 34 | case QX86_OPERAND_FORM_TYPE_AMODE: 35 | /* Decode amode operand. */ 36 | return qx86_decode_amode(insn, index); 37 | 38 | case QX86_OPERAND_FORM_TYPE_IMPLICIT_1: 39 | /* Decode implicit 1 operand. */ 40 | return qx86_decode_implicit_1(insn, index); 41 | 42 | case QX86_OPERAND_FORM_TYPE_RTUPLE: 43 | /* Decode rtuple operand. */ 44 | return qx86_decode_rtuple(insn, index); 45 | 46 | default: 47 | /* Invalid ft value; internal error. */ 48 | return QX86_E_INTERNAL; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /libquix86/qx86-f-decode-rtuple.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | static int 26 | qx86_decode_rtuple(qx86_insn *insn, int index) 27 | { 28 | qx86_operand * operand; 29 | qx86_rtuple * rtuple; 30 | 31 | int rindex; 32 | 33 | /* Get rtuple and extract rindex. */ 34 | rtuple = insn->operandForms[index]->u.r.rtuple; 35 | rindex = (insn->attributes.operandSize << 2) | insn->modifiers.extendedB; 36 | rindex = rtuple->rindexes[rindex]; 37 | 38 | /* Validate rindex. */ 39 | if (QX86_REGISTER_INVALID == rindex) return QX86_E_INTERNAL; 40 | 41 | /* Initialize operand. */ 42 | operand = insn->operands + index; 43 | operand->ot = QX86_OPERAND_TYPE_REGISTER; 44 | operand->size = qx86_rtab[rindex].size; 45 | operand->u.r.rindex = rindex; 46 | 47 | /* Success. */ 48 | return QX86_SUCCESS; 49 | } 50 | -------------------------------------------------------------------------------- /libquix86/qx86-f-extract-address.inl: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_F_EXTRACT_ADDRESS_INL 26 | #define QX86_F_EXTRACT_ADDRESS_INL 27 | 28 | QX86_INLINE static int 29 | qx86_extract_address(qx86_uint8 *octets, qx86_uint64 *address) 30 | { 31 | # ifdef QUIX86_BIG_ENDIAN 32 | { 33 | /* Big endian. Compiler will optimize this, I believe. */ 34 | ((qx86_octet *) address)[0] = octets[7]; 35 | ((qx86_octet *) address)[1] = octets[6]; 36 | ((qx86_octet *) address)[2] = octets[5]; 37 | ((qx86_octet *) address)[3] = octets[4]; 38 | ((qx86_octet *) address)[4] = octets[3]; 39 | ((qx86_octet *) address)[5] = octets[2]; 40 | ((qx86_octet *) address)[6] = octets[1]; 41 | ((qx86_octet *) address)[7] = octets[0]; 42 | } 43 | # else 44 | { 45 | /* Little endian. Use one move. */ 46 | *address = *((qx86_uint64 *) octets); 47 | } 48 | # endif 49 | 50 | /* Success. */ 51 | return QX86_SUCCESS; 52 | } 53 | 54 | #endif /* QX86_F_EXTRACT_ADDRESS_INL */ 55 | -------------------------------------------------------------------------------- /libquix86/qx86-f-minfo-rename.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | void 26 | qx86_minfo_rename(int mindex, QX86_CONST char *name) 27 | { 28 | /* Test for bad mindex. */ 29 | if ((mindex >= 0) && (mindex < QX86_MNEMONIC_COUNT)) 30 | { 31 | /* Good value. */ 32 | if (name) 33 | { 34 | /* Update. */ 35 | qx86_mtab[mindex].name = name; 36 | } 37 | else 38 | { 39 | /* Revert to reference name. */ 40 | qx86_mtab[mindex].name = qx86_mtab[mindex].referenceName; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /libquix86/qx86-f-minfo.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | QX86_CONST qx86_mtab_item * 26 | qx86_minfo(int mindex) 27 | { 28 | /* Test for bad mindex. */ 29 | if ((mindex >= 0) && (mindex < QX86_MNEMONIC_COUNT)) 30 | { 31 | /* Good value. */ 32 | return qx86_mtab + mindex; 33 | } 34 | else 35 | { 36 | /* Bad value. */ 37 | return 0; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libquix86/qx86-f-pump.inl: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_F_PUMP_INL 26 | #define QX86_F_PUMP_INL 27 | 28 | QX86_INLINE static int 29 | qx86_pump(qx86_insn *insn, qx86_uint8 *octets, int size) 30 | { 31 | /* Make sure we have at least size octets left. */ 32 | if (((qx86_ctx *) insn->data)->ptrSize >= size) 33 | { 34 | /* Copy octets. Can't use memcpy() here because some compilers would 35 | emit an actual call instead of an intrinsic. */ 36 | for (((qx86_ctx *) insn->data)->ptrSize -= size; size; --size) 37 | { 38 | /* Copy one octet. */ 39 | insn->raw[insn->rawSize++] = *octets++ = *(((qx86_ctx *) insn->data)->ptr++); 40 | } 41 | 42 | /* Success. */ 43 | return QX86_SUCCESS; 44 | } 45 | else 46 | { 47 | /* Incomplete instruction. */ 48 | return QX86_E_INSN_INCOMPLETE; 49 | } 50 | } 51 | 52 | #endif /* QX86_F_PUMP_INL */ 53 | -------------------------------------------------------------------------------- /libquix86/qx86-f-rinfo-rename.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | void 26 | qx86_rinfo_rename(int rindex, QX86_CONST char *name) 27 | { 28 | /* Test for bad rindex. */ 29 | if ((rindex >= 0) && (rindex < QX86_REGISTER_COUNT)) 30 | { 31 | /* Good value. */ 32 | if (name) 33 | { 34 | /* Update. */ 35 | qx86_rtab[rindex].name = name; 36 | } 37 | else 38 | { 39 | /* Revert to reference name. */ 40 | qx86_rtab[rindex].name = qx86_rtab[rindex].referenceName; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /libquix86/qx86-f-rinfo.c: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | QX86_CONST qx86_rtab_item * 26 | qx86_rinfo(int rindex) 27 | { 28 | /* Test for bad rindex. */ 29 | if ((rindex >= 0) && (rindex < QX86_REGISTER_COUNT)) 30 | { 31 | /* Good value. */ 32 | return qx86_rtab + rindex; 33 | } 34 | else 35 | { 36 | /* Bad value. */ 37 | return 0; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libquix86/qx86-f-unpump.inl: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_F_UNPUMP_INL 26 | #define QX86_F_UNPUMP_INL 27 | 28 | QX86_INLINE static int 29 | qx86_unpump(qx86_insn *insn) 30 | { 31 | /* Unwind ptr and ptrSize. */ 32 | --(((qx86_ctx *) insn->data)->ptr); 33 | ++(((qx86_ctx *) insn->data)->ptrSize); 34 | 35 | /* Decrement rawSize. */ 36 | --insn->rawSize; 37 | 38 | /* Success. */ 39 | return QX86_SUCCESS; 40 | } 41 | 42 | #endif /* QX86_F_UNPUMP_INL */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-t-amode.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_AMODE_H 26 | #define QX86_T_AMODE_H 27 | 28 | /** 29 | * Addressing mode definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_amode 35 | { 36 | QX86_CONST char * referenceName; 37 | QX86_CONST char * name; 38 | 39 | qx86_uint8 modrmField; 40 | qx86_uint8 rclass; 41 | 42 | int (*decodeFunc)(qx86_insn *, int); 43 | }; 44 | 45 | #endif /* QX86_T_AMODE_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-t-callback.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_CALLBACK_H 26 | #define QX86_T_CALLBACK_H 27 | 28 | /** 29 | * Callback function definition. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | typedef int (*qx86_callback)(void *data, int rindex, int subreg, unsigned char *value); 35 | 36 | #endif /* QX86_T_CALLBACK_H */ 37 | -------------------------------------------------------------------------------- /libquix86/qx86-t-ctx.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_CTX_H 26 | #define QX86_T_CTX_H 27 | 28 | /** 29 | * Decode context structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_ctx 35 | { 36 | qx86_uint8 * ptr; 37 | int ptrSize; 38 | 39 | int pumpIndex; 40 | }; 41 | 42 | #endif /* QX86_T_CTX_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-t-insn-attributes.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_INSN_ATTRIBUTES_H 26 | #define QX86_T_INSN_ATTRIBUTES_H 27 | 28 | /** 29 | * Instruction attributes definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_insn_attributes 35 | { 36 | qx86_uint8 addressSize; 37 | qx86_uint8 addressSizeOverridden; 38 | 39 | qx86_uint8 operandSize; 40 | qx86_uint8 operandSizeOverridden; 41 | 42 | qx86_uint8 interlocked; 43 | }; 44 | 45 | #endif /* QX86_T_INSN_ATTRIBUTES_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-t-insn-modifiers.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_INSN_MODIFIERS_H 26 | #define QX86_T_INSN_MODIFIERS_H 27 | 28 | /** 29 | * Instruction modifiers definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_insn_modifiers 35 | { 36 | qx86_uint8 modrm; 37 | qx86_int8 modrmIndex; 38 | 39 | qx86_uint8 sib; 40 | qx86_int8 sibIndex; 41 | 42 | qx86_uint8 rex; 43 | qx86_int8 rexIndex; 44 | 45 | qx86_uint8 prefixSize; 46 | 47 | qx86_uint8 escape; 48 | qx86_uint8 opcodePrefix; 49 | 50 | /* XXX: values 0x00, 0xF2, 0xF3. */ 51 | qx86_uint8 repeatPrefix; 52 | 53 | int sriOverride; 54 | 55 | qx86_uint8 extendedB; 56 | qx86_uint8 extendedR; 57 | qx86_uint8 extendedX; 58 | }; 59 | 60 | #endif /* QX86_T_INSN_MODIFIERS_H */ 61 | -------------------------------------------------------------------------------- /libquix86/qx86-t-mtab-item.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_MTAB_ITEM_H 26 | #define QX86_T_MTAB_ITEM_H 27 | 28 | /** 29 | * Mnemonic table item definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_mtab_item 35 | { 36 | QX86_CONST char * referenceName; 37 | QX86_CONST char * name; 38 | 39 | qx86_uint8 attributes; 40 | 41 | qx86_uint8 iclass; 42 | qx86_uint8 cc; 43 | 44 | int demoted; 45 | int promoted; 46 | }; 47 | 48 | #endif /* QX86_T_MTAB_ITEM_H */ 49 | -------------------------------------------------------------------------------- /libquix86/qx86-t-opcode-map-item.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPCODE_MAP_ITEM_H 26 | #define QX86_T_OPCODE_MAP_ITEM_H 27 | 28 | #include 29 | 30 | /** 31 | * Opcode map item definition structure. 32 | * 33 | * \author icee 34 | * \since 1.0 35 | */ 36 | struct qx86_opcode_map_item 37 | { 38 | int code; 39 | qx86_opcode_map * link; 40 | 41 | int operandCount; 42 | qx86_operand_form operandForms[QX86_OPERAND_NMAX]; 43 | }; 44 | 45 | #endif /* QX86_T_OPCODE_MAP_ITEM_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-t-opcode-map.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPCODE_MAP_H 26 | #define QX86_T_OPCODE_MAP_H 27 | 28 | /** 29 | * Opcode map definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_opcode_map 35 | { 36 | qx86_uint8 index; 37 | qx86_uint8 limit; 38 | 39 | qx86_opcode_map_item * items; 40 | }; 41 | 42 | #endif /* QX86_T_OPCODE_MAP_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-far-pointer.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_FAR_POINTER_H 26 | #define QX86_T_OPERAND_FAR_POINTER_H 27 | 28 | /** 29 | * Far pointer instruction operand definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_far_pointer 35 | { 36 | qx86_uint8 offset[QX86_IMMEDIATE_SIZE_MAX]; 37 | qx86_uint8 offsetSize; 38 | 39 | qx86_uint8 selector[2]; 40 | }; 41 | 42 | #endif /* QX86_T_OPERAND_FAR_POINTER_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-form-amode.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_FORM_AMODE_H 26 | #define QX86_T_OPERAND_FORM_AMODE_H 27 | 28 | /** 29 | * Addressing mode instruction operand form definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_form_amode 35 | { 36 | qx86_amode * amode; 37 | qx86_stuple * stuple; 38 | }; 39 | 40 | #endif /* QX86_T_OPERAND_FORM_AMODE_H */ 41 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-form-rtuple.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_FORM_RTUPLE_H 26 | #define QX86_T_OPERAND_FORM_RTUPLE_H 27 | 28 | /** 29 | * Register tuple instruction operand form definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_form_rtuple 35 | { 36 | qx86_rtuple * rtuple; 37 | }; 38 | 39 | #endif /* QX86_T_OPERAND_FORM_RTUPLE_H */ 40 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-form-union.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_FORM_UNION_H 26 | #define QX86_T_OPERAND_FORM_UNION_H 27 | 28 | #include 29 | #include 30 | 31 | /** 32 | * Instruction operand form definition union. 33 | * 34 | * \author icee 35 | * \since 1.0 36 | */ 37 | union qx86_operand_form_union 38 | { 39 | QX86_CONST void * initializer[2]; 40 | 41 | qx86_operand_form_amode a; 42 | qx86_operand_form_rtuple r; 43 | }; 44 | 45 | #endif /* QX86_T_OPERAND_FORM_UNION_H */ 46 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-form.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_FORM_H 26 | #define QX86_T_OPERAND_FORM_H 27 | 28 | #include 29 | 30 | /** 31 | * Instruction operand form definition structure. 32 | * 33 | * \author icee 34 | * \since 1.0 35 | */ 36 | struct qx86_operand_form 37 | { 38 | int ft; 39 | int attributes; 40 | qx86_operand_form_union u; 41 | }; 42 | 43 | #endif /* QX86_T_OPERAND_FORM_H */ 44 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-immediate.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_IMMEDIATE_H 26 | #define QX86_T_OPERAND_IMMEDIATE_H 27 | 28 | /** 29 | * Immediate instruction operand definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_immediate 35 | { 36 | qx86_uint8 value[QX86_IMMEDIATE_SIZE_MAX]; 37 | qx86_uint8 valueSize; 38 | 39 | qx86_uint8 extended[QX86_IMMEDIATE_SIZE_MAX]; 40 | qx86_uint8 extendedSize; 41 | }; 42 | 43 | #endif /* QX86_T_OPERAND_IMMEDIATE_H */ 44 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-jump-offset.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_JUMP_OFFSET_H 26 | #define QX86_T_OPERAND_JUMP_OFFSET_H 27 | 28 | /** 29 | * Jump offset instruction operand definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_jump_offset 35 | { 36 | qx86_uint8 offset[QX86_IMMEDIATE_SIZE_MAX]; 37 | qx86_uint8 offsetSize; 38 | }; 39 | 40 | #endif /* QX86_T_OPERAND_JUMP_OFFSET_H */ 41 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-memory.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_MEMORY_H 26 | #define QX86_T_OPERAND_MEMORY_H 27 | 28 | /** 29 | * Memory instruction operand definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_memory 35 | { 36 | int sri; 37 | int bri; 38 | int iri; 39 | 40 | int scale; 41 | int addressSizeOverride; 42 | 43 | qx86_uint8 disp[QX86_IMMEDIATE_SIZE_MAX]; 44 | qx86_uint8 dispSize; 45 | }; 46 | 47 | #endif /* QX86_T_OPERAND_MEMORY_H */ 48 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-register.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_REGISTER_H 26 | #define QX86_T_OPERAND_REGISTER_H 27 | 28 | /** 29 | * Register instruction operand definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_operand_register 35 | { 36 | int rindex; 37 | }; 38 | 39 | #endif /* QX86_T_OPERAND_REGISTER_H */ 40 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand-union.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_UNION_H 26 | #define QX86_T_OPERAND_UNION_H 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | /** 35 | * Instruction operand definition union. 36 | * 37 | * \author icee 38 | * \since 1.0 39 | */ 40 | union qx86_operand_union 41 | { 42 | qx86_operand_far_pointer f; 43 | qx86_operand_immediate i; 44 | qx86_operand_jump_offset j; 45 | qx86_operand_memory m; 46 | qx86_operand_register r; 47 | }; 48 | 49 | #endif /* QX86_T_OPERAND_UNION_H */ 50 | -------------------------------------------------------------------------------- /libquix86/qx86-t-operand.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_OPERAND_H 26 | #define QX86_T_OPERAND_H 27 | 28 | #include 29 | 30 | /** 31 | * Instruction operand definition structure. 32 | * 33 | * \author icee 34 | * \since 1.0 35 | */ 36 | struct qx86_operand 37 | { 38 | qx86_uint8 ot; 39 | 40 | int attributes; 41 | int size; 42 | 43 | qx86_operand_union u; 44 | }; 45 | 46 | #endif /* QX86_T_OPERAND_H */ 47 | -------------------------------------------------------------------------------- /libquix86/qx86-t-print-item.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_PRINT_ITEM_H 26 | #define QX86_T_PRINT_ITEM_H 27 | 28 | /** 29 | * Print item definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_print_item 35 | { 36 | QX86_CONST qx86_uint8 * number; 37 | int numberSize; 38 | 39 | QX86_CONST char * string; 40 | }; 41 | 42 | #endif /* QX86_T_PRINT_ITEM_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-t-print-options-intel.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_PRINT_OPTIONS_INTEL_H 26 | #define QX86_T_PRINT_OPTIONS_INTEL_H 27 | 28 | /** 29 | * Intel print options structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_print_options_intel 35 | { 36 | int flipCase : 1; 37 | }; 38 | 39 | #endif /* QX86_T_PRINT_OPTIONS_INTEL_H */ 40 | -------------------------------------------------------------------------------- /libquix86/qx86-t-rtab-item.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_RTAB_ITEM_H 26 | #define QX86_T_RTAB_ITEM_H 27 | 28 | /** 29 | * Register table item definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_rtab_item 35 | { 36 | QX86_CONST char * referenceName; 37 | QX86_CONST char * name; 38 | 39 | qx86_uint8 rclass; 40 | qx86_uint8 size; 41 | }; 42 | 43 | #endif /* QX86_T_RTAB_ITEM_H */ 44 | -------------------------------------------------------------------------------- /libquix86/qx86-t-rtuple.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_RTUPLE_H 26 | #define QX86_T_RTUPLE_H 27 | 28 | /** 29 | * Register tuple definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_rtuple 35 | { 36 | QX86_CONST char * referenceName; 37 | QX86_CONST char * name; 38 | 39 | int rindexes[12]; 40 | }; 41 | 42 | #endif /* QX86_T_RTUPLE_H */ 43 | -------------------------------------------------------------------------------- /libquix86/qx86-t-stuple.h: -------------------------------------------------------------------------------- 1 | /* +------------------------------------------------------------------------+ 2 | | quix86 | 3 | +------------------------------------------------------------------------+ 4 | | This file is part of quix86, an x86-64 instruction decoder. | 5 | | | 6 | | Copyright (C) 2011 Institute for System Programming of Russian Academy | 7 | | of Sciences. | 8 | | | 9 | | Contact e-mail: . | 10 | | | 11 | | quix86 is free software: you can redistribute it and/or modify it | 12 | | under the terms of the GNU Lesser General Public License as published | 13 | | by the Free Software Foundation, either version 3 of the License, or | 14 | | (at your option) any later version. | 15 | | | 16 | | quix86 is distributed in the hope that it will be useful, but WITHOUT | 17 | | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 18 | | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 19 | | License for more details. | 20 | | | 21 | | You should have received a copy of the GNU Lesser General Public | 22 | | License along with quix86. If not, see . | 23 | +------------------------------------------------------------------------+ */ 24 | 25 | #ifndef QX86_T_STUPLE_H 26 | #define QX86_T_STUPLE_H 27 | 28 | /** 29 | * Size tuple definition structure. 30 | * 31 | * \author icee 32 | * \since 1.0 33 | */ 34 | struct qx86_stuple 35 | { 36 | QX86_CONST char * referenceName; 37 | QX86_CONST char * name; 38 | 39 | QX86_CONST char * atoms[4]; 40 | int sizes[4]; 41 | }; 42 | 43 | #endif /* QX86_T_STUPLE_H */ 44 | --------------------------------------------------------------------------------