If you spill case, you can avoid branching. eg.
subl $4, %esp
use the sequence of commands:
movl %eax, (%esp) ... movzbl %ch, %eax ... addl (%esp), %eax
and restore the stack pointer at the end:
addl $4, %esp
This can lead to chaos with any attempts to debug the code inside this block if this is a problem.
Or, following Doug Curry's suggestion:
addb %ch, %al jnc done addl 0x100, %eax done:
source share