Skip to content

Commit 68fe556

Browse files
Maciej W. Rozyckiralfbaechle
authored andcommitted
MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
Fix a commit 3021773 ("MIPS: DEC: Avoid la pseudo-instruction in delay slots") regression and remove assembly errors: arch/mips/dec/int-handler.S: Assembler messages: arch/mips/dec/int-handler.S:162: Error: Macro used $at after ".set noat" arch/mips/dec/int-handler.S:163: Error: Macro used $at after ".set noat" arch/mips/dec/int-handler.S:229: Error: Macro used $at after ".set noat" arch/mips/dec/int-handler.S:230: Error: Macro used $at after ".set noat" triggering with with the CPU_DADDI_WORKAROUNDS option set and the DADDIU instruction. This is because with that option in place the instruction becomes a macro, which expands to an LI/DADDU (or actually ADDIU/DADDU) sequence that uses $at as a temporary register. With CPU_DADDI_WORKAROUNDS we only support `-msym32' compilation though, and this is already enforced in arch/mips/Makefile, so choose the 32-bit expansion variant for the supported configurations and then replace the 64-bit variant with #error just in case. Fixes: 3021773 ("MIPS: DEC: Avoid la pseudo-instruction in delay slots") Signed-off-by: Maciej W. Rozycki <[email protected]> Cc: [email protected] Cc: [email protected] # 4.8+ Patchwork: https://patchwork.linux-mips.org/patch/16893/ Signed-off-by: Ralf Baechle <[email protected]>
1 parent b399ee2 commit 68fe556

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

arch/mips/dec/int-handler.S

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -147,23 +147,12 @@
147147
* Find irq with highest priority
148148
*/
149149
# open coded PTR_LA t1, cpu_mask_nr_tbl
150-
#if (_MIPS_SZPTR == 32)
150+
#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
151151
# open coded la t1, cpu_mask_nr_tbl
152152
lui t1, %hi(cpu_mask_nr_tbl)
153153
addiu t1, %lo(cpu_mask_nr_tbl)
154-
155-
#endif
156-
#if (_MIPS_SZPTR == 64)
157-
# open coded dla t1, cpu_mask_nr_tbl
158-
.set push
159-
.set noat
160-
lui t1, %highest(cpu_mask_nr_tbl)
161-
lui AT, %hi(cpu_mask_nr_tbl)
162-
daddiu t1, t1, %higher(cpu_mask_nr_tbl)
163-
daddiu AT, AT, %lo(cpu_mask_nr_tbl)
164-
dsll t1, 32
165-
daddu t1, t1, AT
166-
.set pop
154+
#else
155+
#error GCC `-msym32' option required for 64-bit DECstation builds
167156
#endif
168157
1: lw t2,(t1)
169158
nop
@@ -214,23 +203,12 @@
214203
* Find irq with highest priority
215204
*/
216205
# open coded PTR_LA t1,asic_mask_nr_tbl
217-
#if (_MIPS_SZPTR == 32)
206+
#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
218207
# open coded la t1, asic_mask_nr_tbl
219208
lui t1, %hi(asic_mask_nr_tbl)
220209
addiu t1, %lo(asic_mask_nr_tbl)
221-
222-
#endif
223-
#if (_MIPS_SZPTR == 64)
224-
# open coded dla t1, asic_mask_nr_tbl
225-
.set push
226-
.set noat
227-
lui t1, %highest(asic_mask_nr_tbl)
228-
lui AT, %hi(asic_mask_nr_tbl)
229-
daddiu t1, t1, %higher(asic_mask_nr_tbl)
230-
daddiu AT, AT, %lo(asic_mask_nr_tbl)
231-
dsll t1, 32
232-
daddu t1, t1, AT
233-
.set pop
210+
#else
211+
#error GCC `-msym32' option required for 64-bit DECstation builds
234212
#endif
235213
2: lw t2,(t1)
236214
nop

0 commit comments

Comments
 (0)