diff --git a/compiler/mips/racpugas.pas b/compiler/mips/racpugas.pas index 359f3986e3..214f2f4835 100644 --- a/compiler/mips/racpugas.pas +++ b/compiler/mips/racpugas.pas @@ -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 diff --git a/compiler/sparc/racpugas.pas b/compiler/sparc/racpugas.pas index fdad451fee..edca23f2cb 100644 --- a/compiler/sparc/racpugas.pas +++ b/compiler/sparc/racpugas.pas @@ -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