From 0b23bc6179b7a8e6c8664374d7d6f66fe9c9bdcb Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Fri, 20 Jan 2023 12:25:38 +0000 Subject: add PPCError error code enum --- compiler_and_linker/unsorted/Intrinsics.c | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'compiler_and_linker/unsorted/Intrinsics.c') diff --git a/compiler_and_linker/unsorted/Intrinsics.c b/compiler_and_linker/unsorted/Intrinsics.c index 59d3a24..49334b8 100644 --- a/compiler_and_linker/unsorted/Intrinsics.c +++ b/compiler_and_linker/unsorted/Intrinsics.c @@ -2412,17 +2412,17 @@ static SInt32 checkconstintarg(ENode *expr, char *name, SInt32 min, SInt32 max, SInt32 value; if (!ENODE_IS(expr, EINTCONST)) - PPCError_ErrorTerm(210, name, 3, max, argnum); + PPCError_ErrorTerm(PPCErrorStr210, name, 3, max, argnum); value = CInt64_GetULong(&expr->data.intval); if (value < min) { - PPCError_Warning(211, name, argnum, value, min, max, min); + PPCError_Warning(PPCErrorStr211, name, argnum, value, min, max, min); return min; } if (value > max) { - PPCError_Warning(211, name, argnum, value, min, max, value & max); + PPCError_Warning(PPCErrorStr211, name, argnum, value, min, max, value & max); value = value & max; } @@ -2535,7 +2535,7 @@ static int Intrinsics_VerifyParameterCount(int wantedCount, ENodeList *args, Has count++; if (count != wantedCount) { - PPCError_Error(103, name->name, count, wantedCount); + PPCError_Error(PPCErrorStr103, name->name, count, wantedCount); return 0; } @@ -2589,7 +2589,7 @@ static Type *Intrinsics_Verify1VectorArg2Ops(Intrinsics id, ENodeList *args, Has rtype = table->rtype; if (!rtype) { - PPCError_Error(104, name->name, name->name, arg1->rtype, 0); + PPCError_Error(PPCErrorStr104, name->name, name->name, arg1->rtype, 0); rtype = NULL; } return rtype; @@ -2633,11 +2633,11 @@ static Type *Intrinsics_Verify1VectorArg(Intrinsics id, ENodeList *args, HashNam if (ENODE_IS(arg1, EINTCONST)) { SInt32 val = arg1->data.intval.lo; if (val > 15 || val < -16) { - PPCError_Error(108, name->name, name->name, 5); + PPCError_Error(PPCErrorStr108, name->name, name->name, 5); return NULL; } } else { - PPCError_Error(108, name->name, name->name, 5); + PPCError_Error(PPCErrorStr108, name->name, name->name, 5); return NULL; } break; @@ -2645,11 +2645,11 @@ static Type *Intrinsics_Verify1VectorArg(Intrinsics id, ENodeList *args, HashNam if (ENODE_IS(arg1, EINTCONST)) { SInt32 val = arg1->data.intval.lo; if (val > 3 || val < 0) { - PPCError_Error(108, name->name, name->name, 2); + PPCError_Error(PPCErrorStr108, name->name, name->name, 2); return NULL; } } else { - PPCError_Error(108, name->name, name->name, 2); + PPCError_Error(PPCErrorStr108, name->name, name->name, 2); return NULL; } break; @@ -2657,7 +2657,7 @@ static Type *Intrinsics_Verify1VectorArg(Intrinsics id, ENodeList *args, HashNam rtype = table->rtype; if (!rtype) { - PPCError_Error(104, name->name, name->name, arg1->rtype, 0); + PPCError_Error(PPCErrorStr104, name->name, name->name, arg1->rtype, 0); rtype = NULL; } return rtype; @@ -2690,11 +2690,11 @@ static Type *Intrinsics_Verify2VectorArgs(Intrinsics id, ENodeList *args, HashNa case Intrinsic_268: if (ENODE_IS(arg2, EINTCONST)) { if (arg2->data.intval.lo > 31 || arg2->data.intval.hi < 0) { - PPCError_Error(108, name->name, name->name, 5); + PPCError_Error(PPCErrorStr108, name->name, name->name, 5); return NULL; } } else { - PPCError_Error(108, name->name, name->name, 5); + PPCError_Error(PPCErrorStr108, name->name, name->name, 5); return NULL; } break; @@ -2719,7 +2719,7 @@ static Type *Intrinsics_Verify2VectorArgs(Intrinsics id, ENodeList *args, HashNa } if (!table->rtype) { - PPCError_Error(105, name->name, name->name, arg1->rtype, 0, arg2->rtype, 0); + PPCError_Error(PPCErrorStr105, name->name, name->name, arg1->rtype, 0, arg2->rtype, 0); return NULL; } @@ -2728,7 +2728,7 @@ static Type *Intrinsics_Verify2VectorArgs(Intrinsics id, ENodeList *args, HashNa case Intrinsic_067: case Intrinsic_068: if (arg2->flags & ENODE_FLAG_VOLATILE) - PPCError_Warning(178, name->name); + PPCError_Warning(PPCErrorStr178, name->name); } return table->rtype; @@ -2783,11 +2783,11 @@ static Type *Intrinsics_Verify3VectorArgs(Intrinsics id, ENodeList *args, HashNa if (ENODE_IS(arg3, EINTCONST)) { SInt32 val = arg3->data.intval.lo; if (val > 3 || val < 0) { - PPCError_Error(108, name->name, name->name, 2); + PPCError_Error(PPCErrorStr108, name->name, name->name, 2); return NULL; } } else { - PPCError_Error(108, name->name, name->name, 2); + PPCError_Error(PPCErrorStr108, name->name, name->name, 2); return NULL; } break; @@ -2795,18 +2795,18 @@ static Type *Intrinsics_Verify3VectorArgs(Intrinsics id, ENodeList *args, HashNa case Intrinsic_263: if (ENODE_IS(arg3, EINTCONST)) { if (arg3->data.intval.lo > 15 || arg3->data.intval.hi < 0) { - PPCError_Error(108, name->name, name->name, 4); + PPCError_Error(PPCErrorStr108, name->name, name->name, 4); return NULL; } } else { - PPCError_Error(108, name->name, name->name, 4); + PPCError_Error(PPCErrorStr108, name->name, name->name, 4); return NULL; } break; } if (!table->rtype) { - PPCError_Error(106, name->name, name->name, arg1->rtype, 0, arg2->rtype, 0, arg3->rtype, 0); + PPCError_Error(PPCErrorStr106, name->name, name->name, arg1->rtype, 0, arg2->rtype, 0, arg3->rtype, 0); return NULL; } @@ -2815,7 +2815,7 @@ static Type *Intrinsics_Verify3VectorArgs(Intrinsics id, ENodeList *args, HashNa case Intrinsic_115: case Intrinsic_116: if (arg3->flags & ENODE_FLAG_VOLATILE) - PPCError_Warning(178, name->name); + PPCError_Warning(PPCErrorStr178, name->name); } return table->rtype; -- cgit v1.2.3