🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51864

Unsigned addition & subtraction

#51864
From: James Rose
Date: Mon, 15 Mar 1993 18:06
7 lines
1435 bytes
I am currently writing a gcc machine description for an architecture which supports signed and unsigned integer addition.  In gcc RTL descriptions there is no notion of different types (signed or unsigned) for a particular mode (in this case SI single integer mode).  Gcc also does not support the uplus and uminus RTL expression although it does support umult and udiv.  How can I support unsigned addition and subtraction?

I realize that the plus and minus pseudo ops will give me the right answer for any given type but they will not necessarily give me the correct exception handling.  For example, the only difference between the MIPS add and addu instructions is that the signed version will signal an overflow exception whereas the addu never will.  I checked the MIPS machine description for generation of the add instruction and it never seems to get generated.  Any ideas?


		James
Technical Details
Message-ID: <-'$@byu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.mtholyoke.edu!news.byu.edu!news

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,63e23497ea51388b,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-03-15 10:12:59 PST
Nntp-Posting-Host: florida.et.byu.edu
Lines: 7
Path: arc1-ca.pugleaf.net!sparky!uunet!news.mtholyoke.edu!news.byu.edu!news
Message-ID: <-'$@byu.edu>
Date: Mon, 15 Mar 93 11:06:08 MST
From: rosej@florida.et.byu.edu (James Rose)
Newsgroups: gnu.gcc.help
Distribution: world
Organization: Brigham Young University, Provo UT USA
Subject: Unsigned addition & subtraction