From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5086 invoked by alias); 11 May 2006 14:38:18 -0000 Received: (qmail 5074 invoked by uid 22791); 11 May 2006 14:38:17 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 May 2006 14:38:15 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4BEcDRL015783 for ; Thu, 11 May 2006 10:38:13 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4BEcD2F014101 for ; Thu, 11 May 2006 10:38:13 -0400 Received: from [172.16.14.227] (IDENT:lvpp7a/bkytIUoowke8/ZJG6aBrkew5F@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4BEcDAc015261 for ; Thu, 11 May 2006 10:38:13 -0400 Message-ID: <44634C55.5000600@redhat.com> Date: Thu, 11 May 2006 14:38:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] Additional cgen ops Content-Type: multipart/mixed; boundary="------------070009050104090600070409" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00024.txt.bz2 This is a multi-part message in MIME format. --------------070009050104090600070409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 224 Hi, I've committed the attached patch which implements the cgen ops SUBWORDDIHI, SUBWORDDIQI and SUBWORDDFDI. The patch also initializes the existing member cgen_bi_endian_cpu::branch_was_return in the constructor. Dave --------------070009050104090600070409 Content-Type: text/plain; name="sid-ops.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-ops.ChangeLog" Content-length: 187 2006-05-11 Dave Brolley * cgen-ops.h (SUBWORDDIHI, SUBWORDDIQI, SUBWORDDFDI): New functions. * compCGEN.cxx (cgen_bi_endian_cpu): Initialize branch_was_return. --------------070009050104090600070409 Content-Type: text/plain; name="sid-ops.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-ops.patch.txt" Content-length: 2670 Index: sid/component/cgen-cpu/cgen-ops.h =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/cgen-ops.h,v retrieving revision 1.12 diff -c -p -r1.12 cgen-ops.h *** sid/component/cgen-cpu/cgen-ops.h 16 Feb 2005 21:19:34 -0000 1.12 --- sid/component/cgen-cpu/cgen-ops.h 11 May 2006 14:31:27 -0000 *************** *** 1,6 **** // cgen-ops.h - CGEN semantic ops. -*- C++ -*- ! // Copyright (C) 1999, 2000, 2002 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. --- 1,6 ---- // cgen-ops.h - CGEN semantic ops. -*- C++ -*- ! // Copyright (C) 1999, 2000, 2002, 2006 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. *************** SUBWORDDIDF (DI in) *** 560,565 **** --- 560,587 ---- return *out; } + inline HI + SUBWORDDIHI (DI in, int word) + { + assert (word >= 0 && word <= 3); + return (UHI) (in >> (16 * (3 - word))) & 0xFFFF; + } + + inline QI + SUBWORDDIQI (DI in, int byte) + { + assert (byte >= 0 && byte <= 7); + return (UQI) (in >> (8 * (7 - byte))) & 0xFF; + } + + inline DI + SUBWORDDFDI (DF in) + { + union { DF in; DI out; } x; + x.in = in; + return x.out; + } + inline SI SUBWORDDFSI (DF in, int word) { Index: sid/component/cgen-cpu/compCGEN.cxx =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/compCGEN.cxx,v retrieving revision 1.17 diff -c -p -r1.17 compCGEN.cxx *** sid/component/cgen-cpu/compCGEN.cxx 1 Mar 2006 21:07:00 -0000 1.17 --- sid/component/cgen-cpu/compCGEN.cxx 11 May 2006 14:31:27 -0000 *************** *** 1,6 **** // compCGEN.cxx - CPU components. -*- C++ -*- ! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. --- 1,6 ---- // compCGEN.cxx - CPU components. -*- C++ -*- ! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. *************** using namespace cgen; *** 42,47 **** --- 42,48 ---- // ---------------------------------------------------------------------------- cgen_bi_endian_cpu::cgen_bi_endian_cpu () { + branch_was_return = false; warnings_enabled = false; add_attribute ("enable-warnings?", & warnings_enabled, "setting"); this->engine_type = ENGINE_UNKNOWN; --------------070009050104090600070409--