The stm8 backend should make use of the pop longmen instruction. Something like the peephole
} pop a ld %1, a } by { pop %1 }
Either as a peephole (but how would it know that %1 is a global variable?) or in code generation (but the pop usually comes from a call, then the ld from an assignment, so two different iCodes).
Philipp