Saltar al contenido
← volver

Steinar H. Gunderson: Decompilation patterns, part 11: Irregular switch

Planet Debian · blog.sesse.net Publicado:

Here's one that m2c usually gets right itself, but sometimes cannot: if (var_v1_7 != 1) { if (var_v1_7 vram_x; vram_y = cmt46->vram_y; spF0 = 40; } } else if (var_v1_7 != 2) { if (var_v1_7 != 3) { Repeated comparisons against the same variable, especially in a nested form that could be binary search, should remind you of one thing: A switch. Usually, the compiler implements a switch with a jump table, but not always; if there are few conditions, or the range is too large for a reasonably-sized…

Leer original →

Más de Planet Debian