public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* [patch][commit] Generation of C code for Large Integer Constants
@ 2007-08-21 19:40 Dave Brolley
  0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2007-08-21 19:40 UTC (permalink / raw)
  To: cgen

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

Hi,

I've committed the attached patch which generate a call to MAKEDI when 
generating C code for integer constants which are larger than 32 bits.

Dave

[-- Attachment #2: large-int.ChangeLog --]
[-- Type: text/plain, Size: 130 bytes --]

2007-08-21  Dave Brolley  <brolley@redhat.com>

	* rtl-c.scm (const): Generate call to MAKEDI for integers larger
	than 32 bits.


[-- Attachment #3: large-int.patch.txt --]
[-- Type: text/plain, Size: 845 bytes --]

Index: cgen/rtl-c.scm
===================================================================
RCS file: /cvs/src/src/cgen/rtl-c.scm,v
retrieving revision 1.7
diff -c -p -r1.7 rtl-c.scm
*** cgen/rtl-c.scm	2 Aug 2005 19:30:10 -0000	1.7
--- cgen/rtl-c.scm	21 Aug 2007 19:36:23 -0000
***************
*** 1446,1452 ****
    (let ((mode (mode:lookup mode)))
      (cx:make mode
  	     (cond ((or (mode:eq? 'DI mode)
! 			(mode:eq? 'UDI mode))
  		    (string-append "MAKEDI ("
  				   (gen-integer (high-part c)) ", "
  				   (gen-integer (low-part c))
--- 1446,1454 ----
    (let ((mode (mode:lookup mode)))
      (cx:make mode
  	     (cond ((or (mode:eq? 'DI mode)
! 			(mode:eq? 'UDI mode)
! 			(< #xffffffff c)
! 			(> #x-80000000 c))
  		    (string-append "MAKEDI ("
  				   (gen-integer (high-part c)) ", "
  				   (gen-integer (low-part c))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-21 19:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-21 19:40 [patch][commit] Generation of C code for Large Integer Constants Dave Brolley

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).