In addition to different flags, if x is a constant, choosing one or the other can lead to shorter coding (rarely).
Add and subtract, both have the form op r/m32, imm8 , where the immediate operand is a byte, but this byte is extended. Thus, add edx, 128 will need to be encoded with dword immediately, but sub edx, -128 can be encoded with a character extension (saving 3 bytes).
harold
source share