x86: Use `testb` for FSRM check in memmove-vec-unaligned-erms

`testb` saves a bit of code size is the imm-operand can be encoded
1-bytes.

Tested on x86-64.
This commit is contained in:
Noah Goldstein 2022-10-19 19:13:38 -07:00
parent f04f8373dd
commit 8775479804
1 changed files with 4 additions and 0 deletions

View File

@ -616,7 +616,11 @@ L(movsb):
jae L(large_memcpy_2x_check)
# if AVOID_SHORT_DISTANCE_REP_MOVSB || ALIGN_MOVSB
/* Only avoid short movsb if CPU has FSRM. */
# if X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB < 256
testb $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip)
# else
testl $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip)
# endif
jz L(skip_short_movsb_check)
# if AVOID_SHORT_DISTANCE_REP_MOVSB
/* Avoid "rep movsb" if RCX, the distance between source and