|
@@ -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
|