fche | 1 Aug 2007 16:13
Favicon

new cgen snapshot available

A new automated cgen CVS snapshot is available.
ftp://sources.redhat.com/pub/cgen/snapshots/cgen-20070801.tar.bz2
1438123 bytes
See also ftp://sources.redhat.com/pub/cgen/snapshots/

Dave Brolley | 21 Aug 2007 21:40
Picon
Favicon

[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 <at> 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)) ", "
(Continue reading)

Will Newton | 29 Aug 2007 15:57
Picon

Passing args with nested pmacros

Hi all,

I'm trying to simplify some cgen macros and I would like to be able to
to map a pmacro over a list, but also pass the pmacro some other
arguments. e.g.

(define-pmacro (sub-macro item arg) ...)

(define-pmacro (top-level top-level-arg)
  (.map (.pmacro (list-item) (sub-macro list-item top-level-arg))))

But this doesn't look like it's possible because .pmacro's don't do
lexical scoping. Is there any way to do what I want?

Thanks,


Gmane