From efdee3487007b4dfbca3af8ed7db6b8726658d1b Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 22 Nov 2003 13:02:37 +0000 Subject: [PATCH] Mark RTI as "uses all registers" to avoid problems with the optimizer removing register loads from an interrupt handler return. git-svn-id: svn://svn.cc65.org/cc65/trunk@2676 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/opcodes.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cc65/opcodes.c b/src/cc65/opcodes.c index 7bd8b5032..3ba541d01 100644 --- a/src/cc65/opcodes.c +++ b/src/cc65/opcodes.c @@ -449,11 +449,14 @@ const OPCDesc OPCTable[OPCODE_COUNT] = { REG_NONE, /* use */ REG_NONE, /* chg */ OF_SETF /* flags */ - }, + }, + /* Mark RTI as "uses all registers but doesn't change them", so the + * optimizer won't remove preceeding loads. + */ { OP65_RTI, /* opcode */ "rti", /* mnemonic */ 1, /* size */ - REG_NONE, /* use */ + REG_AXY, /* use */ REG_NONE, /* chg */ OF_RET /* flags */ }, -- 2.39.5