* synchronized with trunk

git-svn-id: branches/unicodekvm@49415 -
This commit is contained in:
nickysn 2021-05-30 20:46:29 +00:00
commit 830985bf17
3 changed files with 14 additions and 2 deletions
compiler/aarch64
packages/rtl-objpas/src/inc
utils/fpcm

View File

@ -801,6 +801,7 @@ Implementation
Result:=OptPass1Shift(p);
A_AND:
Result:=OptPass1And(p);
A_CSEL,
A_ADD,
A_ADC,
A_SUB,

View File

@ -815,7 +815,7 @@ INTERFACE
__hi_bh = ( MaxFmtBCDFractionSize + 1 );
type
tBCD_helper = Maybe_Packed record
tBCD_helper = Maybe_Packed record
Prec : {$ifopt r+} 0..( __hi_bh - __lo_bh + 1 ) {$else} Integer {$endif};
Plac : {$ifopt r+} 0..( __hi_bh - __lo_bh + 1 ) {$else} Integer {$endif};
FDig,
@ -866,6 +866,7 @@ IMPLEMENTATION
PROTECTED
function GetInstance(const v : TVarData): tObject; OVERRIDE;
PUBLIC
function LeftPromotion(const V: TVarData; const Operation: TVarOp; out RequiredVarType: TVarType): Boolean; override;
procedure BinaryOp(var Left: TVarData; const Right: TVarData; const Operation: TVarOp); override;
procedure Clear(var V: TVarData); override;
procedure Copy(var Dest: TVarData; const Source: TVarData; const Indirect: Boolean); override;
@ -4162,6 +4163,16 @@ function TFMTBcdFactory.GetInstance(const v : TVarData): tObject;
end;
function TFMTBcdFactory.LeftPromotion(const V: TVarData; const Operation: TVarOp; out RequiredVarType: TVarType): Boolean;
// mantis 38496
begin
if v.vtype in FloatVarTypes then // floats can accept full result of a mixed float-bcd operation
RequiredVarType := v.vtype
else
RequiredVarType := VarType;
result:=true;
end;
procedure TFMTBcdFactory.BinaryOp(var Left: TVarData; const Right: TVarData; const Operation: TVarOp);
var l, r: TBCD;
begin

View File

@ -1 +1 @@
'2021-04-10 rev 49157'
'2021-04-18 rev 49224'