<div dir="ltr"><div>This patch teaches the AsmParser to accept some logical+immediate instructions and convert them as shown:</div><div>    </div><div>      bic  Rd, Rn, #imm  ->  and Rd, Rn, #~imm</div><div>      bics Rd, Rn, #imm  ->  ands Rd, Rn, #~imm</div>
<div>      orn  Rd, Rn, #imm  ->  orr Rd, Rn, #~imm</div><div>      eon  Rd, Rn, #imm  ->  eor Rd, Rn, #~imm</div><div>    </div><div>Those instructions are an alternate syntax available to assembly coders, and are needed in order to support code already compiling with some other assemblers. For example, the bic construct is used by the linux kernel.</div>
<div><br></div><div>Those pseudos are just syntactic sugar, and this leads to a question about diagnostics. Which diagnostic should be emitted when the asmparser fails to match an instruction or a pseudo ? For example, with this patch, the closest match for the assembler is the pseudo in one of the basic-a64-diagnostics tests, which leads to a weird diagnostic. Would there be a non convoluted way to disambiguate this, or give a lower priority to pseudos ?</div>
<div><br></div><div>Apart from this point, does this patch looks reasonable ?</div><div><br></div><div>Cheers,</div><div>--</div><div>Arnaud A. de Grandmaison</div><div><br></div></div>