__preserves_regs
returns an error when IX is specified
To reproduce the issue try
void foo(void) __preserves_regs(b, c, ixl, ixh);
in this version of SDCC
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 4.2.0 #13031 (MINGW32)
published under GNU General Public License (GPL)
I guess we could silently ignore ixl and ixh.
Specifying them shouldn't make a difference, as our Z80 ABI mandates that ix is always preserved by the callee.
Isn't it better to document that ix is not allowed here?
And keep the error or replace it by a better one?
If you're going to ignore it at least generate a warning.
I can imagine such if the behaviour depends on the used calling convention.
In sdcc from current svn, we ignore it and emit a warning "unknown register specification ixh".