{
"subject": "Re: 4 hashes parallel on SSE2 CPUs for 0.3.6",
"content": {
"format": "html",
"body": "<div class=\"post\">On both MinGW GCC 4.4.1 and 4.5.0 I have it working with test.cpp but SIGSEGV when called by BitcoinMiner. So now it doesn't look like it's the version of GCC, it's something else, maybe just the luck of how the stack is aligned.<br/><br/>I have it working fine on GCC 4.3.3 on Ubuntu 32-bit.<br/><br/>I found the problem with Crypto++ on MinGW 4.5.0. Here's the patch for that:<br/><div class=\"codeheader\">Code:</div><div class=\"code\">--- \\old\\sha.cpp<span style=\"white-space: pre;\"> </span>Mon Jul 26 13:31:11 2010<br/>+++ \new\\sha.cpp<span style=\"white-space: pre;\"> </span>Sat Aug 14 20:21:08 2010<br/>@@ -336,7 +336,7 @@<br/> <span style=\"white-space: pre;\"> </span>ROUND(14, 0, eax, ecx, edi, edx)<br/> <span style=\"white-space: pre;\"> </span>ROUND(15, 0, ecx, eax, edx, edi)<br/> <br/>-<span style=\"white-space: pre;\"> </span>ASL(1)<br/>+ ASL(label1) // Bitcoin: fix for MinGW GCC 4.5<br/> <span style=\"white-space: pre;\"> </span>AS2(add WORD_REG(si), 4*16)<br/> <span style=\"white-space: pre;\"> </span>ROUND(0, 1, eax, ecx, edi, edx)<br/> <span style=\"white-space: pre;\"> </span>ROUND(1, 1, ecx, eax, edx, edi)<br/>@@ -355,7 +355,7 @@<br/> <span style=\"white-space: pre;\"> </span>ROUND(14, 1, eax, ecx, edi, edx)<br/> <span style=\"white-space: pre;\"> </span>ROUND(15, 1, ecx, eax, edx, edi)<br/> <span style=\"white-space: pre;\"> </span>AS2(<span style=\"white-space: pre;\"> </span>cmp<span style=\"white-space: pre;\"> </span><span style=\"white-space: pre;\"> </span>WORD_REG(si), K_END)<br/>-<span style=\"white-space: pre;\"> </span>ASJ(<span style=\"white-space: pre;\"> </span>jne,<span style=\"white-space: pre;\"> </span>1, b)<br/>+ ASJ( jne, label1, ) // Bitcoin: fix for MinGW GCC 4.5<br/> <br/> <span style=\"white-space: pre;\"> </span>AS2(<span style=\"white-space: pre;\"> </span>mov<span style=\"white-space: pre;\"> </span><span style=\"white-space: pre;\"> </span>WORD_REG(dx), DATA_SAVE)<br/> <span style=\"white-space: pre;\"> </span>AS2(<span style=\"white-space: pre;\"> </span>add<span style=\"white-space: pre;\"> </span><span style=\"white-space: pre;\"> </span>WORD_REG(dx), 64)<br/></div></div>"
},
"source": {
"name": "Bitcoin Forum",
"url": "https://bitcointalk.org/index.php?topic=648.msg9359#msg9359"
},
"date": "2010-08-15T03:40:29Z"
}