Hi Iain

Iain Sandoe <idsan...@googlemail.com> wrote:
>Richard Sandiford <richard.sandif...@arm.com> wrote:
>> "Qian, Jianhua" <qia...@cn.fujitsu.com> writes:
>>> Hi Richard
>>> 
>>> I found that some instructions are using '#' before immediate value,
>>> and others are not. For example
>>> (define_insn "insv_imm<mode>"
>>>  [(set (zero_extract:GPI (match_operand:GPI 0 "register_operand" "+r")
>>> 
>>> 
>>> (match_operand:GPI 2 "const_int_operand" "n"))]  "UINTVAL 
>>> (operands[1]) < GET_MODE_BITSIZE (<MODE>mode)
>>>   && UINTVAL (operands[1]) % 16 == 0"
>>>  "movk\\t%<w>0, %X2, lsl %1"
>>>  [(set_attr "type" "mov_imm")]
>>> )
>>> 
>>> Are there any standards for this?
>> 
>> No, it's unfortunately inconsistent.  FWIW, if we were going to change 
>> this, personally I've a slight preference for having the “#”.
>
>Absence of the # makes assemblers based on the LLVM backend reject GCC’s 
>output, as such I’ve got a strong preference for adding it (I’ve got some 
>local patches for this already).
>e.g.
>https://github.com/iains/gcc-darwin-arm64/commit/526ffb6b34ddb848853016cd14a438683aa0e6de

That's good, we are of the same mind..

Regards
Qian



Reply via email to