https://bugs.kde.org/show_bug.cgi?id=520383
Bug ID: 520383
Summary: VEX/amd64: shorten Imm64 encoding when value fits in
32 bits
Classification: Developer tools
Product: valgrind
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: vex
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 192443
--> https://bugs.kde.org/attachment.cgi?id=192443&action=edit
shorten Imm64 encoding when value fits in 32 bits
emit_AMD64Instr's Ain_Imm64 case previously emitted the 10-byte
movabsq form for any value above 0xFFFFF, with a comment noting the
cap was set "for verifiability purposes" rather than for any encoding
reason.
Use the 5-byte 'mov r32, imm32' (b8 +r id) zero-extending form for
the full unsigned 32-bit range, and the 7-byte 'mov r/m64, imm32'
(REX.W c7 /0 id) sign-extending form for negatives that fit in
signed 32 bits (via the existing fitsIn32Bits helper). Fall back to
the 10-byte movabsq only when neither shorter form is legal.
On valgrind --tool=none /bin/ls /tmp this shrinks emitted host code
by 1.2% (8096 bytes across 3593 translated blocks).
--
You are receiving this mail because:
You are watching all bug changes.