diff options
author | bd <bdunahu@operationnull.com> | 2025-04-16 17:38:42 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-16 17:38:42 -0400 |
commit | 71bc1229d67e7ddde351d92ccebfabf0ba79c814 (patch) | |
tree | 03afa6875c0407466431e9e7225b0e9c4cae0de8 /inc | |
parent | 24fd3ac34fe955818542a8eaa7f76f87644f10bf (diff) |
Wrap all addresses immediately
Diffstat (limited to 'inc')
-rw-r--r-- | inc/dram.h | 9 | ||||
-rw-r--r-- | inc/storage.h | 9 |
2 files changed, 9 insertions, 9 deletions
@@ -5,15 +5,6 @@ #include <functional> #include <ostream> -// clang-format off -/** - * Ensures address is within the current memory size using a clean wrap. - * @param an address - */ -#define WRAP_ADDRESS(a) \ - ((a < 0) ? ((a % MEM_WORDS) + MEM_WORDS) % MEM_WORDS : a % MEM_WORDS) -// clang-format on - class Dram : public Storage { public: diff --git a/inc/storage.h b/inc/storage.h index 1bf5805..994bb8f 100644 --- a/inc/storage.h +++ b/inc/storage.h @@ -7,6 +7,15 @@ #include <map> #include <vector> +// clang-format off +/** + * Ensures address is within the current memory size using a clean wrap. + * @param an address + */ +#define WRAP_ADDRESS(a) \ + ((a < 0) ? ((a % MEM_WORDS) + MEM_WORDS) % MEM_WORDS : a % MEM_WORDS) +// clang-format on + class Storage { public: |