From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128650 invoked by alias); 2 Jun 2016 09:34:12 -0000 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 Received: (qmail 128624 invoked by uid 89); 2 Jun 2016 09:34:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=sem, cgen, H*r:sk:cgen@so, 2159 X-HELO: mail-pf0-f177.google.com Received: from mail-pf0-f177.google.com (HELO mail-pf0-f177.google.com) (209.85.192.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 02 Jun 2016 09:34:06 +0000 Received: by mail-pf0-f177.google.com with SMTP id 62so29448309pfd.1 for ; Thu, 02 Jun 2016 02:34:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-transfer-encoding; bh=056x+uwqR1GoA2PA1U08Bixg8Cmf0joJExfHW4wls8U=; b=jzVqmtwNyss/VOPkIfLmokpX/wIce3IBieenj77YgoaNnrl71rQlZ8gijfE35Tsfo+ JtYF8AhA7wDJ4JyUP9WyKfxpCDxkyeBcth4jbkKRhQSF25PMdkB/1Fct954pD+kLnX/k HUvmjatNgTa6pOKrMwzf3dS901nwjpZ3bWXrP8MV2SJz0f697BMMCBdN0PpMm6PB/Y2Z csjyZfw5DaeoOll+iBWuddyrkWSzHnCpGP5mIUvhyHtWY+psMuWDrnT/KMruIKqkANUn 91MlmvCwDtAGIAAyW2oA23RdhqOYBQ8RkvKKYM4+ukG5v8vlm4lH6lTswhL3d9tkNlX3 YSxA== X-Gm-Message-State: ALyK8tKA/Ft8ZszuBbNsPpkcztJ+QZ6UrtZHE/CCzWXMxQzCe4bLyS3raUpS4sughygV1o+NOs92FO3yrxsEiw== MIME-Version: 1.0 X-Received: by 10.98.54.133 with SMTP id d127mr2677834pfa.104.1464860044487; Thu, 02 Jun 2016 02:34:04 -0700 (PDT) Received: by 10.66.80.100 with HTTP; Thu, 2 Jun 2016 02:34:04 -0700 (PDT) Date: Thu, 02 Jun 2016 09:34:00 -0000 Message-ID: Subject: sid semantic with derived-operands From: Aurelien Buhrig To: cgen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-q2/txt/msg00010.txt.bz2 Hi, I have an issue when generating the sid semantic of derived-operands. When printing C code for sid semantic, cgen tries to generate a hardware index (in /gen-hw-index) from a derived ifield, which is not supported by /gen-hw-index. I'm not sure if this is a valid case and if the subfields shall be parsed in /gen-hw-index to find the correct subfield (how?) or if it should be handled earlier... Any idea how to solve this issue ? Thanks, Aur=C3=A9lien Backtrace: In [..]/cgen/sid.scm: 860: 0 [error "/gen-hw-index: invalid index:" # " type: " ...] 844: 1 (case type ((scalar) "") ...) 841: 2 (let ((type #) (mode #) (value #)) (case type (# "") (# #) ...)) 1001: 3 [/gen-hw-index # #] 1001: 4* (if index (/gen-hw-index index estate) "") 996: 5 (let* (# # # ...) (logit 4 " cxmake-get self=3D" ...) ..= .) In unknown file: ?: 6 [# # # # ...] ... In [..]/cgen/rtl-c.scm: 450: 7 (cond (# #) (# #) (else #)) 446: 8 (begin (message "MODE=3D" mode ...) (if (symbol? src) (set! src #= )) ...) 418: 9 (cond ((c-expr? src) (cond # # ...)) ((rtx? src) (let* # # ...)) = ...) 416: 10 (let* ((mode mode)) (cond (# #) (# #) (# #) ...)) 441: 11 [/rtl-c-get # # #] 438: 12 (let* ((evald-src #)) (if (not #) (error assert-fail-msg #)) ...) 418: 13 (cond ((c-expr? src) (cond # # ...)) ((rtx? src) (let* # # ...)) = ...) 416: 14 (let* ((mode mode)) (cond (# #) (# #) (# #) ...)) 506: 15* [/rtl-c-get # # #] 506: 16 (let* ((result #)) (logit 4 (spaces #) "(rtl-c-get " ...) result) 503: 17 (let* (#) (if # #) (let* # # result)) 571: 18* [rtl-c-get # # #] 569: 19* [send #("object" 47 ...) gen-set-trace ... ... 569: 20 [cx:make #("object" 30 ...) ... ... 1672: 21 [rtl-c-set-trace #("object" 60 ...) UHI ...] 1671: 22 (if (estate-for-insn? *estate*) (rtl-c-set-trace *estate* mode ...) ...) In unknown file: ?: 23 [# # () UHI ...] In [..]/cgen/rtl-traverse.scm: 2160: 24 [apply # (# () UHI # ...)] 2159: 25 (if (procedure? fn) (apply fn (cons estate (cdr expr))) fn) 2158: 26 (if fn (if (procedure? fn) (apply fn (cons estate #)) fn) expr) 2156: 27 (let* ((rtx-obj #) (fn #)) (if fn (if # # fn) expr)) 2154: 28 (if (pair? expr) (let* ((rtx-obj #) (fn #)) (if fn (if # # ...) ...)) ...) In [..]/cgen/rtl-c.scm: 296: 29* [rtx-eval-with-estate (set () UHI ...) #("object" 30 ...) = ...] 296: 30* [rtl-c-get # # ... 296: 31 [cx:c ... 381: 32 [rtl-c-with-estate # # #] 379: 33 (let* ((estate #)) (rtl-c-with-estate estate mode expr)) In [...]/cgen/sid-cpu.scm: 716: 34 [rtl-c++-parsed #("object" 30 ...) (set () UHI ...) ...] 714: 35 [# (set () UHI ...)] 764: 36* [gen-semantic-code #("object" 53 ...)] 740: 37 [list "// ********** " move.w-pipd-rn-srcAnPiHI ... ... 738: 38 (let (# #) (string-list "// ********** " # ": " ...))