This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26445] New: SSE byte-by-byte load instruction fails to compile
- From: "gchernis11 at msn dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2006 16:05:08 -0000
- Subject: [Bug c++/26445] New: SSE byte-by-byte load instruction fails to compile
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Call to the following function ...
/*inline */ void ConvertFloatSSE(void *inBuff, void *outBuff, int len)
{
unsigned char* inByteBuffer = reinterpret_cast<unsigned char *>(inBuff);
float* outFloatBuffer = reinterpret_cast<float *>(outBuff);
for(int i = 0; i<len/4; i++)
{
__m128i register1 = _mm_set_epi8(
*inByteBuffer , *(inByteBuffer+ 1),
*(inByteBuffer+ 2), 0,
*(inByteBuffer+3), *(inByteBuffer+ 4),
*(inByteBuffer+ 5), 0,
*(inByteBuffer+6), *(inByteBuffer+ 7),
*(inByteBuffer+ 8), 0,
*(inByteBuffer+9), *(inByteBuffer+10),
*(inByteBuffer+11), 0
);
__m128i register2 = _mm_srai_epi32 (register1, 8);
__m128 register3 = _mm_cvtepi32_ps (register2);
_mm_store_ps (outFloatBuffer, register3);
outFloatBuffer += 4;
inByteBuffer += 12;
}
}
generates...
************************************************************************************************************************************
if g++ -DHAVE_CONFIG_H -I. -I/home/gchernis/tryswap/src -I.. -O1 -g0 -Wall
-march=opteron -MT tryswap.o -MD -MP -MF ".deps/tryswap.Tpo" -c -o tryswap.o
/home/gchernis/tryswap/src/tryswap.cpp; then mv -f ".deps/tryswap.Tpo"
".deps/tryswap.Po"; else rm -f ".deps/tryswap.Tpo"; exit 1; fi
/home/gchernis/tryswap/src/tryswap.cpp: In function ?void
ConvertFloatSSE(void*, void*, int)?:
/home/gchernis/tryswap/src/tryswap.cpp:189: error: unable to find a register to
spill in class ?GENERAL_REGS?
/home/gchernis/tryswap/src/tryswap.cpp:189: error: this is the insn:
(insn 90 89 91 2 (parallel [
(set (subreg:DI (reg:V16QI 21 xmm0 [102]) 0)
(ashift:DI (reg:DI 1 dx [90])
(const_int 8 [0x8])))
(clobber (reg:CC 17 flags))
]) 394 {*ashldi3_1_rex64} (insn_list:REG_DEP_TRUE 66 (nil))
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_UNUSED (reg:CC 17 flags)
(expr_list:REG_DEAD (reg:DI 1 dx [90])
(nil)))))
/home/gchernis/tryswap/src/tryswap.cpp:189: confused by earlier errors, bailing
out
gmake[2]: *** [tryswap.o] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***
--
Summary: SSE byte-by-byte load instruction fails to compile
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gchernis11 at msn dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26445