X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=eagen0.c;h=1de45e35475ab741b4dbccd1360a043c59cc0a0c;hp=1d94c077cf49b8d7424f9ba1b5447daca78f2642;hb=cadc95fb537cf4a3a1fa3be0e108ee52c5cef84d;hpb=4205233c8397c581b4d27ab36ab81ec896ef3dd0 diff --git a/eagen0.c b/eagen0.c index 1d94c07..1de45e3 100644 --- a/eagen0.c +++ b/eagen0.c @@ -40,7 +40,7 @@ int eaNgen(WORD siz) if (tdb) MarkRelocatable(cursect, sloc, tdb, MWORD, NULL); - if ((v == 0) && CHECK_OPTS(OPT_INDIRECT_DISP) && !movep) + if ((v == 0) && CHECK_OPTS(OPT_OUTER_DISP) && !movep) { // If expr is 0, size optimise the opcode. Generally the lower // 6 bits of the opcode for expr(ax) are 101rrr where rrr=the @@ -64,7 +64,7 @@ int eaNgen(WORD siz) chptr_opcode[1] |= 0x0080 & 255; // slap in 010 bits } - if (sbra_flag) + if (optim_warn_flag) warn("0(An) converted to (An)"); return OK; @@ -326,6 +326,12 @@ int eaNgen(WORD siz) case ABSL: if (w) // Defined { + if (CHECK_OPTS(OPT_PC_RELATIVE)) + { + if (aNexattr & (DEFINED | REFERENCED | EQUATED) == DEFINED | REFERENCED) + return error("relocation not allowed"); + } + if (tdb) MarkRelocatable(cursect, sloc, tdb, MLONG, NULL);