This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
[patch][commit] Generation of C code for Large Integer Constants
- From: Dave Brolley <brolley at redhat dot com>
- To: cgen at sources dot redhat dot com
- Date: Tue, 21 Aug 2007 15:40:04 -0400
- Subject: [patch][commit] Generation of C code for Large Integer Constants
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
2007-08-21 Dave Brolley <brolley@redhat.com>
* rtl-c.scm (const): Generate call to MAKEDI for integers larger
than 32 bits.
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))