mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:19:17 +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;
|
function is_asmopcode(const s: string):boolean;override;
|
||||||
procedure BuildOperand(oper : TOperand);
|
procedure BuildOperand(oper : TOperand);
|
||||||
procedure BuildOpCode(instr : TInstruction);
|
procedure BuildOpCode(instr : TInstruction);
|
||||||
procedure ReadSym(oper : TOperand);
|
|
||||||
procedure ConvertCalljmp(instr : TInstruction);
|
procedure ConvertCalljmp(instr : TInstruction);
|
||||||
procedure handlepercent;override;
|
procedure handlepercent;override;
|
||||||
procedure handledollar;override;
|
procedure handledollar;override;
|
||||||
@ -63,37 +62,6 @@ Interface
|
|||||||
cgbase,cgobj
|
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;
|
procedure TMipsReader.handledollar;
|
||||||
var
|
var
|
||||||
|
@ -35,8 +35,6 @@ Interface
|
|||||||
procedure BuildReference(oper : tSparcoperand);
|
procedure BuildReference(oper : tSparcoperand);
|
||||||
procedure BuildOperand(oper : tSparcoperand);
|
procedure BuildOperand(oper : tSparcoperand);
|
||||||
procedure BuildOpCode(instr : tSparcinstruction);
|
procedure BuildOpCode(instr : tSparcinstruction);
|
||||||
procedure ReadPercent(oper : tSparcoperand);
|
|
||||||
procedure ReadSym(oper : tSparcoperand);
|
|
||||||
procedure ConvertCalljmp(instr : tSparcinstruction);
|
procedure ConvertCalljmp(instr : tSparcinstruction);
|
||||||
procedure handlepercent;override;
|
procedure handlepercent;override;
|
||||||
end;
|
end;
|
||||||
@ -61,62 +59,6 @@ Interface
|
|||||||
cgbase,cgobj
|
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);
|
Procedure TSparcReader.BuildReference(oper : tSparcoperand);
|
||||||
var
|
var
|
||||||
@ -425,9 +367,7 @@ Interface
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if oper.SetupVar(expr,false) then
|
if not oper.SetupVar(expr,false) then
|
||||||
ReadPercent(oper)
|
|
||||||
else
|
|
||||||
Begin
|
Begin
|
||||||
{ look for special symbols ... }
|
{ look for special symbols ... }
|
||||||
if expr= '__HIGH' then
|
if expr= '__HIGH' then
|
||||||
|
Loading…
Reference in New Issue
Block a user