From: DJ Delorie <dj@redhat.com>
To: binutils@sources.redhat.com, cgen@sources.redhat.com,
sid@sources.redhat.com
Subject: more xstormy16 opcodes
Date: Tue, 19 Nov 2002 18:48:00 -0000 [thread overview]
Message-ID: <200211200247.gAK2lwv26936@greed.delorie.com> (raw)
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
next reply other threads:[~2002-11-20 2:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-19 18:48 DJ Delorie [this message]
2002-11-19 18:49 ` Ben Elliston
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200211200247.gAK2lwv26936@greed.delorie.com \
--to=dj@redhat.com \
--cc=binutils@sources.redhat.com \
--cc=cgen@sources.redhat.com \
--cc=sid@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).