mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-01 13:29:32 +00:00
Use 16-bit operations to zero out a range of bytes.
This commit is contained in:
parent
58d8edf1ee
commit
6260a27b11
12
Parser.pas
12
Parser.pas
@ -4527,12 +4527,12 @@ var
|
||||
|
||||
|
||||
begin {InitializeOneElement}
|
||||
itype := iPtr^.iType;
|
||||
disp := iPtr^.disp;
|
||||
count := iPtr^.count;
|
||||
3: itype := iPtr^.iType;
|
||||
while itype^.kind = definedType do
|
||||
itype := itype^.dType;
|
||||
3: case itype^.kind of
|
||||
case itype^.kind of
|
||||
|
||||
scalarType,pointerType,enumType,functionType: begin
|
||||
tree := iptr^.itree;
|
||||
@ -4557,6 +4557,14 @@ var
|
||||
else
|
||||
isConstant := false;
|
||||
end; {else}
|
||||
|
||||
if isConstant then {zero-initialize two bytes at a time}
|
||||
if val = 0 then
|
||||
if count > 1 then
|
||||
if itype^.size = 1 then begin
|
||||
itype := shortPtr;
|
||||
count := count - 1;
|
||||
end; {if}
|
||||
|
||||
{ if isConstant then
|
||||
if tree^.token.class = intConstant then
|
||||
|
Loading…
Reference in New Issue
Block a user