This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
xstormy16 encoding fix
- From: DJ Delorie <dj at redhat dot com>
- To: binutils at sources dot redhat dot com, sid at sources dot redhat dot com, cgen at sources dot redhat dot com
- Date: Mon, 25 Nov 2002 16:13:59 -0500
- Subject: xstormy16 encoding fix
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 <divlh>:
! 830: e8 00 divlh
00000832 <sdivlh>:
! 832: e0 00 sdivlh
00000834 <nop>:
834: 00 00 nop
--- 1072,1081 ----
82e: c8 00 sdiv
00000830 <divlh>:
! 830: e0 00 divlh
00000832 <sdivlh>:
! 832: e8 00 sdivlh
00000834 <nop>:
834: 00 00 nop