[PATCH][MSP430][2/4] Emulate 16-bit shifts with rotate insn when src operand is originally in memory
Jozef Lawrynowicz
jozef.l@mittosystems.com
Tue Jun 4 13:11:00 GMT 2019
This patch reduces code size by enabling the emulation of some 16-bit shift
instructions with the native rotate instructions, when the source operand is in
memory. This is achieved by forcing the source operand into a register.
For the following program, the below code size reduction is observed:
int a;
int
main (void)
{
a = a << 4;
return 0;
}
With shift patch 1:
text data bss dec hex filename
484 12 20 516 204 a.out
With new patch:
text data bss dec hex filename
452 12 20 484 1e4 a.out
Ok for trunk?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-MSP430-Force-the-src-operand-of-a-HImode-shift-into-.patch
Type: text/x-patch
Size: 4310 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190604/f5246e05/attachment.bin>
More information about the Gcc-patches
mailing list