This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

more xstormy16 opcodes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]