Revision e1833e1f target-ppc/op_helper.c

b/target-ppc/op_helper.c
47 47
    printf("Raise exception %3x code : %d\n", exception, error_code);
48 48
#endif
49 49
    switch (exception) {
50
    case EXCP_PROGRAM:
51
        if (error_code == EXCP_FP && msr_fe0 == 0 && msr_fe1 == 0)
50
    case POWERPC_EXCP_PROGRAM:
51
        if (error_code == POWERPC_EXCP_FP && msr_fe0 == 0 && msr_fe1 == 0)
52 52
            return;
53 53
        break;
54 54
    default:
......
947 947
                  ((int32_t)T0 == (int32_t)T1 && (flags & 0x04)) ||
948 948
                  ((uint32_t)T0 < (uint32_t)T1 && (flags & 0x02)) ||
949 949
                  ((uint32_t)T0 > (uint32_t)T1 && (flags & 0x01))))) {
950
        do_raise_exception_err(EXCP_PROGRAM, EXCP_TRAP);
950
        do_raise_exception_err(POWERPC_EXCP_PROGRAM, POWERPC_EXCP_TRAP);
951 951
    }
952 952
}
953 953

  
......
959 959
                  ((int64_t)T0 == (int64_t)T1 && (flags & 0x04)) ||
960 960
                  ((uint64_t)T0 < (uint64_t)T1 && (flags & 0x02)) ||
961 961
                  ((uint64_t)T0 > (uint64_t)T1 && (flags & 0x01)))))
962
        do_raise_exception_err(EXCP_PROGRAM, EXCP_TRAP);
962
        do_raise_exception_err(POWERPC_EXCP_PROGRAM, POWERPC_EXCP_TRAP);
963 963
}
964 964
#endif
965 965

  
......
1215 1215
        if (loglevel != 0) {
1216 1216
            fprintf(logfile, "No DCR environment\n");
1217 1217
        }
1218
        do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL);
1218
        do_raise_exception_err(POWERPC_EXCP_PROGRAM,
1219
                               POWERPC_EXCP_INVAL | POWERPC_EXCP_INVAL_INVAL);
1219 1220
    } else if (unlikely(ppc_dcr_read(env->dcr_env, T0, &val) != 0)) {
1220 1221
        if (loglevel != 0) {
1221 1222
            fprintf(logfile, "DCR read error %d %03x\n", (int)T0, (int)T0);
1222 1223
        }
1223
        do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_PRIV_REG);
1224
        do_raise_exception_err(POWERPC_EXCP_PROGRAM,
1225
                               POWERPC_EXCP_INVAL | POWERPC_EXCP_PRIV_REG);
1224 1226
    } else {
1225 1227
        T0 = val;
1226 1228
    }
......
1232 1234
        if (loglevel != 0) {
1233 1235
            fprintf(logfile, "No DCR environment\n");
1234 1236
        }
1235
        do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_INVAL);
1237
        do_raise_exception_err(POWERPC_EXCP_PROGRAM,
1238
                               POWERPC_EXCP_INVAL | POWERPC_EXCP_INVAL_INVAL);
1236 1239
    } else if (unlikely(ppc_dcr_write(env->dcr_env, T0, T1) != 0)) {
1237 1240
        if (loglevel != 0) {
1238 1241
            fprintf(logfile, "DCR write error %d %03x\n", (int)T0, (int)T0);
1239 1242
        }
1240
        do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_PRIV_REG);
1243
        do_raise_exception_err(POWERPC_EXCP_PROGRAM,
1244
                               POWERPC_EXCP_INVAL | POWERPC_EXCP_PRIV_REG);
1241 1245
    }
1242 1246
}
1243 1247

  

Also available in: Unified diff