Hi everyone,

I have a small question with assembler size optimisation that maybe one of you guys can give me a second opinion on:

If you are using the "test" instruction to test some of the lower bits of an instruction, e.g. TEST RCX, $2, is there a penalty with calling TEST CL, $2 instead? The instruction size is a lot smaller on account of the immediate only being 1 byte long instead of 4 bytes, and are mathematically equivalent.  I know you have to be careful with partial write penalties, but partial reads seem to be a bit more nebulous (the register is not modified with TEST).

Gareth aka. Kit


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to