mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:06:14 +02:00
* more mpw fixes
This commit is contained in:
parent
946f939f85
commit
d3bdd3550f
@ -348,6 +348,38 @@ interface
|
|||||||
else
|
else
|
||||||
{ process operands }
|
{ process operands }
|
||||||
begin
|
begin
|
||||||
|
case op of
|
||||||
|
A_MFSPR:
|
||||||
|
case taicpu(hp).oper[1].reg of
|
||||||
|
R_CR:
|
||||||
|
begin
|
||||||
|
op:=A_MFCR;
|
||||||
|
taicpu(hp).ops:=1;
|
||||||
|
end;
|
||||||
|
R_LR:
|
||||||
|
begin
|
||||||
|
op:=A_MFLR;
|
||||||
|
taicpu(hp).ops:=1;
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
internalerror(2002100701);
|
||||||
|
end;
|
||||||
|
A_MTSPR:
|
||||||
|
case taicpu(hp).oper[1].reg of
|
||||||
|
R_CR:
|
||||||
|
begin
|
||||||
|
op:=A_MTCR;
|
||||||
|
taicpu(hp).ops:=1;
|
||||||
|
end;
|
||||||
|
R_LR:
|
||||||
|
begin
|
||||||
|
op:=A_MTLR;
|
||||||
|
taicpu(hp).ops:=1;
|
||||||
|
end;
|
||||||
|
else
|
||||||
|
internalerror(2002100701);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
s:=#9+op2str[op];
|
s:=#9+op2str[op];
|
||||||
if taicpu(hp).ops<>0 then
|
if taicpu(hp).ops<>0 then
|
||||||
begin
|
begin
|
||||||
@ -429,7 +461,7 @@ interface
|
|||||||
|
|
||||||
const
|
const
|
||||||
ait_const2str:array[ait_const_32bit..ait_const_8bit] of string[8]=
|
ait_const2str:array[ait_const_32bit..ait_const_8bit] of string[8]=
|
||||||
(#9'DC.L'#9,#9'DC.W'#9,#9'DC.B'#9);
|
(#9'dc.l'#9,#9'dc.w'#9,#9'dc.b'#9);
|
||||||
|
|
||||||
Function PadTabs(const p:string;addch:char):string;
|
Function PadTabs(const p:string;addch:char):string;
|
||||||
var
|
var
|
||||||
@ -561,9 +593,9 @@ interface
|
|||||||
ait_align:
|
ait_align:
|
||||||
begin
|
begin
|
||||||
case tai_align(hp).aligntype of
|
case tai_align(hp).aligntype of
|
||||||
1:AsmWriteLn(#9'ALIGN 0');
|
1:AsmWriteLn(#9'align 0');
|
||||||
2:AsmWriteLn(#9'ALIGN 1');
|
2:AsmWriteLn(#9'align 1');
|
||||||
4:AsmWriteLn(#9'ALIGN 2');
|
4:AsmWriteLn(#9'align 2');
|
||||||
otherwise internalerror(10000);
|
otherwise internalerror(10000);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -573,9 +605,9 @@ interface
|
|||||||
replaced:= ReplaceForbiddenChars(s);
|
replaced:= ReplaceForbiddenChars(s);
|
||||||
if tai_datablock(hp).is_global then
|
if tai_datablock(hp).is_global then
|
||||||
if replaced then
|
if replaced then
|
||||||
AsmWriteLn(#9'EXPORT'#9+s+' => '''+tai_datablock(hp).sym.name+'''')
|
AsmWriteLn(#9'export'#9+s+' => '''+tai_datablock(hp).sym.name+'''')
|
||||||
else
|
else
|
||||||
AsmWriteLn(#9'EXPORT'#9+s);
|
AsmWriteLn(#9'export'#9+s);
|
||||||
AsmWriteLn(PadTabs(s,#0)+'DS.B '+tostr(tai_datablock(hp).size));
|
AsmWriteLn(PadTabs(s,#0)+'DS.B '+tostr(tai_datablock(hp).size));
|
||||||
{TODO: ? PadTabs(s,#0) }
|
{TODO: ? PadTabs(s,#0) }
|
||||||
end;
|
end;
|
||||||
@ -600,7 +632,7 @@ interface
|
|||||||
end;
|
end;
|
||||||
ait_const_symbol:
|
ait_const_symbol:
|
||||||
begin
|
begin
|
||||||
AsmWriteLn(#9#9'DD'#9'offset '+tai_const_symbol(hp).sym.name);
|
AsmWriteLn(#9#9'dd'#9'offset '+tai_const_symbol(hp).sym.name);
|
||||||
if tai_const_symbol(hp).offset>0 then
|
if tai_const_symbol(hp).offset>0 then
|
||||||
AsmWrite('+'+tostr(tai_const_symbol(hp).offset))
|
AsmWrite('+'+tostr(tai_const_symbol(hp).offset))
|
||||||
else if tai_const_symbol(hp).offset<0 then
|
else if tai_const_symbol(hp).offset<0 then
|
||||||
@ -608,9 +640,9 @@ interface
|
|||||||
AsmLn;
|
AsmLn;
|
||||||
end;
|
end;
|
||||||
ait_real_32bit:
|
ait_real_32bit:
|
||||||
AsmWriteLn(#9'DC.L'#9'"'+single2str(tai_real_32bit(hp).value)+'"');
|
AsmWriteLn(#9'dc.l'#9'"'+single2str(tai_real_32bit(hp).value)+'"');
|
||||||
ait_real_64bit:
|
ait_real_64bit:
|
||||||
AsmWriteLn(#9'DC.D'#9'"'+double2str(tai_real_64bit(hp).value)+'"');
|
AsmWriteLn(#9'dc.d'#9'"'+double2str(tai_real_64bit(hp).value)+'"');
|
||||||
ait_string:
|
ait_string:
|
||||||
begin
|
begin
|
||||||
{NOTE When a single quote char is encountered, it is
|
{NOTE When a single quote char is encountered, it is
|
||||||
@ -623,7 +655,7 @@ interface
|
|||||||
Begin
|
Begin
|
||||||
for j := 0 to lines-1 do
|
for j := 0 to lines-1 do
|
||||||
begin
|
begin
|
||||||
AsmWrite(#9'DC.B'#9);
|
AsmWrite(#9'dc.b'#9);
|
||||||
quoted:=false;
|
quoted:=false;
|
||||||
for i:=counter to counter+line_length do
|
for i:=counter to counter+line_length do
|
||||||
begin
|
begin
|
||||||
@ -656,7 +688,7 @@ interface
|
|||||||
counter := counter+line_length;
|
counter := counter+line_length;
|
||||||
end; { end for j:=0 ... }
|
end; { end for j:=0 ... }
|
||||||
{ do last line of lines }
|
{ do last line of lines }
|
||||||
AsmWrite(#9'DC.B'#9);
|
AsmWrite(#9'dc.b'#9);
|
||||||
quoted:=false;
|
quoted:=false;
|
||||||
for i:=counter to tai_string(hp).len-1 do
|
for i:=counter to tai_string(hp).len-1 do
|
||||||
begin
|
begin
|
||||||
@ -764,10 +796,10 @@ ait_stab_function_name : ;
|
|||||||
begin
|
begin
|
||||||
{
|
{
|
||||||
if LasTSec<>sec_none then
|
if LasTSec<>sec_none then
|
||||||
AsmWriteLn('_'+target_asm.secnames[LasTSec]+#9#9'ENDS');
|
AsmWriteLn('_'+target_asm.secnames[LasTSec]+#9#9'ends');
|
||||||
AsmLn;
|
AsmLn;
|
||||||
}
|
}
|
||||||
AsmWriteLn(#9'END');
|
AsmWriteLn(#9'end');
|
||||||
AsmClose;
|
AsmClose;
|
||||||
DoAssemble;
|
DoAssemble;
|
||||||
AsmCreate(tai_cut(hp).place);
|
AsmCreate(tai_cut(hp).place);
|
||||||
@ -915,7 +947,7 @@ ait_stab_function_name : ;
|
|||||||
WriteTree(resourcestringlist);
|
WriteTree(resourcestringlist);
|
||||||
WriteTree(bsssegment);
|
WriteTree(bsssegment);
|
||||||
|
|
||||||
AsmWriteLn(#9'END');
|
AsmWriteLn(#9'end');
|
||||||
AsmLn;
|
AsmLn;
|
||||||
|
|
||||||
{$ifdef EXTDEBUG}
|
{$ifdef EXTDEBUG}
|
||||||
@ -943,7 +975,7 @@ ait_stab_function_name : ;
|
|||||||
labelprefix : '@@';
|
labelprefix : '@@';
|
||||||
comment : '; ';
|
comment : '; ';
|
||||||
secnames : ('',
|
secnames : ('',
|
||||||
'CSECT','CSECT','CSECT', {TODO: Perhaps use other section types.}
|
'csect','csect','csect', {TODO: Perhaps use other section types.}
|
||||||
'','','','','','',
|
'','','','','','',
|
||||||
'','','')
|
'','','')
|
||||||
);
|
);
|
||||||
@ -953,7 +985,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2002-10-06 22:46:20 florian
|
Revision 1.9 2002-10-07 21:19:53 florian
|
||||||
|
* more mpw fixes
|
||||||
|
|
||||||
|
Revision 1.8 2002/10/06 22:46:20 florian
|
||||||
* fixed function exporting
|
* fixed function exporting
|
||||||
|
|
||||||
Revision 1.7 2002/10/02 22:14:15 florian
|
Revision 1.7 2002/10/02 22:14:15 florian
|
||||||
@ -968,5 +1003,4 @@ end.
|
|||||||
Revision 1.1 2002/08/20 21:40:44 florian
|
Revision 1.1 2002/08/20 21:40:44 florian
|
||||||
+ target macos for ppc added
|
+ target macos for ppc added
|
||||||
+ frame work for mpw assembler output
|
+ frame work for mpw assembler output
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user