From patchwork Thu Jan 31 21:08:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 157161 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp7691553jaa; Thu, 31 Jan 2019 13:11:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN53zHVxQ7Aj+qm0hbjAyCvyEbt6xe1R0klQOkDqqZ6LYx9kwMB6tqGVZvPGjasOwyV9s9Ci X-Received: by 2002:a81:6189:: with SMTP id v131mr35225609ywb.37.1548969087441; Thu, 31 Jan 2019 13:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548969087; cv=none; d=google.com; s=arc-20160816; b=ZW2poXHYAN+6bpxMGM3+jQoAwUnHwmrCVFYpQg/6P+c/RShFOxRjyBZDHV60JfRBCf 9iOCbTsF9sSl7jRmq3xcNv6hJq2RBjdgMHfOGwig2UMw1hOUBF1S4EpXPxqtHBlHOx0X B9hrq4ipn2ouUl/Y4QgmlcVvtnEIHIs8dA11qrP0hlglr+TsAtEQh37GoRYZfjsUdd/2 KYZ97GCASWnH079LqLCluGw6IhugBiPrImqepWTbfurNuKOv7G5qHR8AjGOk2HMO10N9 u5af297vVyYT8FemGYP7pnGnlZzmrU3/YtGIuhrZ/H+5AM2iPHPJJuIJsP81AjTjxYT0 B6Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :dkim-signature; bh=X2FQwRCWxk55XjKw3JCMFP912LoSTq+lz4tttGOyIhc=; b=UiLYBRBLCBFGvGS6BjWNOhY5jmNMRL/7vivwMCIM+8xnAGn5weNBl7CGRIPOrEa++c V8OdwUUH32DWryBUu61cWMQoajOAU8Ef/jvewe77wzru4XVhVSJDAqnlZ3z2oMhJ4aFS u4qysK/IUJ2DVdNOsAlM0rlhFbkS0nt00dI1LbojV9IsQeYAPo8c4MwXNhS9gArdycQx dRzY8g1edXqF5QXEMGe6th6TnhtXxqjsETCTXytBJEc8KRa30GbcEmCEYY30a2Xbr+A/ xtAEmUSAOvqo5u4nLbumUM9kW+t49Ecrpbq5KLo0N7iw8Tu47ml2jnaFqu41xazvOWc5 CtUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HRAJ1wG4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a4si3240045ybr.280.2019.01.31.13.11.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 31 Jan 2019 13:11:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HRAJ1wG4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:60909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpJcM-0002X5-TD for patch@linaro.org; Thu, 31 Jan 2019 16:11:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpJZz-0000jU-7S for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:09:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpJZx-0008C6-Mv for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:08:59 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:33521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpJZx-00087W-5Q for qemu-devel@nongnu.org; Thu, 31 Jan 2019 16:08:57 -0500 Received: by mail-pg1-x52d.google.com with SMTP id z11so1903264pgu.0 for ; Thu, 31 Jan 2019 13:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=X2FQwRCWxk55XjKw3JCMFP912LoSTq+lz4tttGOyIhc=; b=HRAJ1wG4Mqa44XfTCtSHmFzlL/VTw5fRpW5fgAJn7koYQZVkOiR9NSf0HwCrL/ZWl6 jzYH56WK/tfWv3wHyBriRjpbNJ07RNnTa4yQZuUgjUeG8y0jF8ATrIrR/LMvqGh/vqP5 mWz2wG8wlpyZ0P4Opx94vjvWbTLTp9ryrXpRo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X2FQwRCWxk55XjKw3JCMFP912LoSTq+lz4tttGOyIhc=; b=Gc642C/pRT+SbedK2e4uh3OIlEukBAdbu1exP66Wd3R869IzHTOMa0klSUjM/7d0xD Ybgx5U37yjTIeGfIKXckqQ8VgpkmaVDLJtfE/2bKZN683l2zlwhYxiFNhotKykaZWlGj uHtp7jCWSGrLxp+Pf2zLHOrMEwaKx3OXPfA650Oj5Dsr/SudK2Aer3kGBNeUojRZzrkf Sh/bWjux9ltGfFRpdDDcfgdHS+/7RHLykL+9NtpM8WYR+KTSTIbEv1DashzOBS+MqRly zymd6an2eq1+tC8ZdjOO+fhf5XXauPVW3z+db5TiIpBVv3lQ0VodoKH+CE7JFMjNsL0z 0oXQ== X-Gm-Message-State: AHQUAua90rY1BBmgHr+8J3XMWMivRIDHqsa5xlfTel6IkKy6fHMLVVQq dB/ZsdqDtZYc/ojAxiR0Qn1n7g9h17Y= X-Received: by 2002:a63:2a83:: with SMTP id q125mr676934pgq.98.1548968933770; Thu, 31 Jan 2019 13:08:53 -0800 (PST) Received: from cloudburst.twiddle.net (97-126-115-157.tukw.qwest.net. [97.126.115.157]) by smtp.gmail.com with ESMTPSA id z62sm11924391pfl.33.2019.01.31.13.08.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Jan 2019 13:08:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 31 Jan 2019 13:08:49 -0800 Message-Id: <20190131210851.9842-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52d Subject: [Qemu-devel] [PATCH 0/2] decodetree: Support for variable-length ISAs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ysato@users.sourceforge.jp Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" I'm not sure how much simplication could be had for "simple" variable-length ISAs like ARM thumb2 or RISC-V. But the recently posted RX port is more complicated than those. For me, what makes RX more difficult is that there is no easy test of the first N bits to determine the length of the insn. I put together a starting point for the RX decode. I'm sure there are a few mistakes, but it's close enough to see how the decoding might work. I have chosen to have this RX decoder only consider the "base" instruction, without the "extra" bits like the immediate associated with the LI field, or the memory displacement associated with the LD field. The new decode_load function reads the bytes of the insn with minimal decoding and no further validation of invalid insns; that is left for the main decode function. This is expecting a helper function that assembles the bytes. While I say I rule out Thumb2+RISC-V above, they are not implausible examples. These have uint16_t granularity, and I didn't want to assume the endianness of the granules. But for RX, with byte granularity, uint32_t decode_load_bytes(DisasContext *ctx, uint32_t insn, int i, int n) { while (++i <= n) { uint8_t b = cpu_ldub_code(ctx->env, ctx->base.pc_next++); insn |= b << (32 - i * 8); } return insn; } For the actual port submission, I would break up the translation into small bits. Just a few lines into the decode file and the associated functions within translate.c. r~ Richard Henderson (2): decodetree: Initial support for variable-length ISAs decodetree: Expand a decode_load function scripts/decodetree.py | 213 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 200 insertions(+), 13 deletions(-) --- &bcnd cd dsp &jdsp dsp &jreg rs &rr rd rs &ri rd imm &rrr rd rs rs2 &rri rd imm rs2 &rm rd rs ld mi &mi rs ld mi imm &mr rs ld mi rs2 ######## %b2_r_0 16:4 %b2_li_2 18:2 !function=li %b2_li_8 24:2 !function=li %b2_dsp5_3 23:4 19:1 @b2_rds .... .... .... rd:4 &rr rs=%b2_r_0 @b2_rds_li .... .... .... rd:4 &rri rs2=%b2_r_0 imm=%b2_li_8 @b2_rds_uimm4 .... .... imm:4 rd:4 &rri rs2=%b2_r_0 @b2_rds_imm5 .... ... imm:5 rd:4 &rri rs2=%b2_r_0 @b2_rd_rs_li .... .... rs2:4 rd:4 &rri imm=%b2_li_8 @b2_rd_ld_ub .... .. ld:2 rs:4 rd:4 &rm mi=4 @b2_ld_imm3 .... .. ld:2 rs:4 . imm:3 &mi mi=4 ######## %b3_r_0 8:4 %b3_li_10 18:2 !function=li %b3_dsp5_8 23:1 16:4 @b3_rd_rs .... .... .... .... rs:4 rd:4 &rr @b3_rd_li .... .... .... .... .... rd:4 \ &rri rs2=%b3_r_0 imm=%b3_li_10 @b3_rd_ld .... .... mi:2 .... ld:2 rs:4 rd:4 &rm @b3_rd_ld_ub .... .... .... .. ld:2 rs:4 rd:4 &rm mi=4 @b3_rd_ld_ul .... .... .... .. ld:2 rs:4 rd:4 &rm mi=2 @b3_rd_rs_rs2 .... .... .... rd:4 rs:4 rs2:4 &rrr @b3_ld_rs2 .... .... .... .. ld:2 rs:4 rs2:4 &mr @b3_rds_imm5 .... .... ....... imm:5 rd:4 &rri rs2=%b3_r_0 @b3_rd_rs_imm5 .... .... ... imm:5 rs2:4 rd:4 &rri ######## %b4_li_18 18:2 !function=li @b4_rd_ldmi .... .... mi:2 .... ld:2 .... .... rs:4 rd:4 &rm ######## ABS_rr 0111 1110 0010 .... @b2_rds ABS_rr 1111 1100 0000 1111 .... .... @b3_rd_rs ADC_ri 1111 1101 0111 ..00 0000 .... @b3_rd_li ADC_rr 1111 1100 0000 1011 .... .... @b3_rd_rs # Note only mi==2 allowed. ADC_rl 0000 0110 ..10 00.. 0000 0010 .... .... @b4_rd_ldmi ADD_rri 0110 0010 .... .... @b2_rds_uimm4 ADD_rri 0111 00.. .... .... @b2_rd_rs_li ADD_rl 0100 10.. .... .... @b2_rd_ld_ub ADD_rl 0000 0110 ..00 10.. .... .... @b3_rd_ld ADD_rrr 1111 1111 0010 .... .... .... @b3_rd_rs_rs2 AND_rri 0110 0100 .... .... @b2_rds_uimm4 AND_rri 0111 01.. 0010 .... @b2_rds_li AND_rl 0101 00.. .... .... @b2_rd_ld_ub AND_rl 0000 0110 ..01 00.. .... .... @b3_rd_ld AND_rrr 1111 1111 0100 .... .... .... @b3_rd_rs_rs2 BCLR_li 1111 00.. .... 1... @b2_ld_imm3 BCLR_ri 0111 101. .... .... @b2_rds_imm5 BCLR_lr 1111 1100 0110 01.. .... .... @b3_ld_rs2 mi=4 BCnd_s 0001 cd:1 dsp:3 &bcnd BCnd_b 0010 cd:4 dsp:8 &bcnd BCnd_w 0011 101 cd:1 dsp:16 &bcnd # Note that BNOT has cd = 15 BMCnd_BNOT_mi 1111 1100 111 imm:3 ld:2 rd:4 cd:4 BMCnd_BNOT_ri 1111 1101 111 imm:5 cd:4 rd:4 BNOT_lr 1111 1100 0110 11.. .... .... @b3_ld_rs2 mi=2 BRA_s 0000 1 dsp:3 &jdsp #BRA_b 0010 1110 dsp:8 # overlaps BCnd_b BRA_w 0011 1000 dsp:16 &jdsp BRA_a 0000 0100 dsp:24 &jdsp BRK 0000 0000 BSET_li 1111 00.. .... 0... @b2_ld_imm3 BSET_ri 0111 100. .... .... @b2_rds_imm5 BSET_lr 1111 1100 0110 00.. .... .... @b3_ld_rs2 mi=4 BSR_w 0011 1001 dsp:16 &jdsp BSR_a 0000 0101 dsp:24 &jdsp BTST_li 1111 01.. .... 0... @b2_ld_imm3 BTST_ri 0111 110. .... .... @b2_rds_imm5 BTST_lr 1111 1100 0110 10.. .... .... @b3_ld_rs2 mi=4 CLRPSW 0111 1111 1011 cb:4 CMP_ri 0110 0001 .... .... @b2_rds_uimm4 CMP_ri 0111 0101 0101 rs2:4 imm:8 &rri rd=0 CMP_ri 0111 01.. 0000 rs2:4 &rri imm=%b2_li_8 rd=0 CMP_rl 0100 01.. .... .... @b2_rd_ld_ub CMP_rl 0000 0110 ..00 01.. .... .... @b3_rd_ld DIV_rri 1111 1101 0111 ..00 1000 .... @b3_rd_li DIV_rl 1111 1100 0010 00.. .... .... @b3_rd_ld_ub DIV_rl 0000 0110 ..10 00.. 0000 1000 .... .... @b4_rd_ldmi DIVU_rri 1111 1101 0111 ..00 1001 .... @b3_rd_li DIVU_rl 1111 1100 0010 01.. .... .... @b3_rd_ld_ub DIVU_rl 0000 0110 ..10 00.. 0000 1001 .... .... @b4_rd_ldmi EMUL_rri 1111 1101 0111 ..00 0110 .... @b3_rd_li EMUL_rl 1111 1100 0001 10.. .... .... @b3_rd_ld_ub EMUL_rl 0000 0110 ..10 00.. 0000 0110 .... .... @b4_rd_ldmi EMULU_rri 1111 1101 0111 ..00 0111 .... @b3_rd_li EMULU_rl 1111 1100 0001 11.. .... .... @b3_rd_ld_ub EMULU_rl 0000 0110 ..10 00.. 0000 0111 .... .... @b4_rd_ldmi FADD_ri 1111 1101 0111 0010 0010 rd:4 FADD_rl 1111 1100 1000 10.. .... .... @b3_rd_ld_ul FCMP_ri 1111 1101 0111 0010 0001 rd:4 FCMP_rl 1111 1100 1000 01.. .... .... @b3_rd_ld_ul FDIV_ri 1111 1101 0111 0010 0100 rd:4 FDIV_rl 1111 1100 1001 00.. .... .... @b3_rd_ld_ul FMUL_ri 1111 1101 0111 0010 0011 rd:4 FMUL_rl 1111 1100 1000 11.. .... .... @b3_rd_ld_ul FSUB_ri 1111 1101 0111 0010 0000 rd:4 FSUB_rl 1111 1100 1000 00.. .... .... @b3_rd_ld_ul FTOI 1111 1100 1001 01.. .... .... @b3_rd_ld_ul INT 0111 0101 0110 0000 imm:8 ITOF 1111 1100 0100 01.. .... .... @b3_rd_ld_ub ITOF 0000 0110 ..10 00.. 0001 0001 .... .... @b4_rd_ldmi JMP 0111 1111 0000 rs:4 &jreg JSR 0111 1111 0001 rs:4 &jreg MACHI 1111 1101 0000 0100 rs:4 rs2:4 MACLO 1111 1101 0000 0101 rs:4 rs2:4 MAX_ri 1111 1101 0111 ..00 0100 .... @b3_rd_li MAX_rl 1111 1100 0001 00.. .... .... @b3_rd_ld_ub MAX_rl 0000 0110 ..10 00.. 0000 0100 .... .... @b4_rd_ldmi MIN_ri 1111 1101 0111 ..00 0101 .... @b3_rd_li MIN_rl 1111 1100 0001 01.. .... .... @b3_rd_ld_ub MIN_rl 0000 0110 ..10 00.. 0000 0101 .... .... @b4_rd_ldmi MOV_mr 1000 0 .... rd:3 . rs:3 dsp=%b2_dsp5_3 mi=4 MOV_mr 1001 0 .... rd:3 . rs:3 dsp=%b2_dsp5_3 mi=3 MOV_mr 1010 0 .... rd:3 . rs:3 dsp=%b2_dsp5_3 mi=2 MOV_rm 1000 1 .... rs:3 . rd:3 dsp=%b2_dsp5_3 mi=0 MOV_rm 1001 1 .... rs:3 . rd:3 dsp=%b2_dsp5_3 mi=1 MOV_rm 1010 1 .... rs:3 . rd:3 dsp=%b2_dsp5_3 mi=2 MOV_ri 0110 0110 imm:4 rd:4 MOV_mi 0011 1100 . rd:3 .... imm:8 sz=0 dsp=%b3_dsp5_8 MOV_mi 0011 1101 . rd:3 .... imm:s8 sz=1 dsp=%b3_dsp5_8 MOV_mi 0011 1110 . rd:3 .... imm:s8 sz=2 dsp=%b3_dsp5_8 MOV_ri 0111 0101 0100 rd:4 imm:8 MOV_ri 1111 1011 rd:4 .. 10 imm=%b2_li_2 MOV_mi 1111 1000 rd:4 .. sz:2 dsp=0 imm=%b2_li_2 MOV_mi 1111 1001 rd:4 .. sz:2 dsp:8 imm=%b3_li_10 MOV_mi 1111 1010 rd:4 .. sz:2 dsp:16 imm=%b4_li_18 MOV_ar 1111 1110 01 sz:2 ri:4 rb:4 rd:4 MOV_ra 1111 1110 00 sz:2 ri:4 rb:4 rs:4 # Note ldd=3 and lds=3 indicate register src or dst MOV_ll 1100 ldd:2 lds:2 rs:4 rd:4 sz=0 MOV_ll 1101 ldd:2 lds:2 rs:4 rd:4 sz=1 MOV_ll 1110 ldd:2 lds:2 rs:4 rd:4 sz=2 MOV_pr 1111 1101 0010 0 ad:1 sz:2 rd:4 rs:4 MOV_rp 1111 1101 0010 1 ad:1 sz:2 rs:4 rd:4 MOVU_rm 1011 sz:1 ... . rs:3 . rd:3 dsp=%b2_dsp5_3 MOVU_rl 0101 1 sz:1 ld:2 rs:4 rd:4 MOVU_ra 1111 1110 110 sz:1 ri:4 rb:4 rd:4 MOVU_rp 1111 1101 0011 1 ad:1 0 sz:1 rs:4 rd:4 MUL_ri 0110 0011 .... .... @b2_rds_uimm4 MUL_ri 0111 01.. 0001 .... @b2_rds_li MUL_rl 0100 11.. .... .... @b2_rd_ld_ub MUL_rl 0000 0110 ..00 11.. .... .... @b3_rd_ld MUL_rrr 1111 1111 0011 .... .... .... @b3_rd_rs_rs2 MULHI 1111 1101 0000 0000 rs:4 rs2:4 MULLO 1111 1101 0000 0001 rs:4 rs2:4 MVFACHI 1111 1101 0001 1111 0000 rd:4 MVFACMI 1111 1101 0001 1111 0010 rd:4 MVFC 1111 1101 0110 1010 cr:4 rd:4 MVTACHI 1111 1101 0001 0111 0000 rs:4 MVTACLO 1111 1101 0001 0111 0001 rs:4 MVTC_i 1111 1101 0111 ..11 0000 cr:4 imm=%b3_li_10 MVTC_r 1111 1101 0110 1000 rs:4 cr:4 NEG_rr 0111 1110 0001 .... @b2_rds NEG_rr 1111 1100 0000 0111 .... .... @b3_rd_rs NOP 0000 0011 NOT_rr 0111 1110 0000 .... @b2_rds NOT_rr 1111 1100 0011 1011 .... .... @b3_rd_rs OR_rri 0110 0101 .... .... @b2_rds_uimm4 OR_rri 0111 01.. 0011 .... @b2_rds_li OR_rl 0101 01.. .... .... @b2_rd_ld_ub OR_rl 0000 0110 .. 0101 .. .... .... @b3_rd_ld OR_rrr 1111 1111 0101 .... .... .... @b3_rd_rs_rs2 POP 0111 1110 1011 rd:4 POPC 0111 1110 1110 cr:4 POPM 0110 1111 rd:4 rd2:4 PUSH_r 0111 1110 1000 rs:4 sz=0 PUSH_r 0111 1110 1001 rs:4 sz=1 PUSH_r 0111 1110 1010 rs:4 sz=2 PUSH_m 1111 01 ld:2 rs:4 10 sz:2 PUSHC 0111 1110 1100 cr:4 PUSHM 0110 1110 rs:4 rs2:4 RACW 1111 1101 0001 1000 000 imm:1 0000 REVL 1111 1101 0110 0111 rs:4 rd:4 REVW 1111 1101 0110 0101 rs:4 rd:4 # Note that sz=3 overlaps SMOVF RMPA 0111 1111 1000 1100 sz=0 RMPA 0111 1111 1000 1101 sz=1 RMPA 0111 1111 1000 1110 sz=2 ROLC 0111 1110 0101 .... @b2_rds RORC 0111 1110 0100 .... @b2_rds ROTL_ri 1111 1101 0110 111. .... .... @b3_rds_imm5 ROTL_rr 1111 1101 0110 0110 .... .... @b3_rd_rs ROTR_ri 1111 1101 0110 110. .... .... @b3_rds_imm5 ROTR_rr 1111 1101 0110 0100 .... .... @b3_rd_rs ROUND 1111 1100 1001 10 ld:2 rs:4 rd:4 RTE 0111 1111 1001 0101 RTFI 0111 1111 1001 0100 RTS 0000 0010 RTSD_i 0110 0111 imm:8 RTSD_irr 0011 1111 rd:4 rd2:4 imm:8 SAT 0111 1110 0011 .... @b2_rds SATR 0111 1111 1001 0011 SBB_rr 1111 1100 0000 0011 .... .... @b3_rd_rs # Note only mi==2 allowed. SBB_rl 0000 0110 ..10 00.. 0000 0000 .... .... @b4_rd_ldmi SCCnd 1111 1100 1101 sz:2 ld:2 rd:4 cd:4 SCMPU 0111 1111 1000 0011 SETPSW 0111 1111 1010 cb:4 SHAR_rri 0110 101. .... .... @b2_rds_imm5 SHAR_rri 1111 1101 101. .... .... .... @b3_rd_rs_imm5 SHAR_rr 1111 1101 0110 0001 .... .... @b3_rd_rs SHLL_rri 0110 110. .... .... @b2_rds_imm5 SHLL_rri 1111 1101 110. .... .... .... @b3_rd_rs_imm5 SHLL_rr 1111 1101 0110 0010 .... .... @b3_rd_rs SHLR_rri 0110 100. .... .... @b2_rds_imm5 SHLR_rri 1111 1101 100. .... .... .... @b3_rd_rs_imm5 SHLR_rr 1111 1101 0110 0000 .... .... @b3_rd_rs SMOVB 0111 1111 1000 1011 SMOVF 0111 1111 1000 1111 SMOVU 0111 1111 1000 0111 # Note that sz=3 overlaps SMOVB SSTR 0111 1111 1000 1000 sz=0 SSTR 0111 1111 1000 1001 sz=1 SSTR 0111 1111 1000 1010 sz=2 STNZ 1111 1101 0111 ..00 1111 .... @b3_rd_li STZ 1111 1101 0111 ..00 1110 .... @b3_rd_li SUB_rri 0110 0000 .... .... @b2_rds_uimm4 SUB_rl 0100 00.. .... .... @b2_rd_ld_ub SUB_rl 0000 0110 ..00 00.. .... .... @b3_rd_ld SUB_rrr 1111 1111 0000 .... .... .... @b3_rd_rs_rs2 # Note that sz=3 overlaps SCMPU SUNTIL 0111 1111 1000 0000 sz=0 SUNTIL 0111 1111 1000 0001 sz=1 SUNTIL 0111 1111 1000 0010 sz=2 # Note that sz=3 overlaps SMOVU SWHILE 0111 1111 1000 0100 sz=0 SWHILE 0111 1111 1000 0101 sz=1 SWHILE 0111 1111 1000 0110 sz=2 TST_ri 1111 1101 0111 ..00 1100 .... @b3_rd_li WAIT 0111 1111 1001 0110 XCHG_rl 1111 1100 0100 00.. .... .... @b3_rd_ld_ub XCHG_rl 0000 0110 ..10 00.. 0001 0000 .... .... @b4_rd_ldmi XOR_rri 1111 1101 0111 ..00 1101 .... @b3_rd_li XOR_rl 1111 1100 0011 01.. .... .... @b3_rd_ld_ub XOR_rl 0000 0110 ..10 00.. 0000 1101 .... .... @b4_rd_ldmi