mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 22:29:44 +02:00
* synchronized with trunk
git-svn-id: branches/unicodekvm@49415 -
This commit is contained in:
commit
830985bf17
@ -801,6 +801,7 @@ Implementation
|
||||
Result:=OptPass1Shift(p);
|
||||
A_AND:
|
||||
Result:=OptPass1And(p);
|
||||
A_CSEL,
|
||||
A_ADD,
|
||||
A_ADC,
|
||||
A_SUB,
|
||||
|
@ -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
|
||||
|
@ -1 +1 @@
|
||||
'2021-04-10 rev 49157'
|
||||
'2021-04-18 rev 49224'
|
||||
|
Loading…
Reference in New Issue
Block a user