Index: src/Processor/active.h =================================================================== RCS file: /res/impulse/users/map/cvsroot/ml-rsim/src/Processor/active.h,v retrieving revision 1.2 retrieving revision 1.3 diff --context -r1.2 -r1.3 *** src/Processor/active.h 2002/10/25 20:25:14 1.2 --- src/Processor/active.h 2004/03/17 19:57:56 1.3 *************** *** 106,115 **** class activelist { - public: circq *q; int mx; /* max elements in active list */ /* Member functions */ inline activelist(int maxelements) { --- 106,115 ---- class activelist { circq *q; int mx; /* max elements in active list */ + public: /* Member functions */ inline activelist(int maxelements) { Index: src/Processor/funcs.cc =================================================================== RCS file: /res/impulse/users/map/cvsroot/ml-rsim/src/Processor/funcs.cc,v retrieving revision 1.11 retrieving revision 1.12 diff --context -r1.11 -r1.12 *** src/Processor/funcs.cc 2003/10/10 21:14:43 1.11 --- src/Processor/funcs.cc 2004/03/17 20:02:45 1.12 *************** *** 2672,2683 **** { char *pa = GetMap(inst, proc); T *ptr = (T *)pa; ! T result = *ptr; ! ! result = endian_swap(result); ! ! if (t) ! result = SE(result, sizeof(T)*8); ! inst->rdvali = result; } --- 2672,2688 ---- { char *pa = GetMap(inst, proc); T *ptr = (T *)pa; ! if (ptr) ! { ! T result = *ptr; ! ! result = endian_swap(result); ! if (t) ! result = SE(result, sizeof(T)*8); ! inst->rdvali = result; ! } ! else ! inst->exception_code = BUSERR; } *************** *** 2721,2730 **** { char *pa = GetMap(inst, proc); unsigned *ptr = (unsigned *)pa; ! ! inst->rdvalipair.a = endian_swap(*ptr); ! ptr++; ! inst->rdvalipair.b = endian_swap(*ptr); } --- 2726,2739 ---- { char *pa = GetMap(inst, proc); unsigned *ptr = (unsigned *)pa; ! if (ptr) ! { ! inst->rdvalipair.a = endian_swap(*ptr); ! ptr++; ! inst->rdvalipair.b = endian_swap(*ptr); ! } ! else ! inst->exception_code = BUSERR; } *************** *** 2741,2753 **** { char *pa = GetMap(inst, proc); unsigned long long *ptr = (unsigned long long *)pa; ! unsigned long long result = *ptr; ! ! result = endian_swap(result); ! ! if (t) ! result = SE(result, sizeof(unsigned long long)*8); ! inst->rdvalll = result; } --- 2750,2767 ---- { char *pa = GetMap(inst, proc); unsigned long long *ptr = (unsigned long long *)pa; ! if (ptr) ! { ! unsigned long long result = *ptr; ! ! result = endian_swap(result); ! ! if (t) ! result = SE(result, sizeof(unsigned long long)*8); ! inst->rdvalll = result; ! } ! else ! inst->exception_code = BUSERR; } *************** *** 2755,2780 **** { char *pa = GetMap(inst,proc); float *ptr = (float *)pa; ! float result = *ptr; ! ! result = endian_swap(result); ! ! int *ip = (int *) &result; ! int *dp = (int*)&(inst->rdvalfh); ! *dp = *ip; /* single-precision */ } - void fnLDDF(instance *inst,ProcState *proc) { char *pa = GetMap(inst,proc); double *ptr = (double *)pa; ! double result = *ptr; ! ! result = endian_swap(result); ! ! long long *ip = (long long *) &result; ! *((long long *) &(inst->rdvalf)) = *ip; /* double-precision */ } --- 2769,2803 ---- { char *pa = GetMap(inst,proc); float *ptr = (float *)pa; ! if (ptr) ! { ! float result = *ptr; ! ! result = endian_swap(result); ! ! int *ip = (int *) &result; ! int *dp = (int*)&(inst->rdvalfh); ! *dp = *ip; /* single-precision */ ! } ! else ! inst->exception_code = BUSERR; } void fnLDDF(instance *inst,ProcState *proc) { char *pa = GetMap(inst,proc); double *ptr = (double *)pa; ! if (ptr) ! { ! double result = *ptr; ! ! result = endian_swap(result); ! ! long long *ip = (long long *) &result; ! *((long long *) &(inst->rdvalf)) = *ip; /* double-precision */ ! } ! else ! inst->exception_code = BUSERR; } *************** *** 2782,2793 **** { char *pa = GetMap(inst,proc); double *ptr = (double *)pa; ! double result = *ptr; ! ! result = endian_swap(result); ! ! long long *ip = (long long *) &result; ! *((long long *) &(inst->rdvalf)) = *ip; /* double-precision */ } --- 2805,2821 ---- { char *pa = GetMap(inst,proc); double *ptr = (double *)pa; ! if (ptr) ! { ! double result = *ptr; ! ! result = endian_swap(result); ! ! long long *ip = (long long *) &result; ! *((long long *) &(inst->rdvalf)) = *ip; /* double-precision */ ! } ! else ! inst->exception_code = BUSERR; } *************** *** 2970,2979 **** { char *pa = GetMap(inst, proc); unsigned char *ptr = (unsigned char *)pa; ! unsigned char result = *ptr; ! ! inst->rdvali = result; ! *ptr = 0xff; } --- 2998,3012 ---- { char *pa = GetMap(inst, proc); unsigned char *ptr = (unsigned char *)pa; ! if (ptr) ! { ! unsigned char result = *ptr; ! ! inst->rdvali = result; ! *ptr = 0xff; ! } ! else ! inst->exception_code = BUSERR; } *************** *** 2982,2991 **** { char *pa=GetMap(inst,proc); int *ptr = (int *)pa; ! int result = endian_swap(*ptr); ! ! inst->rdvali=result; ! *ptr = endian_swap(inst->rs1vali); } --- 3015,3029 ---- { char *pa=GetMap(inst,proc); int *ptr = (int *)pa; ! if (ptr) ! { ! int result = endian_swap(*ptr); ! ! inst->rdvali=result; ! *ptr = endian_swap(inst->rs1vali); ! } ! else ! inst->exception_code = BUSERR; } *************** *** 3008,3021 **** { char *pa = GetMap(inst, proc); unsigned *ptr = (unsigned *)pa; ! ! inst->rdvalipair.a = endian_swap(*ptr); ! ptr++; ! inst->rdvalipair.b = endian_swap(*ptr); ! ! inst->exception_code = SERIALIZE; ! /* load value from memory, but also serialize it. If it turns out to be ! a limbo, then let the limbo override the serialize */ } --- 3046,3063 ---- { char *pa = GetMap(inst, proc); unsigned *ptr = (unsigned *)pa; ! if (ptr) ! { ! inst->rdvalipair.a = endian_swap(*ptr); ! ptr++; ! inst->rdvalipair.b = endian_swap(*ptr); ! ! inst->exception_code = SERIALIZE; ! /* load value from memory, but also serialize it. If it turns out to be ! a limbo, then let the limbo override the serialize */ ! } ! else ! inst->exception_code = BUSERR; } *************** *** 3049,3059 **** { char *pa = GetMap(inst,proc); int *ptr = (int *)pa; ! int result = endian_swap(*ptr); ! ! inst->rdvali=result; ! if (result == inst->rs1vali) // put the old dest value ! *ptr = endian_swap(inst->rsccvali); // into the memory location } --- 3091,3106 ---- { char *pa = GetMap(inst,proc); int *ptr = (int *)pa; ! if (ptr) ! { ! int result = endian_swap(*ptr); ! ! inst->rdvali=result; ! if (result == inst->rs1vali) // put the old dest value ! *ptr = endian_swap(inst->rsccvali); // into the memory location ! } ! else ! inst->exception_code = BUSERR; }