From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14990 invoked by alias); 18 Jan 2013 21:22:15 -0000 Received: (qmail 14967 invoked by uid 22791); 18 Jan 2013 21:22:11 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm7-vm4.bullet.mail.ne1.yahoo.com (HELO nm7-vm4.bullet.mail.ne1.yahoo.com) (98.138.91.167) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jan 2013 21:22:04 +0000 Received: from [98.138.226.176] by nm7.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 21:22:04 -0000 Received: from [98.138.226.129] by tm11.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 21:22:03 -0000 Received: from [127.0.0.1] by smtp216.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 21:22:03 -0000 X-Yahoo-SMTP: O8yZ0eSswBDg9IFXUi0Ys5JqJPgLa9Jv Received: from [128.64.1.7] (Ericson2314@69.236.166.17 with plain) by smtp216.mail.ne1.yahoo.com with SMTP; 18 Jan 2013 13:22:03 -0800 PST Message-ID: <50F9BCFA.101@yahoo.com> Date: Fri, 18 Jan 2013 22:31:00 -0000 From: John Cotton Ericson User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Oleg Endo CC: Andrew Haley , gcc-help@gcc.gnu.org Subject: Re: GCC vs MSVC compiler issues in a port References: <50D57597.7050304@yahoo.com> <50D57838.10903@yahoo.com> <1356178252.30211.22.camel@yam-132-YW-E178-FTW> <50D6991B.1070904@yahoo.com> <1356738364.2359.6.camel@yam-132-YW-E178-FTW> In-Reply-To: <1356738364.2359.6.camel@yam-132-YW-E178-FTW> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00165.txt.bz2 After replacing more inline assembly with C/C++ I was indeed able to get something to render so I could at least visually debug. That means I can now work backwards: adding blocks of inline assembly back in and carefully verifying that the gcc inline assembly matches the original through disassembly. In addition, I also found some documentation which should help me make proper run-time tests, as such tests are the only real way to verify the C/C++ and make sure this works on architectures besides x86-32. Between those two methods I think I'll be able to smoothly finish this. Thank you both very much! On 12/28/2012 06:46 PM, Oleg Endo wrote: > On Sun, 2012-12-23 at 00:39 -0500, John Cotton Ericson wrote: > >> I agree, I tried to make my inline assembly as match the original as >> much is possible. But you just can't rule it out while it's still there. > Well, as a first step, I'd replace all inline asm stuff with C/C++ > implementations in the original version using MSVC. Performance might > become worse than the original, or it might not. Either way, I'd leave > those optimizations for later. Moreover, it would give you a CPU > independent version of the code, which is often a good thing :) > >> For testing would you recommend something like >> http://check.sourceforge.net/ ? > A test_main with a bunch of assert checks should suffice as a start. > > Cheers, > Oleg >