[PATCH][MSP430][4/4] Implement 64-bit shifts in assembly code

Jozef Lawrynowicz jozef.l@mittosystems.com
Tue Jun 4 13:17:00 GMT 2019


This patch implements 64-bit shifts in assembly code. Previously, generic C
library code from libgcc would be used to perform the shifts, which was much
more costly in terms of code size.

I observed 700 PASS->FAIL regressions from the GCC testsuite alone when these
64-bit shifts were implemented incorrectly, hence I've assumed there is
already adequate test coverage that shifts operate correctly, and I have not
added new tests to verify their correct execution.

For the following program, the below code size reduction is observed:
  long long a;

  int
  main (void)
  {
    a = a >> 4;
    return 0;
  }

With shift patch 3:
   text    data     bss     dec     hex filename
    670      12      26     708     2c4 a.out
With new patch:
   text    data     bss     dec     hex filename
    512      12      26     550     226 a.out

Ok for trunk?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-MSP430-Implement-64-bit-shifts-in-assembly-code.patch
Type: text/x-patch
Size: 9194 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190604/e545144b/attachment.bin>


More information about the Gcc-patches mailing list