~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to src/linaro-a9/memset.S

  • Committer: Michael Hope
  • Date: 2011-09-01 01:58:30 UTC
  • Revision ID: michael.hope@linaro.org-20110901015830-p2i24bzpohhsj23x
Fix memset for when ch isn't a char. POSIX says that ch is cast to an unsigned char.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
  beq   5f
63
63
 
64
64
3:
 
65
  @ POSIX says that ch is cast to an unsigned char.  A uxtb is one
 
66
  @ byte and takes two cycles, where an AND is four bytes but one
 
67
  @ cycle...
 
68
  and   r1, #0xFF
65
69
  orr   r1, r1, r1, lsl#8  @ Same character into all bytes
66
70
  orr   r1, r1, r1, lsl#16
67
71
  mov   r5,r1