mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 19:39:31 +02:00
* fix writing of floating point attribute parameters
git-svn-id: trunk@42489 -
This commit is contained in:
parent
4c338b1f70
commit
797e336222
@ -525,17 +525,19 @@ implementation
|
||||
begin
|
||||
case tfloatdef(typedef).floattype of
|
||||
s32real:
|
||||
tcb.emit_tai(tai_realconst.create_s32real(value_real),s32floattype);
|
||||
tcb.emit_tai(tai_realconst.create_s32real(value_real),typedef);
|
||||
s64real:
|
||||
tcb.emit_tai(tai_realconst.create_s64real(value_real),s64floattype);
|
||||
tcb.emit_tai(tai_realconst.create_s64real(value_real),typedef);
|
||||
s80real:
|
||||
tcb.emit_tai(tai_realconst.create_s80real(value_real,0),s80floattype);
|
||||
tcb.emit_tai(tai_realconst.create_s80real(value_real,s80floattype.size),typedef);
|
||||
sc80real:
|
||||
tcb.emit_tai(tai_const.Create_64bit(round(value_real)),sc80floattype);
|
||||
tcb.emit_tai(tai_realconst.create_s80real(value_real,sc80floattype.size),typedef);
|
||||
s64comp:
|
||||
tcb.emit_tai(tai_const.Create_64bit(round(value_real)),s64inttype);
|
||||
{ the round is necessary for native compilers where comp isn't a float }
|
||||
tcb.emit_tai(tai_realconst.create_s64compreal(round(value_real)),typedef);
|
||||
s64currency:
|
||||
tcb.emit_tai(tai_const.create_64bit(trunc(value_currency * 10000)),s64currencytype);
|
||||
{ we don't need to multiply by 10000 here }
|
||||
tcb.emit_tai(tai_realconst.create_s64compreal(round(value_real)),typedef);
|
||||
s128real:
|
||||
internalerror(2019070804);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user