Sorry for not being fast enough to rewrite the patch on my end to integrate your changes (I'm maintaining this patch for both gcc 14 and master at the same time, which is a little complicated), but I appreciate the help :) How did you figure out the issue so quickly? I was going in circles trying to find out why zero_extend was causing a useless register load and why making it Pmode directly wouldn't work, I'm a little curious as to how you managed to track the problematic code down to quickly
best regards, Julian