SCP: Remove dead code in sim_sanity_check_register_declarations

This commit is contained in:
Peter Schorn 2022-12-02 13:19:56 +01:00 committed by Paul Koning
parent 74197bfb77
commit ce791138b5

8
scp.c
View file

@ -16044,18 +16044,10 @@ for (i = 0; (dptr = devices[i]) != NULL; i++) {
REG *rptr; REG *rptr;
for (rptr = dptr->registers; (rptr != NULL) && (rptr->name != NULL); rptr++) { for (rptr = dptr->registers; (rptr != NULL) && (rptr->name != NULL); rptr++) {
uint32 bytes = 1;
uint32 rsz = SZ_R(rptr); uint32 rsz = SZ_R(rptr);
uint32 memsize = ((rptr->flags & REG_FIT) || (rptr->depth > 1)) ? rptr->depth * rsz : 4; uint32 memsize = ((rptr->flags & REG_FIT) || (rptr->depth > 1)) ? rptr->depth * rsz : 4;
DEVICE *udptr = NULL;
t_bool Bad; t_bool Bad;
while ((bytes << 3) < rptr->offset + rptr->width)
bytes <<= 1;
if (rptr->depth > 1)
bytes = rptr->size;
if (((rptr->width + rptr->offset + CHAR_BIT - 1) / CHAR_BIT) >= sizeof(size_map) / sizeof(size_map[0])) { if (((rptr->width + rptr->offset + CHAR_BIT - 1) / CHAR_BIT) >= sizeof(size_map) / sizeof(size_map[0])) {
Bad = TRUE; Bad = TRUE;
rsz = 0; rsz = 0;