static void emulate_load_store_insn(struct pt_regs *regs,
        void __user *addr, unsigned int __user *pc)
 {
+       unsigned long origpc, orig31, value;
        union mips_instruction insn;
-       unsigned long value;
-       unsigned int res, preempted;
-       unsigned long origpc;
-       unsigned long orig31;
-       void __user *fault_addr = NULL;
+       unsigned int res;
 #ifdef CONFIG_EVA
        mm_segment_t seg;
 #endif
-       union fpureg *fpr;
-       enum msa_2b_fmt df;
-       unsigned int wd;
        origpc = (unsigned long)pc;
        orig31 = regs->regs[31];
 
                /* Cannot handle 64-bit instructions in 32-bit kernel */
                goto sigill;
 
+#ifdef CONFIG_MIPS_FP_SUPPORT
+
        case lwc1_op:
        case ldc1_op:
        case swc1_op:
        case sdc1_op:
-       case cop1x_op:
+       case cop1x_op: {
+               void __user *fault_addr = NULL;
+
                die_if_kernel("Unaligned FP access in kernel code", regs);
                BUG_ON(!used_math());
 
                if (res == 0)
                        break;
                return;
+       }
+#endif /* CONFIG_MIPS_FP_SUPPORT */
+
+#ifdef CONFIG_CPU_HAS_MSA
+
+       case msa_op: {
+               unsigned int wd, preempted;
+               enum msa_2b_fmt df;
+               union fpureg *fpr;
 
-       case msa_op:
                if (!cpu_has_msa)
                        goto sigill;
 
 
                compute_return_epc(regs);
                break;
+       }
+#endif /* CONFIG_CPU_HAS_MSA */
 
 #ifndef CONFIG_CPU_MIPSR6
        /*
        unsigned long origpc, contpc;
        union mips_instruction insn;
        struct mm_decoded_insn mminsn;
-       void __user *fault_addr = NULL;
 
        origpc = regs->cp0_epc;
        orig31 = regs->regs[31];
                /*  LL,SC,LLD,SCD are not serviced */
                goto sigbus;
 
+#ifdef CONFIG_MIPS_FP_SUPPORT
        case mm_pool32f_op:
                switch (insn.mm_x_format.func) {
                case mm_lwxc1_func:
        case mm_ldc132_op:
        case mm_sdc132_op:
        case mm_lwc132_op:
-       case mm_swc132_op:
+       case mm_swc132_op: {
+               void __user *fault_addr = NULL;
+
 fpu_emul:
                /* roll back jump/branch */
                regs->cp0_epc = origpc;
                if (res == 0)
                        goto success;
                return;
+       }
+#endif /* CONFIG_MIPS_FP_SUPPORT */
 
        case mm_lh32_op:
                reg = insn.mm_i_format.rt;