public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* more xstormy16 opcodes
@ 2002-11-19 18:48 DJ Delorie
  2002-11-19 18:49 ` Ben Elliston
  0 siblings, 1 reply; 2+ messages in thread
From: DJ Delorie @ 2002-11-19 18:48 UTC (permalink / raw)
  To: binutils, cgen, sid


Sanyo has added a few more opcodes...  ok?

[cgen]
	* cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.

[gas]
	* gas/xstormy16/allinsn.sh: Add sdiv, divlh, and sdivlh.
	* gas/xstormy16/allinsn.d: Regenerate.
	* gas/xstormy16/allinsn.s: Regenerate.

[opcodes]
	* xstormy16-desc.c: Regenerate.
	* xstormy16-opc.c: Regenerate.
	* xstormy16-opc.h: Regenerate.

[sid/component/cgen-cpu/xstormy16]
	* xstormy16-cpu.h: Regenerate.
	* xstormy16-decode.cxx: Regenerate.
	* xstormy16-decode.h: Regenerate.
	* xstormy16-defs.h: Regenerate.
	* xstormy16-desc.h: Regenerate.
	* xstormy16-sem.cxx: Regenerate.
	* xstormy16-write.cxx: Regenerate.

Index: cgen/cpu/xstormy16.cpu
===================================================================
RCS file: /cvs/src/src/cgen/cpu/xstormy16.cpu,v
retrieving revision 1.2
diff -p -3 -r1.2 xstormy16.cpu
*** cgen/cpu/xstormy16.cpu	11 Jan 2002 07:24:49 -0000	1.2
--- cgen/cpu/xstormy16.cpu	20 Nov 2002 01:48:51 -0000
***************
*** 1,5 ****
  ; xstormy16 CPU core description. -*- Scheme -*-
! ; Copyright (C) 2001 Red Hat, Inc.
  ; This file is part of CGEN.
  ; See file COPYING.CGEN for details.
  
--- 1,5 ----
  ; xstormy16 CPU core description. -*- Scheme -*-
! ; Copyright (C) 2001, 2002 Red Hat, Inc.
  ; This file is part of CGEN.
  ; See file COPYING.CGEN for details.
  
***************
*** 1836,1841 ****
--- 1836,1873 ----
       (sequence ()
  	       (set R1 (umod R0 R2))
  	       (set-mem-psw R0 (udiv R0 R2)))
+      ()
+ )
+ (dni sdiv
+      "Signed Divide"
+      ()
+      ("sdiv")
+      (+ (f-op #x00C8))
+      (sequence ()
+ 	       (set R1 (mod HI R0 R2))
+ 	       (set-mem-psw R0 (div HI R0 R2)))
+      ()
+ )
+ (dni sdivlh
+      "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))))
+ 	       (set-mem-psw R0 (div SI value (ext SI (trunc HI R2)))))
+      ()
+ )
+ (dni divlh
+      "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))
+ 	       (set-mem-psw R0 (udiv SI value R2)))
       ()
  )
  
Index: gas/testsuite/gas/xstormy16/allinsn.sh
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/xstormy16/allinsn.sh,v
retrieving revision 1.2
diff -p -3 -r1.2 allinsn.sh
*** gas/testsuite/gas/xstormy16/allinsn.sh	11 Jan 2002 07:24:59 -0000	1.2
--- gas/testsuite/gas/xstormy16/allinsn.sh	20 Nov 2002 01:48:53 -0000
*************** mul:
*** 1213,1218 ****
--- 1213,1230 ----
  div:
  	div
  	.text
+ 	.global sdiv
+ sdiv:
+ 	sdiv
+ 	.text
+ 	.global divlh
+ divlh:
+ 	divlh
+ 	.text
+ 	.global sdivlh
+ sdivlh:
+ 	sdivlh
+ 	.text
  	.global nop
  nop:
  	nop

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: more xstormy16 opcodes
  2002-11-19 18:48 more xstormy16 opcodes DJ Delorie
@ 2002-11-19 18:49 ` Ben Elliston
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2002-11-19 18:49 UTC (permalink / raw)
  To: DJ Delorie; +Cc: cgen, sid

> Sanyo has added a few more opcodes...  ok?

Approved for CGEN and SID.

Ben

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-20  2:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-19 18:48 more xstormy16 opcodes DJ Delorie
2002-11-19 18:49 ` Ben Elliston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).