🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52963

Can this be done with GCC?

#52963
From: Oliver Kellogg
Date: Wed, 25 Mar 1992 23:40
23 lines
1419 bytes
Hello World,

I a trying to adapt GCC to a special microprocessor that doen't have a
divsi3 type instruction, but instead has a divmodsi4 instruction.

The divmodsi4 that the processor offers works with registers, and has 
one constraint:
Given a two operands, say in Ra and Rb, the quotient is put into Ra,
and the modulo into R(a+1).

The problem here is that, for just an ordinary division, a "moving
target" register is clobbered, namely the register one higher than the
numerator operand.

How do I express this in RTL?  (oh, I've already tried quite a few
things... but maybe I'm just lacking the decisive inspiration :-)

Thanks for any hints & help.


Oliver M. Kellogg, Software Eng'r      Deutsche Aerospace AG, Munich, FRG
okellogg@salyko.doit.sub.org     Writing this at home & on my own behalf.
Technical Details
Message-ID: <5247@salyko.doit.sub.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!iWarp.intel.com|ichips!inews!imutm1.de.intel.com!gold.sub.org!salyko!salyko.doit.sub.org

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,243915badae6b272,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-03-25 15:40:12 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!iWarp.intel.com|ichips!inews!imutm1.de.intel.com!gold.sub.org!salyko!salyko.doit.sub.org
From: okellogg@salyko.doit.sub.org (Oliver Kellogg)
Newsgroups: gnu.gcc.help
Subject: Can this be done with GCC?
Keywords: clobber, scratch, moving-target register
Message-ID: <5247@salyko.doit.sub.org>
Date: 25 Mar 92 23:40:12 GMT
Sender: root@salyko.doit.sub.org
Distribution: gnu
Lines: 23