X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=mach.c;h=71fd3cb24bfbd3d54faeeb19c0fd3ea2f47d76e7;hp=69be7ea471873d11f8735b52dc75f09f7b52e192;hb=2161b198b7b333147c89ef0346d8e9bb6ab9ffd9;hpb=60f204cb9e3905100da0d89f14bb40db764acd9e diff --git a/mach.c b/mach.c index 69be7ea..71fd3cb 100644 --- a/mach.c +++ b/mach.c @@ -7,19 +7,22 @@ // #include "mach.h" +#include "eagen.h" #include "error.h" -#include "sect.h" #include "direct.h" -#include "token.h" #include "procln.h" #include "riscasm.h" #include "rmac.h" +#include "sect.h" +#include "token.h" #define DEF_KW #include "kwtab.h" +// Exported variables +int movep = 0; // Global flag to indicate we're generating a movep instruction -// Fucntion prototypes +// Function prototypes int m_unimp(WORD, WORD), m_badmode(WORD, WORD), m_bad6mode(WORD, WORD), m_bad6inst(WORD, WORD); int m_self(WORD, WORD); int m_abcd(WORD, WORD); @@ -54,9 +57,6 @@ char siz_error[] = "bad size specified"; char undef_error[] = "undefined expression"; char fwd_error[] = "forward or undefined expression"; -extern int ea0gen(WORD); -extern int ea1gen(WORD); - // Include code tables MNTAB machtab[] = { // { (WORD)-1, (unsigned long)-1L, (unsigned long)-1L, 0x0000, 0, m_badmode }, // 0 @@ -499,12 +499,12 @@ int m_moveq(WORD inst, WORD siz) return 0; } - // // movep Dn, disp(An) -- movep disp(An), Dn // int m_movep(WORD inst, WORD siz) { + movep = 1; // Tell ea0gen to lay off the 0(a0) optimisations on this one if (siz == SIZL) inst |= 0x0040; @@ -529,6 +529,7 @@ int m_movep(WORD inst, WORD siz) ea0gen(siz); } + movep = 0; return 0; }