* changed max_operands to 2 for the Z80

git-svn-id: branches/z80@44758 -
This commit is contained in:
nickysn 2020-04-17 23:34:56 +00:00
parent 66462fec68
commit 4b01ff605a
4 changed files with 209 additions and 206 deletions

View File

@ -23,6 +23,7 @@ uses
const const
Version = '1.0.0'; Version = '1.0.0';
HeaderStr = '{ don''t edit, this file is generated from z80ins.dat; to regenerate, run ''make insdat'' in the compiler directory }'; HeaderStr = '{ don''t edit, this file is generated from z80ins.dat; to regenerate, run ''make insdat'' in the compiler directory }';
max_operands = 2;
ParamTypes: array [0..40,0..1] of string = ( ParamTypes: array [0..40,0..1] of string = (
('void', 'OT_NONE'), ('void', 'OT_NONE'),
@ -201,7 +202,9 @@ begin
Writeln(OutputFiles.InsTabFile,' opcode : A_',op,';'); Writeln(OutputFiles.InsTabFile,' opcode : A_',op,';');
Writeln(OutputFiles.InsTabFile,' ops : ',Length(S_Params),';'); Writeln(OutputFiles.InsTabFile,' ops : ',Length(S_Params),';');
Write(OutputFiles.InsTabFile, ' optypes : ('); Write(OutputFiles.InsTabFile, ' optypes : (');
for ParamIdx:=0 to 3 do if Length(S_Params)>max_operands then
raise Exception.Create('Too many operands');
for ParamIdx:=0 to max_operands-1 do
begin begin
if ParamIdx<>0 then if ParamIdx<>0 then
Write(OutputFiles.InsTabFile,','); Write(OutputFiles.InsTabFile,',');

View File

@ -88,7 +88,7 @@ uses
tinsentry = record tinsentry = record
opcode : tasmop; opcode : tasmop;
ops : byte; ops : byte;
optypes : array[0..3] of toperandtype; optypes : array[0..max_operands-1] of toperandtype;
code : array[0..maxinfolen] of char; code : array[0..maxinfolen] of char;
flags : longint; flags : longint;
end; end;

View File

@ -143,7 +143,7 @@ unit cpubase;
*****************************************************************************} *****************************************************************************}
const const
max_operands = 4; max_operands = 2;
maxintregs = 15; maxintregs = 15;
maxfpuregs = 0; maxfpuregs = 0;

File diff suppressed because it is too large Load Diff