diff options
| author | David S. Miller <davem@sunset.davemloft.net> | 2007-10-02 19:17:17 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-02 19:17:17 -0400 |
| commit | a4aa2e867c5d696c0f249ad8d63d0d983b4ffaf9 (patch) | |
| tree | c9e89ccf9cb6ae2e054b9dfad5d2f295edaf8541 | |
| parent | f778089cb2445dfc6dfd30a7a567925fd8589f1e (diff) | |
[SPARC64]: Don't use in/local regs for ldx/stx data in N1 memcpy.
It doesn't matter for use in 64-bit objects, but when used in
32-bit environments the top 32-bits of the local and in
registers will get chopped off on the next register window
spill/restore which leads to difficult to track down and
subtle bugs.
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | arch/sparc64/lib/NGmemcpy.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/lib/NGmemcpy.S b/arch/sparc64/lib/NGmemcpy.S index 605cb3f09900..96a14caf6966 100644 --- a/arch/sparc64/lib/NGmemcpy.S +++ b/arch/sparc64/lib/NGmemcpy.S | |||
| @@ -321,11 +321,11 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */ | |||
| 321 | andn %i2, 0xf, %i4 | 321 | andn %i2, 0xf, %i4 |
| 322 | and %i2, 0xf, %i2 | 322 | and %i2, 0xf, %i2 |
| 323 | 1: subcc %i4, 0x10, %i4 | 323 | 1: subcc %i4, 0x10, %i4 |
| 324 | EX_LD(LOAD(ldx, %i1, %i5)) | 324 | EX_LD(LOAD(ldx, %i1, %o4)) |
| 325 | add %i1, 0x08, %i1 | 325 | add %i1, 0x08, %i1 |
| 326 | EX_LD(LOAD(ldx, %i1, %g1)) | 326 | EX_LD(LOAD(ldx, %i1, %g1)) |
| 327 | sub %i1, 0x08, %i1 | 327 | sub %i1, 0x08, %i1 |
| 328 | EX_ST(STORE(stx, %i5, %i1 + %i3)) | 328 | EX_ST(STORE(stx, %o4, %i1 + %i3)) |
| 329 | add %i1, 0x8, %i1 | 329 | add %i1, 0x8, %i1 |
| 330 | EX_ST(STORE(stx, %g1, %i1 + %i3)) | 330 | EX_ST(STORE(stx, %g1, %i1 + %i3)) |
| 331 | bgu,pt %XCC, 1b | 331 | bgu,pt %XCC, 1b |
| @@ -334,8 +334,8 @@ FUNC_NAME: /* %i0=dst, %i1=src, %i2=len */ | |||
| 334 | be,pt %XCC, 1f | 334 | be,pt %XCC, 1f |
| 335 | nop | 335 | nop |
| 336 | sub %i2, 0x8, %i2 | 336 | sub %i2, 0x8, %i2 |
| 337 | EX_LD(LOAD(ldx, %i1, %i5)) | 337 | EX_LD(LOAD(ldx, %i1, %o4)) |
| 338 | EX_ST(STORE(stx, %i5, %i1 + %i3)) | 338 | EX_ST(STORE(stx, %o4, %i1 + %i3)) |
| 339 | add %i1, 0x8, %i1 | 339 | add %i1, 0x8, %i1 |
| 340 | 1: andcc %i2, 0x4, %g0 | 340 | 1: andcc %i2, 0x4, %g0 |
| 341 | be,pt %XCC, 1f | 341 | be,pt %XCC, 1f |
