On 7/2/24 7:16 PM, Li, Pan2 wrote:
Thanks Jeff for comments.

Why are you using Pmode?  Pmode is for pointers.  This stuff looks like
basic integer ops, so I don't see why Pmode is appropriate.

The incoming operand may be HI/QI/SImode, so we need to prompt the mode.
So there we should take Xmode? Will update in v2.
I would expect that QI/HI shouldn't be happening in practice due to the definition of WORD_REGISTER_OPERATIONS.

For rv32 I would expect to just see SI. For rv64 we're likely to see both SI and DI and I would expect that you can just use GET_MODE (src) to get that input mode -- unless the input is a constant.

Note that since you're ultimately generating an IOR, if you've got an SI input on rv64, then you're going to need to either extend the input or wrap it in a suitable widening subreg.

If we allow constants, then we probably need further adjustments.


Jeff

Reply via email to