On 11.04.19 08:46, Richard Henderson wrote:
> Looks ok, I guess, although the introduction of tci_write_reg16 seems 
> redundant
> with the uint16_t value that is loaded.

It could directly call tci_write_reg, but the new code is similar to the
existing code which also uses the same kind of indirection.

The resulting binary code should be the same, as all those small
functions can be inlined by an optimizing compiler.

> Why not use tci_write_reg64, since that is the size of the register you're
> modifying?  Let the zero-extension explicit in the name of the opcode to be
> reflected in the zero-extension implied by the passing of a uint16_t value to 
> a
> uint64_t argument.

I think that using tci_write_reg64 would be wrong on 32 bit hosts.

Regards
Stefan




Reply via email to