2016-01-04 22:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/compiler/gencc.c
    ! fixed generation of -gc3 code for 64-bit *nixes on 32-bit hosts
This commit is contained in:
Przemysław Czerpak
2016-01-04 22:03:14 +01:00
parent aae691a434
commit a3e4ff9b78
2 changed files with 18 additions and 4 deletions

View File

@@ -10,6 +10,10 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2016-01-04 22:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/gencc.c
! fixed generation of -gc3 code for 64-bit *nixes on 32-bit hosts
2016-01-04 21:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbznet.c
* src/rtl/hbzsock.c

View File

@@ -1300,12 +1300,23 @@ static HB_GENC_FUNC( hb_p_pushlonglong )
HB_GENC_LABEL();
fprintf( cargo->yyc, "\thb_xvmPushLongLong( %.1f );\n", HB_PCODE_MKLONGLONG( &pFunc->pCode[ nPCodePos + 1 ] ) );
return 9;
#else
HB_LONGLONG llVal, iSkip;
#elif LONG_MAX < LONGLONG_MAX
HB_LONGLONG llVal;
char szBuf[ 24 ];
HB_GENC_LABEL();
llVal = HB_PCODE_MKLONGLONG( &pFunc->pCode[ nPCodePos + 1 ] );
fprintf( cargo->yyc, "\thb_xvmPushLongLong( HB_LL( %s ) );\n",
hb_numToStr( szBuf, sizeof( szBuf ), llVal ) );
return 9;
#else
HB_LONGLONG llVal;
char szBuf[ 24 ];
int iSkip;
HB_GENC_LABEL();
fprintf( cargo->yyc, "#if LONG_MAX >= LONGLONG_MAX\n" );
llVal = HB_PCODE_MKLONGLONG( &pFunc->pCode[ nPCodePos + 1 ] );
iSkip = hb_gencc_checkNumAhead( llVal, pFunc, nPCodePos + 9, cargo );
@@ -1314,8 +1325,7 @@ static HB_GENC_FUNC( hb_p_pushlonglong )
fprintf( cargo->yyc, "\thb_xvmPushLong( %ldL );\n", ( long ) llVal );
fprintf( cargo->yyc, "#else\n" );
fprintf( cargo->yyc, "\thb_xvmPushLongLong( HB_LL( %s ) );\n",
hb_numToStr( szBuf, sizeof( szBuf ),
HB_PCODE_MKLONGLONG( &pFunc->pCode[ nPCodePos + 1 ] ) ) );
hb_numToStr( szBuf, sizeof( szBuf ), llVal ) );
if( iSkip > 0 )
{
int iDone = 0;