* fix writing of floating point attribute parameters

git-svn-id: trunk@42489 -
This commit is contained in:
svenbarth 2019-07-24 20:32:17 +00:00
parent 4c338b1f70
commit 797e336222

View File

@ -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;