1 { 2 Copyright (c) 1998-2006 by Carl Eric Codere and Peter Vreman 3 4 Does the parsing for the i386 intel styled inline assembler. 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 20 **************************************************************************** 21 } 22 Unit ra386int; 23 24 {$i fpcdefs.inc} 25 26 interface 27 28 uses 29 rax86int; 30 31 type 32 ti386intreader = class(tx86intreader) 33 // procedure handleopcode;override; 34 end; 35 36 37 implementation 38 39 uses 40 rabase,systems,rax86,aasmcpu; 41 42 (* 43 procedure ti386intreader.handleopcode; 44 var 45 instr : Tx86Instruction; 46 begin 47 instr:=Tx86Instruction.Create(Tx86Operand); 48 instr.OpOrder:=op_att; 49 BuildOpcode(instr); 50 instr.AddReferenceSizes; 51 instr.SetInstructionOpsize; 52 { 53 instr.CheckOperandSizes; 54 } 55 instr.ConcatInstruction(curlist); 56 instr.Free; 57 end; 58 *) 59 60 {***************************************************************************** 61 Initialize 62 *****************************************************************************} 63 64 const 65 asmmode_i386_intel_info : tasmmodeinfo = 66 ( 67 id : asmmode_i386_intel; 68 idtxt : 'INTEL'; 69 casmreader : ti386intreader; 70 ); 71 72 begin 73 RegisterAsmMode(asmmode_i386_intel_info); 74 end. 75