From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13677 invoked by alias); 29 Apr 2002 12:57:47 -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 13619 invoked from network); 29 Apr 2002 12:57:43 -0000 Received: from unknown (HELO dell-pe2450-3.cambridge.redhat.com) (195.224.55.225) by sources.redhat.com with SMTP; 29 Apr 2002 12:57:43 -0000 Received: from north-pole.nickc.cambridge.redhat.com (host217-35-24-155.in-addr.btopenworld.com [217.35.24.155]) by dell-pe2450-3.cambridge.redhat.com (Postfix) with ESMTP id 1D88484DAB for ; Mon, 29 Apr 2002 13:57:43 +0100 (BST) Received: from north-pole.nickc.cambridge.redhat.com.nickc.cambridge.redhat.com (localhost [127.0.0.1]) by north-pole.nickc.cambridge.redhat.com (Postfix) with ESMTP id 32C931C395 for ; Mon, 29 Apr 2002 13:57:24 +0100 (BST) To: gdb-patches@sources.redhat.com Subject: RFA: Add support for CLASS_IGNORE and ARG_NIM4 From: Nick Clifton Date: Mon, 29 Apr 2002 05:57:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-04/txt/msg01117.txt.bz2 Hi Guys, The binutils z8k sources were recently updated to add a new opcode class - CLASS_IGNORE - and a new immediate argument type - ARG_NIM4. This patch adds support for these changes to the z8k simulator. OK to apply ? Cheers Nick 2002-04-29 Nick Clifton * writecode.c (lookup_inst): Ignore CLASS_IGNORE. (info_args): Treat CLASS_IGNORE like CLASS_BIT. Handle ARG_NIM4. (info_len_in_words): Handle CLASS_IGNORE and ARG_NIM4. Index: sim/z8k/writecode.c =================================================================== RCS file: /cvs/src/src/sim/z8k/writecode.c,v retrieving revision 1.1.1.1 diff -c -3 -p -w -r1.1.1.1 writecode.c *** sim/z8k/writecode.c 16 Apr 1999 01:35:14 -0000 1.1.1.1 --- sim/z8k/writecode.c 29 Apr 2002 12:53:07 -0000 *************** lookup_inst (what) *** 139,144 **** --- 139,146 ---- nibl_matched = 0; break; + case CLASS_IGNORE: + break; case CLASS_BIT: if (datum_value != instr_nibl) nibl_matched = 0; *************** info_args (p) *** 539,544 **** --- 541,547 ---- case CLASS_BIT_1OR2: emit ("register unsigned int imm_src=(& 2)?2:1;\n"); break; + case CLASS_IGNORE: case CLASS_BIT: /* Just ignore these, we've already decoded this bit */ nibs++; *************** break; *** 589,594 **** --- 592,601 ---- emit ("register unsigned int imm_src=;\n"); nibs++; break; + case ARG_NIM4: + emit ("register unsigned int imm_src = - ;\n"); + nibs++; + break; case ARG_IMM2: emit ("register unsigned int imm_src= & 0x2;\n"); nibs++; *************** info_len_in_words (o) *** 1938,1943 **** --- 1945,1951 ---- { switch (*p & CLASS_MASK) { + case CLASS_IGNORE: case CLASS_BIT: case CLASS_REGN0: case CLASS_REG: *************** info_len_in_words (o) *** 1959,1964 **** --- 1967,1973 ---- break; case ARG_IMM2: case ARG_IMM4: + case ARG_NIM4: case ARG_IMM4M1: case ARG_IMM_1: case ARG_IMM_2: