X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fpowerpc%2Fcodegen.h;h=d8326aa4db4f6ad2164f69f0ec76ba6e600c18c7;hb=2ab77f5d50859fe9849586d1be0382fb61856b8f;hp=6081382ea554d3723318b6912fa339e8a041c552;hpb=7f461fba26d7241e160c580dbca9ba1c2656e572;p=cacao.git diff --git a/src/vm/jit/powerpc/codegen.h b/src/vm/jit/powerpc/codegen.h index 6081382ea..d8326aa4d 100644 --- a/src/vm/jit/powerpc/codegen.h +++ b/src/vm/jit/powerpc/codegen.h @@ -47,50 +47,13 @@ } while (0) -/* M_INTMOVE: - generates an integer-move from register a to b. - if a and b are the same int-register, no code will be generated. -*/ - -#define M_INTMOVE(a,b) \ - do { \ - if ((a) != (b)) { \ - M_MOV(a, b); \ - } \ - } while (0) - -#define M_LNGMOVE(a,b) \ - do { \ - if (GET_HIGH_REG(a) == GET_LOW_REG(b)) { \ - assert((GET_LOW_REG(a) != GET_HIGH_REG(b))); \ - M_INTMOVE(GET_HIGH_REG(a), GET_HIGH_REG(b)); \ - M_INTMOVE(GET_LOW_REG(a), GET_LOW_REG(b)); \ - } else { \ - M_INTMOVE(GET_LOW_REG(a), GET_LOW_REG(b)); \ - M_INTMOVE(GET_HIGH_REG(a), GET_HIGH_REG(b)); \ - } \ - } while (0) - - -/* M_FLTMOVE: - generates a floating-point-move from register a to b. - if a and b are the same float-register, no code will be generated -*/ - -#define M_FLTMOVE(a,b) \ - do { \ - if ((a) != (b)) { \ - M_FMOV(a, b); \ - } \ - } while (0) - - #define ICONST(d,c) emit_iconst(cd, (d), (c)) #define LCONST(reg,c) \ ICONST(GET_HIGH_REG((reg)), (s4) ((s8) (c) >> 32)); \ ICONST(GET_LOW_REG((reg)), (s4) ((s8) (c))); +#define M_DMOV(a,b) M_FMOV(a,b) #define ALIGNCODENOP \ if ((s4) ((ptrint) cd->mcodeptr & 7)) { \ @@ -407,6 +370,12 @@ #define M_AST_INTERN(a,b,disp) M_IST_INTERN(a,b,disp) #define M_AST(a,b,disp) M_IST(a,b,disp) +#define M_ACMP(a,b) M_CMP(a,b) +#define M_ICMP(a,b) M_CMP(a,b) + +#define M_TEST(a) M_TST(a) +#define M_ALD_DSEG(a,disp) M_ALD(a,REG_PV,disp); + /* floating point instructions ************************************************/