From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1093 invoked by alias); 17 Apr 2009 02:07:45 -0000 Received: (qmail 685 invoked by uid 22791); 17 Apr 2009 02:07:42 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Apr 2009 02:07:35 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n3H27W8m019365; Thu, 16 Apr 2009 22:07:32 -0400 Received: from greed.delorie.com (vpn-12-170.rdu.redhat.com [10.11.12.170]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3H27Vs3011912; Thu, 16 Apr 2009 22:07:31 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id n3H27UVo031835; Thu, 16 Apr 2009 22:07:30 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id n3H27U4v031832; Thu, 16 Apr 2009 22:07:30 -0400 Date: Fri, 17 Apr 2009 02:07:00 -0000 Message-Id: <200904170207.n3H27U4v031832@greed.delorie.com> From: DJ Delorie To: Dave Brolley , Richard Sandiford CC: cgen@sourceware.org In-reply-to: <49DE1424.6080000@redhat.com> (message from Dave Brolley on Thu, 09 Apr 2009 11:28:36 -0400) Subject: Re: intrinsics.scm patch References: <200904082108.n38L8pV7002050@greed.delorie.com> <49DE1424.6080000@redhat.com> Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00009.txt.bz2 > I can't comment on this, having never worked with it. Probably you and > Richard Sandiford are the only ones who have worked on this. As far as I know, only MeP uses it (or will, once the port is accepted). Richard, do you have any comments on the patch? Or would you like me to take over intrinsics.scm? I did add another change, to include aliases in the intrinsics list. 2009-04-16 DJ Delorie * intrinsics.scm (intrinsics-analyze!): Include aliases. (guess-mode): Drop COP* syntax. (need-insn): Add "--syscall--" to the list. (enum-type): Drop COP* syntax. (intrinsics.h): Likewise. (intrinsic-protos.h): Change file header to allow it to be included. Index: intrinsics.scm =================================================================== RCS file: /cvs/src/src/cgen/intrinsics.scm,v retrieving revision 1.1 diff -p -U3 -r1.1 intrinsics.scm --- intrinsics.scm 5 Nov 2007 15:46:19 -0000 1.1 +++ intrinsics.scm 17 Apr 2009 01:53:27 -0000 @@ -26,7 +26,7 @@ (define (intrinsics-analyze!) (arch-analyze-insns! CURRENT-ARCH - #f ; don't include aliases + #t ; include aliases #t) ; do analyze the semantics ) @@ -274,8 +274,8 @@ (cond ((equal? (md-operand:cdata op) 'FMAX_INT) "SI") ((equal? (md-operand:cdata op) 'FMAX_FLOAT) "SF") - ((is-h-cr64? (md-operand:hw op)) "COPDI") - ((is-h-cr? (md-operand:hw op)) "COPSI") + ((is-h-cr64? (md-operand:hw op)) "DI") + ((is-h-cr? (md-operand:hw op)) "SI") ((not (memory? (md-operand:type op))) "SI") (else #f))) @@ -1038,7 +1038,7 @@ ;; Return true if the given insn should be included in the output files. (define (need-insn? insn) - (not (member (insn-mnemonic insn) '("--unused--" "--reserved--")))) + (not (member (insn-mnemonic insn) '("--unused--" "--reserved--" "--syscall--")))) ;; Set up global variables, if we haven't already. (define (analyze-intrinsics!) @@ -1268,8 +1268,8 @@ (define (enum-type op) (cond - ((is-h-cr64? (md-operand:hw op)) "cgen_regnum_operand_type_COPDI") - ((is-h-cr? (md-operand:hw op)) "cgen_regnum_operand_type_COPSI") + ((is-h-cr64? (md-operand:hw op)) "cgen_regnum_operand_type_DI") + ((is-h-cr? (md-operand:hw op)) "cgen_regnum_operand_type_SI") (else (case (md-operand:cdata op) ((POINTER) "cgen_regnum_operand_type_POINTER") @@ -1395,8 +1395,8 @@ " cgen_regnum_operand_type_USHORT, /* unsigned short */\n" " cgen_regnum_operand_type_CHAR, /* char */\n" " cgen_regnum_operand_type_UCHAR, /* unsigned char */\n" - " cgen_regnum_operand_type_COPSI, /* __cop long */\n" - " cgen_regnum_operand_type_COPDI, /* __cop long long */\n" + " cgen_regnum_operand_type_SI, /* __cop long */\n" + " cgen_regnum_operand_type_DI, /* __cop long long */\n" " cgen_regnum_operand_type_CP_DATA_BUS_INT, /* cp_data_bus_int */\n" " cgen_regnum_operand_type_DEFAULT = cgen_regnum_operand_type_LONG\n" "};\n" @@ -1530,20 +1530,14 @@ (else "long")) (if (and (not (equal? (md-operand:cdata op) 'REGNUM)) (md-operand:write-index op)) - "&" ""))) + "*" ""))) (define (intrinsic-protos.h) ; i.e., intrinsics.h (string-write "\n\n" "/* DO NOT EDIT: This file is automatically generated by CGEN.\n" " Any changes you make will be discarded when it is next regenerated.\n" - "\n" - " FURTHERMORE: this file serves only as documentation and must not be included\n " - " in any application code which wishes to use intrinsics. */\n" - "\n\n" - "#error \"This file must not be included in any application code which uses intrinsics.\"\n" - "#error \"It is here for documentation purposes ONLY.\"\n" - "\n\n" + "*/\n\n" "#if __MEP_CONFIG_CP_DATA_BUS_WIDTH == 64\n" " typedef long long cp_data_bus_int;\n" "#else\n"