mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 06:59:13 +02:00
* fixed for $H+
This commit is contained in:
parent
bf08db9b7b
commit
e0f66581eb
@ -196,9 +196,7 @@ unit ag386int;
|
|||||||
getopstr:=hs;
|
getopstr:=hs;
|
||||||
end;
|
end;
|
||||||
top_symbol : begin
|
top_symbol : begin
|
||||||
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
|
hs:='offset '+strpas(pchar(pcsymbol(o)^.symbol));
|
||||||
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
|
|
||||||
hs:='offset '+hs;
|
|
||||||
if pcsymbol(o)^.offset>0 then
|
if pcsymbol(o)^.offset>0 then
|
||||||
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
||||||
else
|
else
|
||||||
@ -220,8 +218,7 @@ unit ag386int;
|
|||||||
top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
|
top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
|
||||||
top_const : getopstr_jmp:=tostr(longint(o));
|
top_const : getopstr_jmp:=tostr(longint(o));
|
||||||
top_symbol : begin
|
top_symbol : begin
|
||||||
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
|
hs:=strpas(pchar(pcsymbol(o)^.symbol));
|
||||||
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
|
|
||||||
if pcsymbol(o)^.offset>0 then
|
if pcsymbol(o)^.offset>0 then
|
||||||
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
||||||
else
|
else
|
||||||
@ -595,7 +592,10 @@ ait_stab_function_name : ;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ readded ait_marker support
|
||||||
|
|
||||||
Revision 1.18 1998/11/12 11:19:33 pierre
|
Revision 1.18 1998/11/12 11:19:33 pierre
|
||||||
|
@ -202,8 +202,7 @@ unit ag386nsm;
|
|||||||
getopstr:=hs;
|
getopstr:=hs;
|
||||||
end;
|
end;
|
||||||
top_symbol : begin
|
top_symbol : begin
|
||||||
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
|
hs:=strpas(pchar(pcsymbol(o)^.symbol));
|
||||||
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
|
|
||||||
hs:='dword '+hs;
|
hs:='dword '+hs;
|
||||||
if pcsymbol(o)^.offset>0 then
|
if pcsymbol(o)^.offset>0 then
|
||||||
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
||||||
@ -226,8 +225,7 @@ unit ag386nsm;
|
|||||||
top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
|
top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
|
||||||
top_const : getopstr_jmp:=tostr(longint(o));
|
top_const : getopstr_jmp:=tostr(longint(o));
|
||||||
top_symbol : begin
|
top_symbol : begin
|
||||||
hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
|
hs:=strpas(pchar(pcsymbol(o)^.symbol));
|
||||||
move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
|
|
||||||
if pcsymbol(o)^.offset>0 then
|
if pcsymbol(o)^.offset>0 then
|
||||||
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
|
||||||
else
|
else
|
||||||
@ -584,7 +582,10 @@ ait_stab_function_name : ;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* fix for first line of function break
|
||||||
|
|
||||||
Revision 1.11 1998/10/12 12:20:42 pierre
|
Revision 1.11 1998/10/12 12:20:42 pierre
|
||||||
|
@ -744,7 +744,15 @@ end;
|
|||||||
PadZero := TRUE;
|
PadZero := TRUE;
|
||||||
{ Fill it up with the specified character }
|
{ Fill it up with the specified character }
|
||||||
fillchar(s[length(s)+1],n-1,#0);
|
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;
|
end;
|
||||||
|
|
||||||
{*************************************************************************}
|
{*************************************************************************}
|
||||||
@ -1779,7 +1787,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* recordtype.field support in constant expressions
|
||||||
* fixed imul for oa_imm8 which was not allowed
|
* fixed imul for oa_imm8 which was not allowed
|
||||||
* fixed reading of local typed constants
|
* fixed reading of local typed constants
|
||||||
|
@ -43,7 +43,7 @@ unit Ra386dir;
|
|||||||
ende : boolean;
|
ende : boolean;
|
||||||
sym : psym;
|
sym : psym;
|
||||||
code : paasmoutput;
|
code : paasmoutput;
|
||||||
l : longint;
|
i,l : longint;
|
||||||
|
|
||||||
procedure writeasmline;
|
procedure writeasmline;
|
||||||
var
|
var
|
||||||
@ -52,7 +52,15 @@ unit Ra386dir;
|
|||||||
i:=length(s);
|
i:=length(s);
|
||||||
while (i>0) and (s[i] in [' ',#9]) do
|
while (i>0) and (s[i] in [' ',#9]) do
|
||||||
dec(i);
|
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
|
if s<>'' then
|
||||||
code^.concat(new(pai_direct,init(strpnew(s))));
|
code^.concat(new(pai_direct,init(strpnew(s))));
|
||||||
{ consider it set function set if the offset was loaded }
|
{ consider it set function set if the offset was loaded }
|
||||||
@ -81,17 +89,27 @@ unit Ra386dir;
|
|||||||
current_scanner^.gettokenpos; }
|
current_scanner^.gettokenpos; }
|
||||||
case c of
|
case c of
|
||||||
'A'..'Z','a'..'z','_' : begin
|
'A'..'Z','a'..'z','_' : begin
|
||||||
hs:='';
|
|
||||||
current_scanner^.gettokenpos;
|
current_scanner^.gettokenpos;
|
||||||
|
i:=0;
|
||||||
|
hs:='';
|
||||||
while ((ord(c)>=ord('A')) and (ord(c)<=ord('Z')))
|
while ((ord(c)>=ord('A')) and (ord(c)<=ord('Z')))
|
||||||
or ((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 ((ord(c)>=ord('0')) and (ord(c)<=ord('9')))
|
||||||
or (c='_') do
|
or (c='_') do
|
||||||
begin
|
begin
|
||||||
inc(byte(hs[0]));
|
inc(i);
|
||||||
hs[length(hs)]:=c;
|
hs[i]:=c;
|
||||||
c:=current_scanner^.asmgetchar;
|
c:=current_scanner^.asmgetchar;
|
||||||
end;
|
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
|
if upper(hs)='END' then
|
||||||
ende:=true
|
ende:=true
|
||||||
else
|
else
|
||||||
@ -249,7 +267,15 @@ unit Ra386dir;
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
current_scanner^.gettokenpos;
|
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;
|
s[length(s)]:=c;
|
||||||
c:=current_scanner^.asmgetchar;
|
c:=current_scanner^.asmgetchar;
|
||||||
end;
|
end;
|
||||||
@ -262,7 +288,10 @@ unit Ra386dir;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ added -Se in Makefile cvstest target
|
||||||
+ lexlevel cleanup
|
+ lexlevel cleanup
|
||||||
normal_function_level main_program_level and unit_init_level defined
|
normal_function_level main_program_level and unit_init_level defined
|
||||||
|
Loading…
Reference in New Issue
Block a user