aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lib
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2014-04-03 22:32:54 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-05-12 18:29:39 -0400
commit44ba138f55577431cd119840320e31e218d7dd5b (patch)
tree727d910ea56e0bdb4416b841bc764ce34619773a /arch/mips/lib
parent465ca5d6a06bfab861b65bb6b54dca170564326b (diff)
MIPS: csum_partial.S CPU_DADDI_WORKAROUNDS bug fix
This change reverts most of commit 60724ca59eda766a30be57aec6b49bc3e2bead91 [MIPS: IP checksums: Remove unncessary .set pseudos] that introduced warnings with the CPU_DADDI_WORKAROUNDS option set: arch/mips/lib/csum_partial.S: Assembler messages: arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:467: Warning: used $3 with ".set at=$3" [...] arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:577: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" arch/mips/lib/csum_partial.S:601: Warning: used $3 with ".set at=$3" [and so on, and so on...] The warnings are benign and good code is produced regardless because no macros that'd use the assembler's temporary register are involved, however the `.set noat' directives removed by the commit referred are crucial to guarantee this is still going to be the case after any changes in the future. Therefore they need to be brought back to place which this change does. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6686/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lib')
-rw-r--r--arch/mips/lib/csum_partial.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S
index 2e4825e48388..9901237563c5 100644
--- a/arch/mips/lib/csum_partial.S
+++ b/arch/mips/lib/csum_partial.S
@@ -56,14 +56,20 @@
56#define UNIT(unit) ((unit)*NBYTES) 56#define UNIT(unit) ((unit)*NBYTES)
57 57
58#define ADDC(sum,reg) \ 58#define ADDC(sum,reg) \
59 .set push; \
60 .set noat; \
59 ADD sum, reg; \ 61 ADD sum, reg; \
60 sltu v1, sum, reg; \ 62 sltu v1, sum, reg; \
61 ADD sum, v1; \ 63 ADD sum, v1; \
64 .set pop
62 65
63#define ADDC32(sum,reg) \ 66#define ADDC32(sum,reg) \
67 .set push; \
68 .set noat; \
64 addu sum, reg; \ 69 addu sum, reg; \
65 sltu v1, sum, reg; \ 70 sltu v1, sum, reg; \
66 addu sum, v1; \ 71 addu sum, v1; \
72 .set pop
67 73
68#define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ 74#define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \
69 LOAD _t0, (offset + UNIT(0))(src); \ 75 LOAD _t0, (offset + UNIT(0))(src); \
@@ -710,6 +716,8 @@ LEAF(csum_partial)
710 ADDC(sum, t2) 716 ADDC(sum, t2)
711.Ldone\@: 717.Ldone\@:
712 /* fold checksum */ 718 /* fold checksum */
719 .set push
720 .set noat
713#ifdef USE_DOUBLE 721#ifdef USE_DOUBLE
714 dsll32 v1, sum, 0 722 dsll32 v1, sum, 0
715 daddu sum, v1 723 daddu sum, v1
@@ -732,6 +740,7 @@ LEAF(csum_partial)
732 or sum, sum, t0 740 or sum, sum, t0
7331: 7411:
734#endif 742#endif
743 .set pop
735 .set reorder 744 .set reorder
736 ADDC32(sum, psum) 745 ADDC32(sum, psum)
737 jr ra 746 jr ra