From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13729 invoked by alias); 25 Nov 2002 21:14:02 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 13706 invoked from network); 25 Nov 2002 21:14:01 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Nov 2002 21:14:01 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gAPKneP30135; Mon, 25 Nov 2002 15:49:40 -0500 Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [172.16.52.227]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gAPLE0D09236; Mon, 25 Nov 2002 16:14:00 -0500 Received: from greed.delorie.com (dj.cipe.redhat.com [10.0.0.222]) by post-office.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gAPLE0l29818; Mon, 25 Nov 2002 16:14:00 -0500 Received: (from dj@localhost) by greed.delorie.com (8.11.6/8.11.6) id gAPLDxC26701; Mon, 25 Nov 2002 16:13:59 -0500 Date: Mon, 25 Nov 2002 13:14:00 -0000 Message-Id: <200211252113.gAPLDxC26701@greed.delorie.com> From: DJ Delorie To: binutils@sources.redhat.com, sid@sources.redhat.com, cgen@sources.redhat.com Subject: xstormy16 encoding fix X-SW-Source: 2002-q4/txt/msg00037.txt.bz2 Sanyo noticed that I had the encodings swapped for two of the new opcodes. Committing as obvious... [cgen] * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings. [opcodes] * xstormy16-opc.c: Regenerate. [sid/component/cgen-cpu/xstormy16] * xstormy16-decode.cxx: Regenerate. [gas/testsuite] * gas/xstormy16/allinsn.d: Fix sdiv/sdivlh encodings. Index: cgen/cpu/xstormy16.cpu =================================================================== RCS file: /cvs/src/src/cgen/cpu/xstormy16.cpu,v retrieving revision 1.3 diff -p -3 -r1.3 xstormy16.cpu *** cgen/cpu/xstormy16.cpu 20 Nov 2002 03:14:19 -0000 1.3 --- cgen/cpu/xstormy16.cpu 25 Nov 2002 21:05:26 -0000 *************** *** 1852,1858 **** "Divide 32/16" () ("sdivlh") ! (+ (f-op #x00E0)) (sequence ((SI value)) (set value (add SI (sll SI (and SI R1 #xffff) #x10) (and SI R0 #xffff))) (set R1 (mod SI value (ext SI (trunc HI R2)))) --- 1852,1858 ---- "Divide 32/16" () ("sdivlh") ! (+ (f-op #x00E8)) (sequence ((SI value)) (set value (add SI (sll SI (and SI R1 #xffff) #x10) (and SI R0 #xffff))) (set R1 (mod SI value (ext SI (trunc HI R2)))) *************** *** 1863,1869 **** "Divide 32/16" () ("divlh") ! (+ (f-op #x00E8)) (sequence ((SI value)) (set value (add SI (sll SI (and SI R1 #xffff) #x10) (and SI R0 #xffff))) (set R1 (umod SI value R2)) --- 1863,1869 ---- "Divide 32/16" () ("divlh") ! (+ (f-op #x00E0)) (sequence ((SI value)) (set value (add SI (sll SI (and SI R1 #xffff) #x10) (and SI R0 #xffff))) (set R1 (umod SI value R2)) Index: opcodes/xstormy16-opc.c =================================================================== RCS file: /cvs/src/src/opcodes/xstormy16-opc.c,v retrieving revision 1.3 diff -p -3 -r1.3 xstormy16-opc.c *** opcodes/xstormy16-opc.c 20 Nov 2002 03:15:09 -0000 1.3 --- opcodes/xstormy16-opc.c 25 Nov 2002 21:05:26 -0000 *************** static const CGEN_OPCODE xstormy16_cgen_ *** 902,914 **** { { 0, 0, 0, 0 }, { { MNEM, 0 } }, ! & ifmt_iret, { 0xe0 } }, /* divlh */ { { 0, 0, 0, 0 }, { { MNEM, 0 } }, ! & ifmt_iret, { 0xe8 } }, /* nop */ { --- 902,914 ---- { { 0, 0, 0, 0 }, { { MNEM, 0 } }, ! & ifmt_iret, { 0xe8 } }, /* divlh */ { { 0, 0, 0, 0 }, { { MNEM, 0 } }, ! & ifmt_iret, { 0xe0 } }, /* nop */ { Index: sid/component/cgen-cpu/xstormy16/xstormy16-decode.cxx =================================================================== RCS file: /cvs/src/src/sid/component/cgen-cpu/xstormy16/xstormy16-decode.cxx,v retrieving revision 1.2 diff -p -3 -r1.2 xstormy16-decode.cxx *** sid/component/cgen-cpu/xstormy16/xstormy16-decode.cxx 20 Nov 2002 03:15:43 -0000 1.2 --- sid/component/cgen-cpu/xstormy16/xstormy16-decode.cxx 25 Nov 2002 21:05:26 -0000 *************** xstormy16_scache::decode (xstormy16_cpu* *** 436,442 **** { case 0 : itype = XSTORMY16_INSN_DIV; xstormy16_extract_sfmt_mul (this, current_cpu, pc, base_insn, entire_insn); goto done; case 1 : itype = XSTORMY16_INSN_MUL; xstormy16_extract_sfmt_mul (this, current_cpu, pc, base_insn, entire_insn); goto done; ! case 2 : itype = XSTORMY16_INSN_SDIVLH; xstormy16_extract_sfmt_sdivlh (this, current_cpu, pc, base_insn, entire_insn); goto done; default : itype = XSTORMY16_INSN_X_INVALID; xstormy16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done; } } --- 436,442 ---- { case 0 : itype = XSTORMY16_INSN_DIV; xstormy16_extract_sfmt_mul (this, current_cpu, pc, base_insn, entire_insn); goto done; case 1 : itype = XSTORMY16_INSN_MUL; xstormy16_extract_sfmt_mul (this, current_cpu, pc, base_insn, entire_insn); goto done; ! case 2 : itype = XSTORMY16_INSN_DIVLH; xstormy16_extract_sfmt_sdivlh (this, current_cpu, pc, base_insn, entire_insn); goto done; default : itype = XSTORMY16_INSN_X_INVALID; xstormy16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done; } } *************** xstormy16_scache::decode (xstormy16_cpu* *** 446,452 **** switch (val) { case 0 : itype = XSTORMY16_INSN_SDIV; xstormy16_extract_sfmt_sdiv (this, current_cpu, pc, base_insn, entire_insn); goto done; ! case 1 : itype = XSTORMY16_INSN_DIVLH; xstormy16_extract_sfmt_sdivlh (this, current_cpu, pc, base_insn, entire_insn); goto done; default : itype = XSTORMY16_INSN_X_INVALID; xstormy16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done; } } --- 446,452 ---- switch (val) { case 0 : itype = XSTORMY16_INSN_SDIV; xstormy16_extract_sfmt_sdiv (this, current_cpu, pc, base_insn, entire_insn); goto done; ! case 1 : itype = XSTORMY16_INSN_SDIVLH; xstormy16_extract_sfmt_sdivlh (this, current_cpu, pc, base_insn, entire_insn); goto done; default : itype = XSTORMY16_INSN_X_INVALID; xstormy16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done; } } Index: gas/testsuite/gas/xstormy16/allinsn.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/xstormy16/allinsn.d,v retrieving revision 1.3 diff -p -3 -r1.3 allinsn.d *** gas/testsuite/gas/xstormy16/allinsn.d 20 Nov 2002 03:14:47 -0000 1.3 --- gas/testsuite/gas/xstormy16/allinsn.d 25 Nov 2002 21:05:27 -0000 *************** Disassembly of section \.text: *** 1072,1081 **** 82e: c8 00 sdiv 00000830 : ! 830: e8 00 divlh 00000832 : ! 832: e0 00 sdivlh 00000834 : 834: 00 00 nop --- 1072,1081 ---- 82e: c8 00 sdiv 00000830 : ! 830: e0 00 divlh 00000832 : ! 832: e8 00 sdivlh 00000834 : 834: 00 00 nop