From 30f2eda4f3ece75747423e80e3adc91b45bf196d Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Thu, 11 Feb 2021 12:41:58 -0600 Subject: [PATCH] Generate code for long long to real conversions. --- Gen.pas | 6 ++++-- Native.pas | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Gen.pas b/Gen.pas index d643513..ee44442 100644 --- a/Gen.pas +++ b/Gen.pas @@ -1575,8 +1575,10 @@ else if op^.q in [quadToVoid,uquadToVoid] then begin GenNative(m_adc_imm, immediate, 8, nil, 0); GenImplied(m_tcs); end {else if} -else if op^.q in [quadToReal, uquadToReal] then - Error(cge1) {TODO: implement} +else if op^.q = quadToReal then + GenCall(83) +else if op^.q = uquadToReal then + GenCall(84) else if (op^.q & $000F) = cVoid then {do nothing} else if (op^.q & $000F) in [cLong,cULong] then diff --git a/Native.pas b/Native.pas index 4088d9d..eaf39be 100644 --- a/Native.pas +++ b/Native.pas @@ -2037,6 +2037,8 @@ case callNum of 80: sp := @'~UMUL8'; 81: sp := @'~CDIV8'; 82: sp := @'~UDIV8'; + 83: sp := @'~CNVLONGLONGREAL'; + 84: sp := @'~CNVULONGLONGREAL'; otherwise: Error(cge1); end; {case}