APX ZU indication

Cui, Lili lili.cui@intel.com
Sun Apr 28 07:43:33 GMT 2024


> Lili,
> 
> before you or your colleagues even get to coding this up, I'd like to bring up
> this aspect, now that there is that "Assembly Syntax Recommendations" do
> as well (without, sadly, offering any way for providing feedback): For SETcc,
> embedding the indicator in the mnemonic (or alternatively as some kind of
> mnemonic extension, along the lines of {sae} or {nf}), simply expressing this
> via operands would seem more tidy / readable:
> 
> 	setnz	%eax
> 
> instead of, as that doc has it,
> 
> 	setunz	%al
> 

You meant setzunz, right?

> making clear at the first glance what register is updated. (Even if said doc
> wouldn't be updated, I'd like us to consider supporting such as an extension,
> right from the start.)
> 
> The situation is, admittedly, less clear for IMUL, as
> 
> 	imul	$3, %dx, %ecx
> 	imulw	$3, (%rdx), %ecx
> 
> aren't entirely unambiguous - they could also indicate multiplications storing
> the full 32-bit result in the destination.
> Hence I don't mean to extend the above suggestion to IMUL.
> 

Regarding how to express ZU of SETcc, we initially had a version similar to your suggestion, which is to change the size of reg to distinguish them, instead of the current distinction by adding suffix zu. The reason for the modification was to make the expression of ZU of SETcc and IMUL consistent. I think Binutils could support "setnz %eax", but gcc doesn't use it that way, this would make it seem a bit redundant.

Regards,
Lili.


More information about the Binutils mailing list