[M3devel] m3cg right shift signed?

Jay K jay.krell at cornell.edu
Wed Jun 10 12:01:54 CEST 2015


You are right, it isn't new. But I think nothing in the system was using it until the 32bit wchar support came in.I added test p257 that exercises it..so I can make sure m3cc/nt386 agree, and then update C backend to match.
 - Jay



> Subject: Re: [M3devel] m3cg right shift signed?
> From: hosking at purdue.edu
> Date: Mon, 8 Jun 2015 22:00:22 -0400
> CC: m3devel at elegosoft.com
> To: jay.krell at cornell.edu
> 
> I don’t think this is a new occurrence.  Surely signed right shift makes sense to retain the sign bit?
> 
> > On Jun 8, 2015, at 9:44 PM, Jay <jay.krell at cornell.edu> wrote:
> > 
> > (Not at propercomputer but sending anyway.)
> > 
> > Is right shift of a signed type meant to be supported and well defined in the IR? I thought not, and assert so in the C backend. But it occurs now, from m3front/cg/set_range or such. Maybe change that to not? Surely unsigned types are adequate here?
> > 
> > - Jay
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150610/fa31b9bc/attachment-0002.html>


More information about the M3devel mailing list