* sparc register typo

This commit is contained in:
peter 2003-09-16 15:57:33 +00:00
parent 6d12c4b987
commit cabc606aab

View File

@ -720,7 +720,7 @@ end ['D0'];
{$define FPC_PreviousFramePointer_Implemented} {$define FPC_PreviousFramePointer_Implemented}
{ we have first our own frame } { we have first our own frame }
ld [%fp],%i0 ld [%fp],%i0
ld [%io],%i0 ld [%i0],%i0
end; end;
{$endif} {$endif}
{$ifdef cpupowerpc} {$ifdef cpupowerpc}
@ -753,7 +753,7 @@ begin
{$else} {$else}
{ 1.1 does not esi to be loaded } { 1.1 does not esi to be loaded }
{$define FPC_CallPointerConstructor_Implemented} {$define FPC_CallPointerConstructor_Implemented}
{$endif} {$endif}
CallPointerConstructor := PointerConstructor(Ctor)(VMT, Obj, Param1) CallPointerConstructor := PointerConstructor(Ctor)(VMT, Obj, Param1)
end; end;
{$ifdef cpupowerpc} {$ifdef cpupowerpc}
@ -785,10 +785,10 @@ begin
so self should be in a register anyways } so self should be in a register anyways }
{$endif} {$endif}
end; end;
{$else} {$else}
{ 1.1 does not esi to be loaded } { 1.1 does not esi to be loaded }
{$define FPC_CallPointerMethod_Implemented} {$define FPC_CallPointerMethod_Implemented}
{$endif} {$endif}
CallPointerMethod := PointerMethod(Method)(Obj, Param1) CallPointerMethod := PointerMethod(Method)(Obj, Param1)
end; end;
{$ifndef FPC_CallPointerMethod_Implemented} {$ifndef FPC_CallPointerMethod_Implemented}
@ -1243,10 +1243,10 @@ END;
{ TDosStream OBJECT METHODS } { TDosStream OBJECT METHODS }
{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++} {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
{$IFOPT I+} {$IFOPT I+}
{$DEFINE IO_CHECK_ON} {$DEFINE IO_CHECK_ON}
{$I-} {$I-}
{$ENDIF} {$ENDIF}
{--TDosStream---------------------------------------------------------------} {--TDosStream---------------------------------------------------------------}
{ Init -> Platforms DOS/DPMI/WIN/OS2 - Checked 16May96 LdB } { Init -> Platforms DOS/DPMI/WIN/OS2 - Checked 16May96 LdB }
@ -1262,8 +1262,8 @@ BEGIN
Assign(FileInfo,FileName); Assign(FileInfo,FileName);
{ Handle the mode } { Handle the mode }
if Mode =stCreate then if Mode =stCreate then
Begin Begin
Rewrite(FileInfo,1); Rewrite(FileInfo,1);
end end
else else
Begin Begin
@ -1271,8 +1271,8 @@ BEGIN
FileMode := Mode and 3; FileMode := Mode and 3;
System.Reset(FileInfo,1); System.Reset(FileInfo,1);
FileMode := OldFileMode; FileMode := OldFileMode;
{ To use the correct mode we must reclose the file { To use the correct mode we must reclose the file
and open it again and open it again
} }
end; end;
Handle := FileRec(FileInfo).Handle; { Set handle value } Handle := FileRec(FileInfo).Handle; { Set handle value }
@ -1283,10 +1283,10 @@ BEGIN
end; end;
If DosStreamError = 0 then If DosStreamError = 0 then
DosStreamError := IOResult; DosStreamError := IOResult;
If (DosStreamError <> 0) Then If (DosStreamError <> 0) Then
Error(stInitError, DosStreamError) { Call stream error } Error(stInitError, DosStreamError) { Call stream error }
else else
Status := StOK; Status := StOK;
END; END;
{--TDosStream---------------------------------------------------------------} {--TDosStream---------------------------------------------------------------}
@ -1306,7 +1306,7 @@ BEGIN
Error(stError, DosStreamError); Error(stError, DosStreamError);
end; end;
Position := 0; { Zero the position } Position := 0; { Zero the position }
Handle := InvalidHandle; Handle := InvalidHandle;
Inherited Done; { Call ancestor } Inherited Done; { Call ancestor }
END; END;
@ -1356,11 +1356,11 @@ PROCEDURE TDosStream.Seek (Pos: Longint);
var var
DosStreamError : Word; DosStreamError : Word;
BEGIN BEGIN
If (Status=stOk) Then If (Status=stOk) Then
Begin { Check status okay } Begin { Check status okay }
If (Pos < 0) Then If (Pos < 0) Then
Pos := 0; { Negatives removed } Pos := 0; { Negatives removed }
System.Seek(FileInfo, Pos); System.Seek(FileInfo, Pos);
DosStreamError := IOResult; DosStreamError := IOResult;
if DosStreamError <> 0 then if DosStreamError <> 0 then
Error(stSeekError, DosStreamError){ Specific seek error } Error(stSeekError, DosStreamError){ Specific seek error }
@ -1376,15 +1376,15 @@ PROCEDURE TDosStream.Open (OpenMode: Word);
VAR OldFileMode : Byte; VAR OldFileMode : Byte;
DosStreamError : Word; DosStreamError : Word;
BEGIN BEGIN
If (Status=stOk) Then If (Status=stOk) Then
Begin { Check status okay } Begin { Check status okay }
If (Handle = InvalidHandle) Then If (Handle = InvalidHandle) Then
Begin { File not open } Begin { File not open }
Assign(FileInfo,FName); Assign(FileInfo,FName);
{ Handle the mode } { Handle the mode }
if OpenMode =stCreate then if OpenMode =stCreate then
Begin Begin
System.Rewrite(FileInfo,1); System.Rewrite(FileInfo,1);
end end
else else
Begin Begin
@ -1392,8 +1392,8 @@ BEGIN
FileMode := OpenMode and 3; FileMode := OpenMode and 3;
System.Reset(FileInfo,1); System.Reset(FileInfo,1);
FileMode := OldFileMode; FileMode := OldFileMode;
{ To use the correct mode we must reclose the file { To use the correct mode we must reclose the file
and open it again and open it again
} }
end; end;
Handle := FileRec(FileInfo).Handle; { Set handle value } Handle := FileRec(FileInfo).Handle; { Set handle value }
@ -1402,13 +1402,13 @@ BEGIN
StreamSize := System.FileSize(FileInfo); StreamSize := System.FileSize(FileInfo);
If DosStreamError = 0 then If DosStreamError = 0 then
DosStreamError := IOResult; DosStreamError := IOResult;
If (DosStreamError <> 0) Then If (DosStreamError <> 0) Then
Error(stOpenError, DosStreamError) { Call stream error } Error(stOpenError, DosStreamError) { Call stream error }
else else
Status := StOK; Status := StOK;
Position := 0; Position := 0;
end end
Else Else
Error(stOpenError, 104); { File already open } Error(stOpenError, 104); { File already open }
End; End;
END; END;
@ -1417,28 +1417,28 @@ END;
{ Read -> Platforms DOS/DPMI/WIN/OS2 - Checked 16May96 LdB } { Read -> Platforms DOS/DPMI/WIN/OS2 - Checked 16May96 LdB }
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
PROCEDURE TDosStream.Read (Var Buf; Count: Sw_Word); PROCEDURE TDosStream.Read (Var Buf; Count: Sw_Word);
VAR BytesMoved: Sw_Word; VAR BytesMoved: Sw_Word;
DosStreamError : Word; DosStreamError : Word;
BEGIN BEGIN
If Status = StOK then If Status = StOK then
Begin Begin
If (Position + Count > StreamSize) Then { Insufficient data } If (Position + Count > StreamSize) Then { Insufficient data }
Error(stReadError, 0); { Read beyond end!!! } Error(stReadError, 0); { Read beyond end!!! }
If (Handle = InvalidHandle) Then If (Handle = InvalidHandle) Then
Error(stReadError, 103); { File not open } Error(stReadError, 103); { File not open }
BlockRead(FileInfo, Buf, Count, BytesMoved); { Read from file } BlockRead(FileInfo, Buf, Count, BytesMoved); { Read from file }
DosStreamError := IOResult; DosStreamError := IOResult;
If ((DosStreamError<>0) OR (BytesMoved<>Count)) Then If ((DosStreamError<>0) OR (BytesMoved<>Count)) Then
Begin { Error was detected } Begin { Error was detected }
BytesMoved := 0; { Clear bytes moved } BytesMoved := 0; { Clear bytes moved }
If (DosStreamError <> 0) Then If (DosStreamError <> 0) Then
Error(stReadError, DosStreamError) { Specific read error } Error(stReadError, DosStreamError) { Specific read error }
Else Else
Error(stReadError, 0); { Non specific error } Error(stReadError, 0); { Non specific error }
End; End;
Inc(Position, BytesMoved); { Adjust position } Inc(Position, BytesMoved); { Adjust position }
End; End;
{ If there was already an error, or an error was just { If there was already an error, or an error was just
generated, fill the vuffer with NULL generated, fill the vuffer with NULL
} }
If Status <> StOK then If Status <> StOK then
@ -1449,22 +1449,22 @@ END;
{ Write -> Platforms DOS/DPMI/WIN/OS2 - Checked 16May96 LdB } { Write -> Platforms DOS/DPMI/WIN/OS2 - Checked 16May96 LdB }
{---------------------------------------------------------------------------} {---------------------------------------------------------------------------}
PROCEDURE TDosStream.Write (Var Buf; Count: Sw_Word); PROCEDURE TDosStream.Write (Var Buf; Count: Sw_Word);
VAR BytesMoved: Sw_Word; VAR BytesMoved: Sw_Word;
DosStreamError : Word; DosStreamError : Word;
BEGIN BEGIN
{ If status is not OK, simply exit } { If status is not OK, simply exit }
if Status <> StOK then if Status <> StOK then
exit; exit;
If (Handle = InvalidHandle) Then If (Handle = InvalidHandle) Then
Error(stWriteError, 103); { File not open } Error(stWriteError, 103); { File not open }
BlockWrite(FileInfo, Buf, Count, BytesMoved); { Write to file } BlockWrite(FileInfo, Buf, Count, BytesMoved); { Write to file }
DosStreamError := IOResult; DosStreamError := IOResult;
If ((DosStreamError<>0) OR (BytesMoved<>Count)) Then If ((DosStreamError<>0) OR (BytesMoved<>Count)) Then
Begin { Error was detected } Begin { Error was detected }
BytesMoved := 0; { Clear bytes moved } BytesMoved := 0; { Clear bytes moved }
If (DosStreamError<>0) Then If (DosStreamError<>0) Then
Error(stWriteError, DOSStreamError) { Specific write error } Error(stWriteError, DOSStreamError) { Specific write error }
Else Else
Error(stWriteError, 0); { Non specific error } Error(stWriteError, 0); { Non specific error }
End; End;
Inc(Position, BytesMoved); { Adjust position } Inc(Position, BytesMoved); { Adjust position }
@ -1519,11 +1519,11 @@ BEGIN
exit; exit;
If (LastMode=2) AND (BufPtr<>0) Then Begin { Must update file } If (LastMode=2) AND (BufPtr<>0) Then Begin { Must update file }
If (Handle = InvalidHandle) Then DosStreamError := 103 { File is not open } If (Handle = InvalidHandle) Then DosStreamError := 103 { File is not open }
Else Else
Begin Begin
BlockWrite(FileInfo, Buffer^,BufPtr, W); { Write to file } BlockWrite(FileInfo, Buffer^,BufPtr, W); { Write to file }
DosStreamError := IOResult; DosStreamError := IOResult;
End; End;
If (DosStreamError<>0) OR (W<>BufPtr) Then { We have an error } If (DosStreamError<>0) OR (W<>BufPtr) Then { We have an error }
If (DosStreamError=0) Then Error(stWriteError, 0){ Unknown write error } If (DosStreamError=0) Then Error(stWriteError, 0){ Unknown write error }
Else Error(stError, DosStreamError); { Specific write error } Else Error(stError, DosStreamError); { Specific write error }
@ -2927,7 +2927,10 @@ END;
END. END.
{ {
$Log$ $Log$
Revision 1.21 2003-08-21 22:17:13 olle Revision 1.22 2003-09-16 15:57:33 peter
* sparc register typo
Revision 1.21 2003/08/21 22:17:13 olle
- removed parameter from fpc_iocheck - removed parameter from fpc_iocheck
Revision 1.20 2003/07/08 21:21:33 peter Revision 1.20 2003/07/08 21:21:33 peter