Saltar al contenido
← volver

Steinar H. Gunderson: Decompilation patterns, part 6: If-add-else

Planet Debian · blog.sesse.net Publicado:

Often, m2c will spit out something like this: x = 3; if (a == 10) { x = 4; } This may be what was intended, but if it doesn't match (usually due to different register allocation; the rewrite itself is nearly always going to be taken, since it saves a branch on one of the paths), this is often a better rewrite: if (a == 10) { x = 4; } else { x = 3; } and in some cases, this may have different code generation (especially as you can stick it into an argument list): x = (a == 10) ? 4 : 3; This is a…

Leer original →

Más de Planet Debian