mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-05-29 04:41:27 +00:00
Add some support for ++/-- on long long values.
Some more complex cases require pc_ind, which is not implemented yet.
This commit is contained in:
parent
168a06b7bf
commit
a59a2427fd
|
@ -484,6 +484,8 @@ var
|
||||||
partialFileGS: gsosOutString; {partial compile list}
|
partialFileGS: gsosOutString; {partial compile list}
|
||||||
sourceFileGS: gsosOutString; {debug source file name}
|
sourceFileGS: gsosOutString; {debug source file name}
|
||||||
tempList: tempPtr; {list of temp work variables}
|
tempList: tempPtr; {list of temp work variables}
|
||||||
|
longlong0: longlong; {the value 0 as a longlong}
|
||||||
|
longlong1: longlong; {the value 1 as a longlong}
|
||||||
|
|
||||||
{expression results}
|
{expression results}
|
||||||
{------------------}
|
{------------------}
|
||||||
|
@ -851,6 +853,10 @@ spinner[0] := '|'; {set up the spinner characters}
|
||||||
spinner[1] := '/';
|
spinner[1] := '/';
|
||||||
spinner[2] := '-';
|
spinner[2] := '-';
|
||||||
spinner[3] := '\';
|
spinner[3] := '\';
|
||||||
|
longlong0.hi := 0;
|
||||||
|
longlong0.lo := 0;
|
||||||
|
longlong1.hi := 0;
|
||||||
|
longlong1.lo := 1;
|
||||||
end; {InitCCommon}
|
end; {InitCCommon}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2364,6 +2364,14 @@ var
|
||||||
Gen0(pc_sbl);
|
Gen0(pc_sbl);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
cgQuad,cgUQuad: begin
|
||||||
|
GenLdcQuad(longlong1);
|
||||||
|
if inc then
|
||||||
|
Gen0(pc_adq)
|
||||||
|
else
|
||||||
|
Gen0(pc_sbq);
|
||||||
|
end;
|
||||||
|
|
||||||
cgReal,cgDouble,cgComp,cgExtended: begin
|
cgReal,cgDouble,cgComp,cgExtended: begin
|
||||||
GenLdcReal(1.0);
|
GenLdcReal(1.0);
|
||||||
if inc then
|
if inc then
|
||||||
|
@ -2406,7 +2414,7 @@ var
|
||||||
if iType^.kind = scalarType then begin
|
if iType^.kind = scalarType then begin
|
||||||
iSize := 1;
|
iSize := 1;
|
||||||
baseType := iType^.baseType;
|
baseType := iType^.baseType;
|
||||||
if (baseType in [cgReal,cgDouble,cgComp,cgExtended])
|
if (baseType in [cgReal,cgDouble,cgComp,cgExtended,cgQuad,cgUQuad])
|
||||||
or (iType^.cType = ctBool) then begin
|
or (iType^.cType = ctBool) then begin
|
||||||
|
|
||||||
{do real or bool inc or dec}
|
{do real or bool inc or dec}
|
||||||
|
@ -2438,6 +2446,10 @@ var
|
||||||
IncOrDec(pc_l = pc_lld);
|
IncOrDec(pc_l = pc_lld);
|
||||||
if iType^.cType = ctBool then
|
if iType^.cType = ctBool then
|
||||||
expressionType := boolPtr
|
expressionType := boolPtr
|
||||||
|
else if baseType = cgQuad then
|
||||||
|
expressionType := longLongPtr
|
||||||
|
else if baseType = cgUQuad then
|
||||||
|
expressionType := ulongLongPtr
|
||||||
else
|
else
|
||||||
expressionType := doublePtr;
|
expressionType := doublePtr;
|
||||||
goto 1;
|
goto 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user