мелкие правки; RVM32I: исправление ошибки

This commit is contained in:
AntKrotov committed 2021-02-08 01:09:38 +03:00
1 parent 8234828dfc
commit 2d48266a69
5 files changed
+9 -17

No files matched your search

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+5 -8
View File
@@ -1,7 +1,7 @@
(*
BSD 2-Clause License
Copyright (c) 2018-2020, Anton Krotov
Copyright (c) 2018-2021, Anton Krotov
All rights reserved.
*)
@@ -154,27 +154,24 @@ END read;
PROCEDURE write* (file: FILE; chunk: ARRAY OF BYTE; bytes: INTEGER): INTEGER;
VAR
free, n, k, res, idx: INTEGER;
free, n, idx: INTEGER;
BEGIN
idx := 0;
res := 0;
IF (file # NIL) & (file.count >= 0) THEN
free := LEN(file.buffer) - file.count;
WHILE bytes > 0 DO
n := MIN(free, bytes);
copy(chunk, idx, file.buffer, file.count, n);
INC(res, n);
DEC(free, n);
DEC(bytes, n);
INC(idx, n);
INC(file.count, n);
IF free = 0 THEN
k := flush(file);
IF k # LEN(file.buffer) THEN
IF flush(file) # LEN(file.buffer) THEN
bytes := 0;
DEC(res, n)
DEC(idx, n)
ELSE
file.count := 0;
free := LEN(file.buffer)
@@ -184,7 +181,7 @@ BEGIN
END
RETURN res
RETURN idx
END write;
+2 -6
View File
@@ -861,15 +861,11 @@ BEGIN
|IL.opINCLC, IL.opEXCLC:
UnOp(r1);
r2 := GetAnyReg();
ldr32(r2, r1);
IF opcode = IL.opINCLC THEN
Emit(opINCLC, r2, param2)
Emit(opINCLC, r1, param2)
ELSE
Emit(opEXCLC, r2, param2)
Emit(opEXCLC, r1, param2)
END;
str32(r1, r2);
drop;
drop
|IL.opEQB, IL.opNEB:
+2 -3
View File
@@ -312,14 +312,13 @@ BEGIN
sym := lxERROR07
END;
num[i] := 0X;
IF sym = lxINTEGER THEN
num[i] := 0X;
ARITH.iconv(num, lex.value, error)
ELSIF (sym = lxHEX) OR (sym = lxCHAR) THEN
num[i] := 0X;
ARITH.hconv(num, lex.value, error)
ELSIF sym = lxFLOAT THEN
num[i] := 0X;
ARITH.fconv(num, lex.value, error)
END;