summaryrefslogtreecommitdiff
path: root/src/utils/utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/utils.cc')
-rw-r--r--src/utils/utils.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/utils.cc b/src/utils/utils.cc
index b4bdb2f..dfeb2b3 100644
--- a/src/utils/utils.cc
+++ b/src/utils/utils.cc
@@ -1,11 +1,11 @@
-#include "definitions.h"
#include "utils.h"
+#include "definitions.h"
void get_bit_fields(int address, int *tag, int *index, int *offset)
{
*tag =
- MID(address, LINE_SPEC + L1_CACHE_SPEC,
+ GET_MID_BITS(address, LINE_SPEC + L1_CACHE_SPEC,
MEM_SPEC + LINE_SPEC + L1_CACHE_SPEC);
- *index = MID(address, LINE_SPEC, L1_CACHE_SPEC + LINE_SPEC);
- *offset = LAST(address, LINE_SPEC);
+ *index = GET_MID_BITS(address, LINE_SPEC, L1_CACHE_SPEC + LINE_SPEC);
+ *offset = GET_LS_BITS(address, LINE_SPEC);
}