🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #467

Re: Patch to support [u]divsi3 on 386

#467
From: James Van Artsdalen
Date: Fri, 14 Jul 1989 05:25
16 lines
1121 bytes
In <590@everex.UUCP>, mb@everex.UUCP (Michael Burg) wrote:

	(define_insn "udivsi3"
	   [(set (match_operand:SI 0 "general_operand" "=&a")
		(udiv:SI (match_operand:SI 1 "general_operand" "0")
			(match_operand:SI 2 "general_operand" "rm")))
		(clobber (reg:SI 1))]
	  ""
>>>	  "cltd\;div%L0 %2")

Oops: I don't think you want to sign extend the operands to an
unsigned division.  Might do something like "xor%L0 %%edx,%%edx\;div%L0 %2"
instead.
-- 
James R. Van Artsdalen          james@bigtex.cactus.org   "Live Free or Die"
Dell Computer Co    9505 Arboretum Blvd Austin TX 78759         512-338-8789
Technical Details
Message-ID: <19009@bigtex.cactus.org>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!pp!milano!bigtex!james
References: <590@everex.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!pp!milano!bigtex!james
From: james@bigtex.cactus.org (James Van Artsdalen)
Newsgroups: gnu.gcc.bug
Subject: Re: Patch to support [u]divsi3 on 386
Keywords: 386, gcc-1.35
Message-ID: <19009@bigtex.cactus.org>
Date: 14 Jul 89 05:25:14 GMT
References: <590@everex.UUCP>
Reply-To: james@bigtex.cactus.org (James Van Artsdalen)
Distribution: na
Organization: Institute of Applied Cosmology, Austin TX
Lines: 16