diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2008-05-15 10:53:57 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2008-05-15 11:03:43 -0400 |
commit | 872f6debcae63309eb39bfc2cc9462fb83450ee0 (patch) | |
tree | 7a1bb365c00e791b8e3d8e848b6f0e97e9b3ab69 /arch/parisc/kernel/pacache.S | |
parent | f54d8a1b3fef79bb1aa2f0840dd356ce7bb180f9 (diff) |
parisc: use conditional macro for 64-bit wide ops
This work enables us to remove -traditional from $AFLAGS on
parisc.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc/kernel/pacache.S')
-rw-r--r-- | arch/parisc/kernel/pacache.S | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 7e4a33978907..e3246a5ca74f 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -86,7 +86,7 @@ ENTRY(flush_tlb_all_local) | |||
86 | LDREG ITLB_OFF_COUNT(%r1), %arg2 | 86 | LDREG ITLB_OFF_COUNT(%r1), %arg2 |
87 | LDREG ITLB_LOOP(%r1), %arg3 | 87 | LDREG ITLB_LOOP(%r1), %arg3 |
88 | 88 | ||
89 | ADDIB= -1, %arg3, fitoneloop /* Preadjust and test */ | 89 | addib,COND(=) -1, %arg3, fitoneloop /* Preadjust and test */ |
90 | movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ | 90 | movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ |
91 | copy %arg0, %r28 /* Init base addr */ | 91 | copy %arg0, %r28 /* Init base addr */ |
92 | 92 | ||
@@ -96,14 +96,14 @@ fitmanyloop: /* Loop if LOOP >= 2 */ | |||
96 | copy %arg2, %r29 /* Init middle loop count */ | 96 | copy %arg2, %r29 /* Init middle loop count */ |
97 | 97 | ||
98 | fitmanymiddle: /* Loop if LOOP >= 2 */ | 98 | fitmanymiddle: /* Loop if LOOP >= 2 */ |
99 | ADDIB> -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ | 99 | addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ |
100 | pitlbe 0(%sr1, %r28) | 100 | pitlbe 0(%sr1, %r28) |
101 | pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ | 101 | pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ |
102 | ADDIB> -1, %r29, fitmanymiddle /* Middle loop decr */ | 102 | addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */ |
103 | copy %arg3, %r31 /* Re-init inner loop count */ | 103 | copy %arg3, %r31 /* Re-init inner loop count */ |
104 | 104 | ||
105 | movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ | 105 | movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ |
106 | ADDIB<=,n -1, %r22, fitdone /* Outer loop count decr */ | 106 | addib,COND(<=),n -1, %r22, fitdone /* Outer loop count decr */ |
107 | 107 | ||
108 | fitoneloop: /* Loop if LOOP = 1 */ | 108 | fitoneloop: /* Loop if LOOP = 1 */ |
109 | mtsp %r20, %sr1 | 109 | mtsp %r20, %sr1 |
@@ -111,10 +111,10 @@ fitoneloop: /* Loop if LOOP = 1 */ | |||
111 | copy %arg2, %r29 /* init middle loop count */ | 111 | copy %arg2, %r29 /* init middle loop count */ |
112 | 112 | ||
113 | fitonemiddle: /* Loop if LOOP = 1 */ | 113 | fitonemiddle: /* Loop if LOOP = 1 */ |
114 | ADDIB> -1, %r29, fitonemiddle /* Middle loop count decr */ | 114 | addib,COND(>) -1, %r29, fitonemiddle /* Middle loop count decr */ |
115 | pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ | 115 | pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ |
116 | 116 | ||
117 | ADDIB> -1, %r22, fitoneloop /* Outer loop count decr */ | 117 | addib,COND(>) -1, %r22, fitoneloop /* Outer loop count decr */ |
118 | add %r21, %r20, %r20 /* increment space */ | 118 | add %r21, %r20, %r20 /* increment space */ |
119 | 119 | ||
120 | fitdone: | 120 | fitdone: |
@@ -129,7 +129,7 @@ fitdone: | |||
129 | LDREG DTLB_OFF_COUNT(%r1), %arg2 | 129 | LDREG DTLB_OFF_COUNT(%r1), %arg2 |
130 | LDREG DTLB_LOOP(%r1), %arg3 | 130 | LDREG DTLB_LOOP(%r1), %arg3 |
131 | 131 | ||
132 | ADDIB= -1, %arg3, fdtoneloop /* Preadjust and test */ | 132 | addib,COND(=) -1, %arg3, fdtoneloop /* Preadjust and test */ |
133 | movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ | 133 | movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ |
134 | copy %arg0, %r28 /* Init base addr */ | 134 | copy %arg0, %r28 /* Init base addr */ |
135 | 135 | ||
@@ -139,14 +139,14 @@ fdtmanyloop: /* Loop if LOOP >= 2 */ | |||
139 | copy %arg2, %r29 /* Init middle loop count */ | 139 | copy %arg2, %r29 /* Init middle loop count */ |
140 | 140 | ||
141 | fdtmanymiddle: /* Loop if LOOP >= 2 */ | 141 | fdtmanymiddle: /* Loop if LOOP >= 2 */ |
142 | ADDIB> -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ | 142 | addib,COND(>) -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ |
143 | pdtlbe 0(%sr1, %r28) | 143 | pdtlbe 0(%sr1, %r28) |
144 | pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ | 144 | pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ |
145 | ADDIB> -1, %r29, fdtmanymiddle /* Middle loop decr */ | 145 | addib,COND(>) -1, %r29, fdtmanymiddle /* Middle loop decr */ |
146 | copy %arg3, %r31 /* Re-init inner loop count */ | 146 | copy %arg3, %r31 /* Re-init inner loop count */ |
147 | 147 | ||
148 | movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ | 148 | movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ |
149 | ADDIB<=,n -1, %r22,fdtdone /* Outer loop count decr */ | 149 | addib,COND(<=),n -1, %r22,fdtdone /* Outer loop count decr */ |
150 | 150 | ||
151 | fdtoneloop: /* Loop if LOOP = 1 */ | 151 | fdtoneloop: /* Loop if LOOP = 1 */ |
152 | mtsp %r20, %sr1 | 152 | mtsp %r20, %sr1 |
@@ -154,10 +154,10 @@ fdtoneloop: /* Loop if LOOP = 1 */ | |||
154 | copy %arg2, %r29 /* init middle loop count */ | 154 | copy %arg2, %r29 /* init middle loop count */ |
155 | 155 | ||
156 | fdtonemiddle: /* Loop if LOOP = 1 */ | 156 | fdtonemiddle: /* Loop if LOOP = 1 */ |
157 | ADDIB> -1, %r29, fdtonemiddle /* Middle loop count decr */ | 157 | addib,COND(>) -1, %r29, fdtonemiddle /* Middle loop count decr */ |
158 | pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ | 158 | pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ |
159 | 159 | ||
160 | ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ | 160 | addib,COND(>) -1, %r22, fdtoneloop /* Outer loop count decr */ |
161 | add %r21, %r20, %r20 /* increment space */ | 161 | add %r21, %r20, %r20 /* increment space */ |
162 | 162 | ||
163 | 163 | ||
@@ -210,18 +210,18 @@ ENTRY(flush_instruction_cache_local) | |||
210 | LDREG ICACHE_COUNT(%r1), %arg2 | 210 | LDREG ICACHE_COUNT(%r1), %arg2 |
211 | LDREG ICACHE_LOOP(%r1), %arg3 | 211 | LDREG ICACHE_LOOP(%r1), %arg3 |
212 | rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ | 212 | rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ |
213 | ADDIB= -1, %arg3, fioneloop /* Preadjust and test */ | 213 | addib,COND(=) -1, %arg3, fioneloop /* Preadjust and test */ |
214 | movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ | 214 | movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ |
215 | 215 | ||
216 | fimanyloop: /* Loop if LOOP >= 2 */ | 216 | fimanyloop: /* Loop if LOOP >= 2 */ |
217 | ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ | 217 | addib,COND(>) -1, %r31, fimanyloop /* Adjusted inner loop decr */ |
218 | fice %r0(%sr1, %arg0) | 218 | fice %r0(%sr1, %arg0) |
219 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ | 219 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ |
220 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ | 220 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ |
221 | ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ | 221 | addib,COND(<=),n -1, %arg2, fisync /* Outer loop decr */ |
222 | 222 | ||
223 | fioneloop: /* Loop if LOOP = 1 */ | 223 | fioneloop: /* Loop if LOOP = 1 */ |
224 | ADDIB> -1, %arg2, fioneloop /* Outer loop count decr */ | 224 | addib,COND(>) -1, %arg2, fioneloop /* Outer loop count decr */ |
225 | fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ | 225 | fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ |
226 | 226 | ||
227 | fisync: | 227 | fisync: |
@@ -251,18 +251,18 @@ ENTRY(flush_data_cache_local) | |||
251 | LDREG DCACHE_COUNT(%r1), %arg2 | 251 | LDREG DCACHE_COUNT(%r1), %arg2 |
252 | LDREG DCACHE_LOOP(%r1), %arg3 | 252 | LDREG DCACHE_LOOP(%r1), %arg3 |
253 | rsm PSW_SM_I, %r22 | 253 | rsm PSW_SM_I, %r22 |
254 | ADDIB= -1, %arg3, fdoneloop /* Preadjust and test */ | 254 | addib,COND(=) -1, %arg3, fdoneloop /* Preadjust and test */ |
255 | movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ | 255 | movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ |
256 | 256 | ||
257 | fdmanyloop: /* Loop if LOOP >= 2 */ | 257 | fdmanyloop: /* Loop if LOOP >= 2 */ |
258 | ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ | 258 | addib,COND(>) -1, %r31, fdmanyloop /* Adjusted inner loop decr */ |
259 | fdce %r0(%sr1, %arg0) | 259 | fdce %r0(%sr1, %arg0) |
260 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ | 260 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ |
261 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ | 261 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ |
262 | ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ | 262 | addib,COND(<=),n -1, %arg2, fdsync /* Outer loop decr */ |
263 | 263 | ||
264 | fdoneloop: /* Loop if LOOP = 1 */ | 264 | fdoneloop: /* Loop if LOOP = 1 */ |
265 | ADDIB> -1, %arg2, fdoneloop /* Outer loop count decr */ | 265 | addib,COND(>) -1, %arg2, fdoneloop /* Outer loop count decr */ |
266 | fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ | 266 | fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ |
267 | 267 | ||
268 | fdsync: | 268 | fdsync: |
@@ -343,7 +343,7 @@ ENTRY(copy_user_page_asm) | |||
343 | * non-taken backward branch. Note that .+4 is a backwards branch. | 343 | * non-taken backward branch. Note that .+4 is a backwards branch. |
344 | * The ldd should only get executed if the branch is taken. | 344 | * The ldd should only get executed if the branch is taken. |
345 | */ | 345 | */ |
346 | ADDIB>,n -1, %r1, 1b /* bundle 10 */ | 346 | addib,COND(>),n -1, %r1, 1b /* bundle 10 */ |
347 | ldd 0(%r25), %r19 /* start next loads */ | 347 | ldd 0(%r25), %r19 /* start next loads */ |
348 | 348 | ||
349 | #else | 349 | #else |
@@ -392,7 +392,7 @@ ENTRY(copy_user_page_asm) | |||
392 | stw %r21, 56(%r26) | 392 | stw %r21, 56(%r26) |
393 | stw %r22, 60(%r26) | 393 | stw %r22, 60(%r26) |
394 | ldo 64(%r26), %r26 | 394 | ldo 64(%r26), %r26 |
395 | ADDIB>,n -1, %r1, 1b | 395 | addib,COND(>),n -1, %r1, 1b |
396 | ldw 0(%r25), %r19 | 396 | ldw 0(%r25), %r19 |
397 | #endif | 397 | #endif |
398 | bv %r0(%r2) | 398 | bv %r0(%r2) |
@@ -516,7 +516,7 @@ ENTRY(copy_user_page_asm) | |||
516 | stw %r21, 56(%r28) | 516 | stw %r21, 56(%r28) |
517 | stw %r22, 60(%r28) | 517 | stw %r22, 60(%r28) |
518 | ldo 64(%r28), %r28 | 518 | ldo 64(%r28), %r28 |
519 | ADDIB> -1, %r1,1b | 519 | addib,COND(>) -1, %r1,1b |
520 | ldo 64(%r29), %r29 | 520 | ldo 64(%r29), %r29 |
521 | 521 | ||
522 | bv %r0(%r2) | 522 | bv %r0(%r2) |
@@ -575,7 +575,7 @@ ENTRY(__clear_user_page_asm) | |||
575 | std %r0, 104(%r28) | 575 | std %r0, 104(%r28) |
576 | std %r0, 112(%r28) | 576 | std %r0, 112(%r28) |
577 | std %r0, 120(%r28) | 577 | std %r0, 120(%r28) |
578 | ADDIB> -1, %r1, 1b | 578 | addib,COND(>) -1, %r1, 1b |
579 | ldo 128(%r28), %r28 | 579 | ldo 128(%r28), %r28 |
580 | 580 | ||
581 | #else /* ! CONFIG_64BIT */ | 581 | #else /* ! CONFIG_64BIT */ |
@@ -598,7 +598,7 @@ ENTRY(__clear_user_page_asm) | |||
598 | stw %r0, 52(%r28) | 598 | stw %r0, 52(%r28) |
599 | stw %r0, 56(%r28) | 599 | stw %r0, 56(%r28) |
600 | stw %r0, 60(%r28) | 600 | stw %r0, 60(%r28) |
601 | ADDIB> -1, %r1, 1b | 601 | addib,COND(>) -1, %r1, 1b |
602 | ldo 64(%r28), %r28 | 602 | ldo 64(%r28), %r28 |
603 | #endif /* CONFIG_64BIT */ | 603 | #endif /* CONFIG_64BIT */ |
604 | 604 | ||
@@ -641,7 +641,7 @@ ENTRY(flush_kernel_dcache_page_asm) | |||
641 | fdc,m %r23(%r26) | 641 | fdc,m %r23(%r26) |
642 | fdc,m %r23(%r26) | 642 | fdc,m %r23(%r26) |
643 | fdc,m %r23(%r26) | 643 | fdc,m %r23(%r26) |
644 | CMPB<< %r26, %r25,1b | 644 | cmpb,COND(<<) %r26, %r25,1b |
645 | fdc,m %r23(%r26) | 645 | fdc,m %r23(%r26) |
646 | 646 | ||
647 | sync | 647 | sync |
@@ -684,7 +684,7 @@ ENTRY(flush_user_dcache_page) | |||
684 | fdc,m %r23(%sr3, %r26) | 684 | fdc,m %r23(%sr3, %r26) |
685 | fdc,m %r23(%sr3, %r26) | 685 | fdc,m %r23(%sr3, %r26) |
686 | fdc,m %r23(%sr3, %r26) | 686 | fdc,m %r23(%sr3, %r26) |
687 | CMPB<< %r26, %r25,1b | 687 | cmpb,COND(<<) %r26, %r25,1b |
688 | fdc,m %r23(%sr3, %r26) | 688 | fdc,m %r23(%sr3, %r26) |
689 | 689 | ||
690 | sync | 690 | sync |
@@ -727,7 +727,7 @@ ENTRY(flush_user_icache_page) | |||
727 | fic,m %r23(%sr3, %r26) | 727 | fic,m %r23(%sr3, %r26) |
728 | fic,m %r23(%sr3, %r26) | 728 | fic,m %r23(%sr3, %r26) |
729 | fic,m %r23(%sr3, %r26) | 729 | fic,m %r23(%sr3, %r26) |
730 | CMPB<< %r26, %r25,1b | 730 | cmpb,COND(<<) %r26, %r25,1b |
731 | fic,m %r23(%sr3, %r26) | 731 | fic,m %r23(%sr3, %r26) |
732 | 732 | ||
733 | sync | 733 | sync |
@@ -770,7 +770,7 @@ ENTRY(purge_kernel_dcache_page) | |||
770 | pdc,m %r23(%r26) | 770 | pdc,m %r23(%r26) |
771 | pdc,m %r23(%r26) | 771 | pdc,m %r23(%r26) |
772 | pdc,m %r23(%r26) | 772 | pdc,m %r23(%r26) |
773 | CMPB<< %r26, %r25, 1b | 773 | cmpb,COND(<<) %r26, %r25, 1b |
774 | pdc,m %r23(%r26) | 774 | pdc,m %r23(%r26) |
775 | 775 | ||
776 | sync | 776 | sync |
@@ -834,7 +834,7 @@ ENTRY(flush_alias_page) | |||
834 | fdc,m %r23(%r28) | 834 | fdc,m %r23(%r28) |
835 | fdc,m %r23(%r28) | 835 | fdc,m %r23(%r28) |
836 | fdc,m %r23(%r28) | 836 | fdc,m %r23(%r28) |
837 | CMPB<< %r28, %r29, 1b | 837 | cmpb,COND(<<) %r28, %r29, 1b |
838 | fdc,m %r23(%r28) | 838 | fdc,m %r23(%r28) |
839 | 839 | ||
840 | sync | 840 | sync |
@@ -857,7 +857,7 @@ flush_user_dcache_range_asm: | |||
857 | ldo -1(%r23), %r21 | 857 | ldo -1(%r23), %r21 |
858 | ANDCM %r26, %r21, %r26 | 858 | ANDCM %r26, %r21, %r26 |
859 | 859 | ||
860 | 1: CMPB<<,n %r26, %r25, 1b | 860 | 1: cmpb,COND(<<),n %r26, %r25, 1b |
861 | fdc,m %r23(%sr3, %r26) | 861 | fdc,m %r23(%sr3, %r26) |
862 | 862 | ||
863 | sync | 863 | sync |
@@ -878,7 +878,7 @@ ENTRY(flush_kernel_dcache_range_asm) | |||
878 | ldo -1(%r23), %r21 | 878 | ldo -1(%r23), %r21 |
879 | ANDCM %r26, %r21, %r26 | 879 | ANDCM %r26, %r21, %r26 |
880 | 880 | ||
881 | 1: CMPB<<,n %r26, %r25,1b | 881 | 1: cmpb,COND(<<),n %r26, %r25,1b |
882 | fdc,m %r23(%r26) | 882 | fdc,m %r23(%r26) |
883 | 883 | ||
884 | sync | 884 | sync |
@@ -900,7 +900,7 @@ ENTRY(flush_user_icache_range_asm) | |||
900 | ldo -1(%r23), %r21 | 900 | ldo -1(%r23), %r21 |
901 | ANDCM %r26, %r21, %r26 | 901 | ANDCM %r26, %r21, %r26 |
902 | 902 | ||
903 | 1: CMPB<<,n %r26, %r25,1b | 903 | 1: cmpb,COND(<<),n %r26, %r25,1b |
904 | fic,m %r23(%sr3, %r26) | 904 | fic,m %r23(%sr3, %r26) |
905 | 905 | ||
906 | sync | 906 | sync |
@@ -943,7 +943,7 @@ ENTRY(flush_kernel_icache_page) | |||
943 | fic,m %r23(%sr4, %r26) | 943 | fic,m %r23(%sr4, %r26) |
944 | fic,m %r23(%sr4, %r26) | 944 | fic,m %r23(%sr4, %r26) |
945 | fic,m %r23(%sr4, %r26) | 945 | fic,m %r23(%sr4, %r26) |
946 | CMPB<< %r26, %r25, 1b | 946 | cmpb,COND(<<) %r26, %r25, 1b |
947 | fic,m %r23(%sr4, %r26) | 947 | fic,m %r23(%sr4, %r26) |
948 | 948 | ||
949 | sync | 949 | sync |
@@ -964,7 +964,7 @@ ENTRY(flush_kernel_icache_range_asm) | |||
964 | ldo -1(%r23), %r21 | 964 | ldo -1(%r23), %r21 |
965 | ANDCM %r26, %r21, %r26 | 965 | ANDCM %r26, %r21, %r26 |
966 | 966 | ||
967 | 1: CMPB<<,n %r26, %r25, 1b | 967 | 1: cmpb,COND(<<),n %r26, %r25, 1b |
968 | fic,m %r23(%sr4, %r26) | 968 | fic,m %r23(%sr4, %r26) |
969 | 969 | ||
970 | sync | 970 | sync |