diff --git a/semanticMisc.c b/semanticMisc.c index 644e264..05efaa4 100644 --- a/semanticMisc.c +++ b/semanticMisc.c @@ -725,7 +725,7 @@ subValueKind(valueType *leftOperand, valueType *rightOperand) } int -swab(int i) +swabInt(int i) { return(((i & 0xFF) << 8) | ((i & 0xFF00) >> 8)); } @@ -733,7 +733,7 @@ swab(int i) valueType * swabValue(valueType *value) { - return(newValue(value->kindOfValue, swab(value->value), value-> + return(newValue(value->kindOfValue, swabInt(value->value), value-> addressMode)); } diff --git a/semanticMisc.h b/semanticMisc.h index 0533c35..e6f9211 100644 --- a/semanticMisc.h +++ b/semanticMisc.h @@ -36,7 +36,7 @@ valueKindType opValueKind(valueType *leftOperand, valueType *rightOperand); bool relocatableValue(valueType *address); valueKindType selectValueKind(valueType *leftOperand, valueType *rightOperand); valueKindType subValueKind(valueType *leftOperand, valueType *rightOperand); -int swab(int i); +int swabInt(int i); valueType *swabValue(valueType *value); valueKindType unopValueKind(valueType *operand); void valueField(symbolTableEntryType *symbol, valueType *value);