Menu

#238 Implementation of feature request 395

None
closed
None
5
2014-04-20
2014-04-09
Ben Shi
No

In c code

extern unsigned int ww();
extern unsigned int yy;
unsigned int ss(unsigned char a, unsigned char b)
{
return (ww() << a) + (yy << b);
}
unsigned int ssss(unsigned char a, unsigned char b)
{
return (ww() >> a) + (yy >> b);
}

the "ww() >> a" and "ww() >> a" parts are operated on stack as two 8-bit operands, while there are free 16-bit registers.

After applying this patch, they are operated in a free register as one entire 16-bit operand.

1 Attachments

Discussion

  • Ben Shi

    Ben Shi - 2014-04-09

    This patch is against r8982.

     
  • Philipp Klaus Krause

    • status: open --> closed
    • assigned_to: Philipp Klaus Krause
    • Group: -->
     
  • Philipp Klaus Krause

    Since we already had a quite sophisticated mechanism for the choice of the shift location (in the functions for the shifts by literal values), I refactored that one, and as of revision #9000, use it for all shifts.

    Philipp

     

Log in to post a comment.