PDA

View Full Version : Supporting older processors (non SSE2)


ArdeII
03-03-2011, 09:07 AM
Hi,
I have tried to build a SSE version of Kirnu but not succeeded with it. The goal is to build version which runs in older computers without SSE2 support.

Does anyone know what it takes to build this kind of version?
I'm using VS express 2010 and my project consists of IPlug and lice.

Currently I have these flags configured in lice SSE build:

WIN32
NDEBUG
_LIB
PNG_USE_PNGVCRD
PNG_LIBPNG_SPECIALBUILD
PNG_NO_ASSEMBLER_CODE
_CRT_SECURE_NO_WARNINGS

I also have 'Enable Enhanced Instruction Set' set to Streaming SIMD Extensions (/arch:SSE) (/arch:SSE)

Any help is appreciated.
-Arto

Jeffos
03-03-2011, 01:10 PM
you need to disable SSE & SSE2 in LICE, IPlug and the plug itself.

ArdeII
03-03-2011, 02:04 PM
So I'll nedd to set the 'Enable Enhanced Instruction Set' to 'Not Set'?

What about those flags. Which should be enabled in lice build?

Tale
03-03-2011, 03:40 PM
What about those flags. Which should be enabled in lice build?
I have these macros defined for both the SSE2 and non-SSE2 32-bit builds of libpng:

__MMX__
PNG_HAVE_MMX_COMBINE_ROW
PNG_HAVE_MMX_READ_INTERLACE
PNG_HAVE_MMX_READ_FILTER_ROW

ArdeII
03-04-2011, 08:31 AM
I get this error message when building lice with Tale's macros :

1>------ Build started: Project: lice, Configuration: Win32 SSE Release Win32 ------
1> pnggccrd.c
1>..\libpng\pnggccrd.c(1744): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(1744): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(1744): warning C4013: '__volatile__' undefined; assuming extern returning int
1>..\libpng\pnggccrd.c(1773): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(1797): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(1797): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(1820): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(1852): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(1852): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(1878): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(1928): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(1928): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(1955): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2011): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2011): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2029): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2066): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2066): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2083): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2125): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2125): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2145): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2184): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2184): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2202): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2241): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2241): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2255): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2299): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2299): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2322): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2361): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2361): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2380): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2419): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2419): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2436): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2480): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2480): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2499): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2523): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2523): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2538): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(2561): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(2561): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(2574): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(4939): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(4939): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(5048): error C2143: syntax error : missing ')' before ':'
1>..\libpng\pnggccrd.c(5354): error C2065: '__asm__' : undeclared identifier
1>..\libpng\pnggccrd.c(5354): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>..\libpng\pnggccrd.c(5402): error C2143: syntax error : missing ')' before ':'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

ArdeII
03-04-2011, 08:33 AM
I added also PNG_NO_ASSEMBLER_CODE and still get these errors

1>lice.lib(pngread.obj) : error LNK2019: unresolved external symbol _png_do_read_interlace referenced in function _png_read_row
1>lice.lib(pngread.obj) : error LNK2019: unresolved external symbol _png_read_filter_row referenced in function _png_read_row
1>lice.lib(pngread.obj) : error LNK2019: unresolved external symbol _png_combine_row referenced in function _png_read_row

Tale
03-04-2011, 10:04 AM
I have re-checked, and it would seem my previous list of defined macros is incomplete, so here is the command line of my non-SSE2 build with the complete list of defined macros:

cl /D "WIN32" /D "_CRT_SECURE_NO_WARNINGS" /EHsc /GS- /GR- /D "_LIB" /D
"_MBCS" /Oi /Ot /fp:fast /GF /MT /c /Fo"Win32_noSSE2/Release/" /Fd"Win32_noSSE2
/Release/" /W3 /WX /wd4996 /nologo /D "NDEBUG" /O2 /Ob2 /D "__MMX__" /D "PNG_HAV
E_MMX_COMBINE_ROW" /D "PNG_HAVE_MMX_READ_INTERLACE" /D "PNG_HAVE_MMX_READ_FILTER
_ROW" /I "../zlib" /D "PNG_LIBPNG_SPECIALBUILD" /D "PNG_USE_PNGVCRD" "../libpng\
pnggccrd.c"

ArdeII
03-04-2011, 12:56 PM
Thanks Tale! It builds now. Now I have to test if it really works on older machines.

ArdeII
03-04-2011, 02:42 PM
It has now been confirmed that Kirnu works on non SSE2 processors too. Nice ;)

Thanks again for your help Tale.

Tale
03-04-2011, 04:15 PM
It has now been confirmed that Kirnu works on non SSE2 processors too. Nice ;)
Cool! :cool:

Thanks again for your help Tale.
You are welcome. :)