# HG changeset patch # User Michael Pavone # Date 1628181809 25200 # Node ID 3142602d21d81deb950b6c8c41c8505a6edbc877 # Parent 638eb2d256967fe19d0376d80c4c8fa33ab0bb5f Fix compile error post-merge diff -r 638eb2d25696 -r 3142602d21d8 backend.c --- a/backend.c Thu Aug 05 09:29:33 2021 -0700 +++ b/backend.c Thu Aug 05 09:43:29 2021 -0700 @@ -58,12 +58,14 @@ if (size_sum) { *size_sum = 0; } +#ifndef NEW_CORE uint32_t minsize; if (flags == MMAP_CODE) { minsize = 1 << (opts->ram_flags_shift + 3); } else { minsize = 0; } +#endif address &= opts->address_mask; for (memmap_chunk const *cur = opts->memmap, *end = opts->memmap + opts->memmap_chunks; cur != end; cur++) { @@ -71,9 +73,11 @@ return cur; } else if (size_sum && (cur->flags & flags) == flags) { uint32_t size = chunk_size(opts, cur); +#ifndef NEW_CORE if (size < minsize) { size = minsize; } +#endif *size_sum += size; } } @@ -281,16 +285,22 @@ uint32_t ram_size(cpu_options *opts) { uint32_t size = 0; +#ifndef NEW_CORE uint32_t minsize = 1 << (opts->ram_flags_shift + 3); +#endif for (int i = 0; i < opts->memmap_chunks; i++) { if (opts->memmap[i].flags & MMAP_CODE) { uint32_t cursize = chunk_size(opts, opts->memmap + i); +#ifndef NEW_CORE if (cursize < minsize) { size += minsize; } else { +#endif size += cursize; +#ifndef NEW_CORE } +#endif } } return size;