зеркало из https://github.com/mozilla/gecko-dev.git
Bug 740187 - [Skia] Prevent the ARM implementation of memset16 from failing if count=0 r=mattwoodrow
This commit is contained in:
Родитель
33073664dc
Коммит
456cde227d
|
@ -32,6 +32,14 @@ arm_memset16:
|
|||
.fnstart
|
||||
push {lr}
|
||||
|
||||
/* if count is equal to zero then abort */
|
||||
teq r2, #0
|
||||
beq .Lfinish
|
||||
|
||||
/* Multiply count by 2 - go from the number of 16-bit shorts
|
||||
* to the number of bytes desired. */
|
||||
mov r2, r2, lsl #1
|
||||
|
||||
/* expand the data to 32 bits */
|
||||
orr r1, r1, lsl #16
|
||||
|
||||
|
@ -40,10 +48,6 @@ arm_memset16:
|
|||
strneh r1, [r0], #2
|
||||
subne r2, r2, #2
|
||||
|
||||
/* Multiply count by 2 - go from the number of 16-bit shorts
|
||||
* to the number of bytes desired. */
|
||||
mov r2, r2, lsl #1
|
||||
|
||||
/* Now jump into the main loop below. */
|
||||
b .Lwork_32
|
||||
.fnend
|
||||
|
@ -52,6 +56,10 @@ arm_memset32:
|
|||
.fnstart
|
||||
push {lr}
|
||||
|
||||
/* if count is equal to zero then abort */
|
||||
teq r2, #0
|
||||
beq .Lfinish
|
||||
|
||||
/* Multiply count by 4 - go from the number of 32-bit words to
|
||||
* the number of bytes desired. */
|
||||
mov r2, r2, lsl #2
|
||||
|
@ -97,5 +105,6 @@ arm_memset32:
|
|||
strcs r1, [r0], #4
|
||||
strmih lr, [r0], #2
|
||||
|
||||
.Lfinish:
|
||||
pop {pc}
|
||||
.fnend
|
||||
|
|
Загрузка…
Ссылка в новой задаче