* fixed for $H+

This commit is contained in:
peter 1998-11-17 00:26:09 +00:00
parent bf08db9b7b
commit e0f66581eb
4 changed files with 61 additions and 20 deletions

View File

@ -196,9 +196,7 @@ unit ag386int;
getopstr:=hs;
end;
top_symbol : begin
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
hs:='offset '+hs;
hs:='offset '+strpas(pchar(pcsymbol(o)^.symbol));
if pcsymbol(o)^.offset>0 then
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
else
@ -220,8 +218,7 @@ unit ag386int;
top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
top_const : getopstr_jmp:=tostr(longint(o));
top_symbol : begin
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
hs:=strpas(pchar(pcsymbol(o)^.symbol));
if pcsymbol(o)^.offset>0 then
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
else
@ -595,7 +592,10 @@ ait_stab_function_name : ;
end.
{
$Log$
Revision 1.19 1998-11-16 12:38:05 jonas
Revision 1.20 1998-11-17 00:26:09 peter
* fixed for $H+
Revision 1.19 1998/11/16 12:38:05 jonas
+ readded ait_marker support
Revision 1.18 1998/11/12 11:19:33 pierre

View File

@ -202,8 +202,7 @@ unit ag386nsm;
getopstr:=hs;
end;
top_symbol : begin
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
hs:=strpas(pchar(pcsymbol(o)^.symbol));
hs:='dword '+hs;
if pcsymbol(o)^.offset>0 then
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
@ -226,8 +225,7 @@ unit ag386nsm;
top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
top_const : getopstr_jmp:=tostr(longint(o));
top_symbol : begin
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
hs:=strpas(pchar(pcsymbol(o)^.symbol));
if pcsymbol(o)^.offset>0 then
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
else
@ -584,7 +582,10 @@ ait_stab_function_name : ;
end.
{
$Log$
Revision 1.12 1998-11-12 11:19:34 pierre
Revision 1.13 1998-11-17 00:26:10 peter
* fixed for $H+
Revision 1.12 1998/11/12 11:19:34 pierre
* fix for first line of function break
Revision 1.11 1998/10/12 12:20:42 pierre

View File

@ -744,7 +744,15 @@ end;
PadZero := TRUE;
{ Fill it up with the specified character }
fillchar(s[length(s)+1],n-1,#0);
s[0] := chr(n);
{$ifndef TP}
{$ifopt H+}
setlength(s,n);
{$else}
s[0] := chr(n);
{$endif}
{$else}
s[0] := chr(n);
{$endif}
end;
{*************************************************************************}
@ -1779,7 +1787,10 @@ end;
end.
{
$Log$
Revision 1.14 1998-11-05 23:48:17 peter
Revision 1.15 1998-11-17 00:26:11 peter
* fixed for $H+
Revision 1.14 1998/11/05 23:48:17 peter
* recordtype.field support in constant expressions
* fixed imul for oa_imm8 which was not allowed
* fixed reading of local typed constants

View File

@ -43,7 +43,7 @@ unit Ra386dir;
ende : boolean;
sym : psym;
code : paasmoutput;
l : longint;
i,l : longint;
procedure writeasmline;
var
@ -52,7 +52,15 @@ unit Ra386dir;
i:=length(s);
while (i>0) and (s[i] in [' ',#9]) do
dec(i);
s[0]:=chr(i);
{$ifndef TP}
{$ifopt H+}
setlength(s,i);
{$else}
s[0]:=chr(i);
{$endif}
{$else}
s[0]:=chr(i);
{$endif}
if s<>'' then
code^.concat(new(pai_direct,init(strpnew(s))));
{ consider it set function set if the offset was loaded }
@ -81,17 +89,27 @@ unit Ra386dir;
current_scanner^.gettokenpos; }
case c of
'A'..'Z','a'..'z','_' : begin
hs:='';
current_scanner^.gettokenpos;
i:=0;
hs:='';
while ((ord(c)>=ord('A')) and (ord(c)<=ord('Z')))
or ((ord(c)>=ord('a')) and (ord(c)<=ord('z')))
or ((ord(c)>=ord('0')) and (ord(c)<=ord('9')))
or (c='_') do
begin
inc(byte(hs[0]));
hs[length(hs)]:=c;
inc(i);
hs[i]:=c;
c:=current_scanner^.asmgetchar;
end;
{$ifndef TP}
{$ifopt H+}
setlength(hs,i);
{$else}
hs[0]:=chr(i);
{$endif}
{$else}
hs[0]:=chr(i);
{$endif}
if upper(hs)='END' then
ende:=true
else
@ -249,7 +267,15 @@ unit Ra386dir;
else
begin
current_scanner^.gettokenpos;
inc(byte(s[0]));
{$ifndef TP}
{$ifopt H+}
setlength(s,length(s)+1);
{$else}
inc(byte(s[0]));
{$endif}
{$else}
inc(byte(s[0]));
{$endif}
s[length(s)]:=c;
c:=current_scanner^.asmgetchar;
end;
@ -262,7 +288,10 @@ unit Ra386dir;
end.
{
$Log$
Revision 1.10 1998-11-13 15:40:28 pierre
Revision 1.11 1998-11-17 00:26:12 peter
* fixed for $H+
Revision 1.10 1998/11/13 15:40:28 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined