From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by sourceware.org (Postfix) with ESMTPS id 138773861971 for ; Wed, 12 Aug 2020 19:44:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 138773861971 Received: by mail-qv1-xf35.google.com with SMTP id cs12so1611352qvb.2 for ; Wed, 12 Aug 2020 12:44:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DplavdLPJbLBZo8J5b8gaLlNmktHz6+wmZzzm+gqqaA=; b=jcrA2V1pjRsnQDR5drSX0QwXYdsmozhoIT2wo5pBh3HIlWZIXYx7/4xoGZzmIaDFCZ h7Qt1Gq3cWZYw4xi5h0T0TjLd3U9n3gmVJYVYwynWyXAk1fcT6gNwLG9CC6jSrg5Zj7t PJqJdxFzdlMHD+Lts4QnW/Y8M3KhXe2aFc5q7goD4bapi2IC1jxASa5wr0DnICoA6C5k 7+XI7uIUz3p/bNlT2ZALAPAHYkClhYPDiWjnGdy6O+185fcwFGhrAI+YOxJ0hQKwELtw iLWCDveJi1VD/XlbTa50kLsVSpEvMU3SpYo9AsZ3ZJiGc/8TTyZ1jq4mTpDUxwSo+Wf8 4JgA== X-Gm-Message-State: AOAM531A9HT7v7OxiUYSshXWf81VvqXK07qCUuR/fo6gGuA6jbvzeaXK 66tKXYd6UEfv3AIpg6Q8S47lZBX+6KEAN7M9eZkzD8MxEiA= X-Google-Smtp-Source: ABdhPJwdXoFCBPTCBezgNqA2UTXdWMUhyhMmQPi2fLEaDWyG2Xz9+cxh2+c67J4+ZPDio2CC2BYGvbQOqDBBJ5pqhJQ= X-Received: by 2002:ad4:4ea5:: with SMTP id ed5mr1244481qvb.130.1597261474672; Wed, 12 Aug 2020 12:44:34 -0700 (PDT) MIME-Version: 1.0 References: <87lfmgzoic.fsf@gnu.org> <20200811153823.GA20457@redhat.com> <20200811160847.GB20457@redhat.com> <20200812183611.GA27698@redhat.com> <87pn7v1yrt.fsf@oracle.com> <20200812192115.GB27698@redhat.com> <87eeob1x7n.fsf@oracle.com> In-Reply-To: <87eeob1x7n.fsf@oracle.com> From: Sergey Belyashov Date: Wed, 12 Aug 2020 22:44:22 +0300 Message-ID: Subject: Re: BUG: non-fixed-length ISAs are unsupported for now To: "Jose E. Marchesi" Cc: "Frank Ch. Eigler via Cgen" , "Frank Ch. Eigler" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cgen@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cgen mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2020 19:44:36 -0000 > > >> But Zilog eZ80 CPU has instructions up to 6 bytes long: like ld.il > bc,(Mmn) > >> (lil/sil prefix 0xed prefix ) . > > > > You don't have to include pure operands in those 6. Just the > > opcode-containing bytes that tell cgen-level instructions apart. > > Yeah, just make sure that every (f-FOO CST) expression in instruction > formats (+ ... ) are contained in the base-insn. > > Instruction operands can appear beyond the base insn without problems. Ok. How to handle variable size instructions then? For example: NOP - 0x00 NEG - 0xed 0x44 RLC B - 0xcb 0x00 LD HL, 0x1234 - 0x21 0x34 0x12 LD IY, 0x1234 - 0xfd 0x21 0x34 0x12 LD DE, (0x1234) - 0xed 0x5b 0x34 0x12 RR (IX+9) - 0xdd 0xcb 0x09 0x1e (here 0x09 is 8-bit signed immediate)