mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 16:19:35 +02:00
- MIPS,SPARC: removed method ReadSym which is never used.
- SPARC: also removed PowerPC-style parsing of address type (e.g. foo@hi). SPARC syntax is %hi(foo). git-svn-id: trunk@33113 -
This commit is contained in:
parent
356a5aff05
commit
5f6442074a
@ -34,7 +34,6 @@ Interface
|
||||
function is_asmopcode(const s: string):boolean;override;
|
||||
procedure BuildOperand(oper : TOperand);
|
||||
procedure BuildOpCode(instr : TInstruction);
|
||||
procedure ReadSym(oper : TOperand);
|
||||
procedure ConvertCalljmp(instr : TInstruction);
|
||||
procedure handlepercent;override;
|
||||
procedure handledollar;override;
|
||||
@ -63,37 +62,6 @@ Interface
|
||||
cgbase,cgobj
|
||||
;
|
||||
|
||||
procedure TMipsReader.ReadSym(oper : TOperand);
|
||||
var
|
||||
tempstr, mangledname : string;
|
||||
typesize,l,k : aint;
|
||||
begin
|
||||
tempstr:=actasmpattern;
|
||||
Consume(AS_ID);
|
||||
{ typecasting? }
|
||||
if (actasmtoken=AS_LPAREN) and
|
||||
SearchType(tempstr,typesize) then
|
||||
begin
|
||||
oper.hastype:=true;
|
||||
Consume(AS_LPAREN);
|
||||
BuildOperand(oper);
|
||||
Consume(AS_RPAREN);
|
||||
if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
|
||||
oper.SetSize(typesize,true);
|
||||
end
|
||||
else
|
||||
if not oper.SetupVar(tempstr,false) then
|
||||
Message1(sym_e_unknown_id,tempstr);
|
||||
{ record.field ? }
|
||||
if actasmtoken=AS_DOT then
|
||||
begin
|
||||
BuildRecordOffsetSize(tempstr,l,k,mangledname,false);
|
||||
if (mangledname<>'') then
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
inc(oper.opr.ref.offset,l);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TMipsReader.handledollar;
|
||||
var
|
||||
|
@ -35,8 +35,6 @@ Interface
|
||||
procedure BuildReference(oper : tSparcoperand);
|
||||
procedure BuildOperand(oper : tSparcoperand);
|
||||
procedure BuildOpCode(instr : tSparcinstruction);
|
||||
procedure ReadPercent(oper : tSparcoperand);
|
||||
procedure ReadSym(oper : tSparcoperand);
|
||||
procedure ConvertCalljmp(instr : tSparcinstruction);
|
||||
procedure handlepercent;override;
|
||||
end;
|
||||
@ -61,62 +59,6 @@ Interface
|
||||
cgbase,cgobj
|
||||
;
|
||||
|
||||
procedure TSparcReader.ReadSym(oper : tSparcoperand);
|
||||
var
|
||||
tempstr, mangledname : string;
|
||||
typesize,l,k : aint;
|
||||
begin
|
||||
tempstr:=actasmpattern;
|
||||
Consume(AS_ID);
|
||||
{ typecasting? }
|
||||
if (actasmtoken=AS_LPAREN) and
|
||||
SearchType(tempstr,typesize) then
|
||||
begin
|
||||
oper.hastype:=true;
|
||||
Consume(AS_LPAREN);
|
||||
BuildOperand(oper);
|
||||
Consume(AS_RPAREN);
|
||||
if oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL] then
|
||||
oper.SetSize(typesize,true);
|
||||
end
|
||||
else
|
||||
if not oper.SetupVar(tempstr,false) then
|
||||
Message1(sym_e_unknown_id,tempstr);
|
||||
{ record.field ? }
|
||||
if actasmtoken=AS_DOT then
|
||||
begin
|
||||
BuildRecordOffsetSize(tempstr,l,k,mangledname,false);
|
||||
if (mangledname<>'') then
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
inc(oper.opr.ref.offset,l);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TSparcReader.ReadPercent(oper : tSparcoperand);
|
||||
begin
|
||||
{ check for ...@ }
|
||||
if actasmtoken=AS_AT then
|
||||
begin
|
||||
if (oper.opr.ref.symbol=nil) and
|
||||
(oper.opr.ref.offset = 0) then
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
Consume(AS_AT);
|
||||
if actasmtoken=AS_ID then
|
||||
begin
|
||||
if upper(actasmpattern)='LO' then
|
||||
oper.opr.ref.refaddr:=addr_low
|
||||
else if upper(actasmpattern)='HI' then
|
||||
oper.opr.ref.refaddr:=addr_high
|
||||
else
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
Consume(AS_ID);
|
||||
end
|
||||
else
|
||||
Message(asmr_e_invalid_reference_syntax);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Procedure TSparcReader.BuildReference(oper : tSparcoperand);
|
||||
var
|
||||
@ -425,9 +367,7 @@ Interface
|
||||
end
|
||||
else
|
||||
begin
|
||||
if oper.SetupVar(expr,false) then
|
||||
ReadPercent(oper)
|
||||
else
|
||||
if not oper.SetupVar(expr,false) then
|
||||
Begin
|
||||
{ look for special symbols ... }
|
||||
if expr= '__HIGH' then
|
||||
|
Loading…
Reference in New Issue
Block a user