gen{,End}Function currently, when producing the pro-/epilogue for a callee_saved function, does not track whether any caller_saved functions are called. In that case, it should save all registers, but it doesn't, violating the callee_saved property.
SDCC Version 3.1.0 #7066 (Dec 12 2011) (Linux)
The code generated for y should first push all registers, then call x, then pop all registers. Currently, it doesn't do that.
callee_saved calling caller_saved
Fixed in SDCC [r9021]
Last edit: Maarten Brock 2014-05-04