From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9668 invoked by alias); 2 Jul 2003 19:28:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9660 invoked from network); 2 Jul 2003 19:28:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 2 Jul 2003 19:28:04 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h62JS3H03495 for ; Wed, 2 Jul 2003 15:28:03 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h62JReS05840; Wed, 2 Jul 2003 15:27:40 -0400 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h62JRdK06551; Wed, 2 Jul 2003 12:27:39 -0700 Message-ID: <3F03322B.5050107@redhat.com> Date: Wed, 02 Jul 2003 19:28:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kazu@cs.umass.edu CC: gdb-patches@sources.redhat.com, rsandifo@redhat.com, dvenkat@noida.hcltech.com Subject: [RFA] h8-sim: all IMM16s should be zero-extended Content-Type: multipart/mixed; boundary="------------050208090200030506030202" X-SW-Source: 2003-07/txt/msg00053.txt.bz2 This is a multi-part message in MIME format. --------------050208090200030506030202 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 126 According to the docs (and I believe this was also the prior simulator behavior), immediates should always be zero-extended. --------------050208090200030506030202 Content-Type: text/plain; name="1.84" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="1.84" Content-length: 1081 2003-07-02 Michael Snyder * compile.c (decode): IMM16 is always zero-extended. Index: compile.c =================================================================== RCS file: /cvs/cvsfiles/devo/sim/h8sx/compile.c,v retrieving revision 1.84 retrieving revision 1.85 diff -p -r1.84 -r1.85 *** compile.c 2003/06/19 04:18:52 1.84 --- compile.c 2003/07/02 19:09:27 1.85 *************** decode (SIM_DESC sd, int addr, unsigned *** 818,824 **** (looking_for & SIZE) == L_16U) { cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1]; ! if ((looking_for & SIZE) != L_16U) cst[opnum] = (short) cst[opnum]; /* Sign extend. */ } else if (looking_for & ABSJMP) --- 818,826 ---- (looking_for & SIZE) == L_16U) { cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1]; ! /* Immediates are always unsigned. */ ! if ((looking_for & SIZE) != L_16U && ! (looking_for & MODE) != IMM) cst[opnum] = (short) cst[opnum]; /* Sign extend. */ } else if (looking_for & ABSJMP) --------------050208090200030506030202--