X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fs390%2Fcodegen.h;h=28ceb970a57084a1d28714a3ca681c376a393345;hb=e9865924b9bb241082f2b3878f893be3fc8b57c2;hp=3e5262d459631f77cad2ac7bf499570b7a9d1f61;hpb=f24e856e3c43a10dcc8581fd5ddbdda200d63aba;p=cacao.git diff --git a/src/vm/jit/s390/codegen.h b/src/vm/jit/s390/codegen.h index 3e5262d45..28ceb970a 100644 --- a/src/vm/jit/s390/codegen.h +++ b/src/vm/jit/s390/codegen.h @@ -1,6 +1,6 @@ /* src/vm/jit/s390/codegen.h - code generation macros for s390 - Copyright (C) 1996-2005, 2006, 2007, 2008 + Copyright (C) 1996-2005, 2006, 2007, 2008, 2010 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -43,6 +43,16 @@ codegen_increase(cd); \ } while (0) +#define ALIGNCODENOP \ + do { \ + while (((ptrint) cd->mcodeptr) & 2) { \ + M_NOP2; \ + } \ + while (((ptrint) cd->mcodeptr) & 4) { \ + M_NOP; \ + } \ + } while (0) + /* some patcher defines *******************************************************/ #define PATCHER_CALL_SIZE 2 /* size in bytes of a patcher call */ @@ -690,6 +700,7 @@ static inline uint8_t N_ILL_GET_TYPE(uint8_t *instrp) { #define M_MOV(a, b) N_LR(b, a) #define M_FMOV(a, b) N_LDR(b, a) +#define M_DMOV(a, b) M_FMOV((a), (b)) #define M_DST(r, b, d) _IFNEG(d, assert(0), N_STD(r, d, RN, b)) #define M_FST(r, b, d) _IFNEG(d, assert(0), N_STE(r, d, RN, b)) #define M_IST(r, b, d) _IFNEG( \ @@ -730,6 +741,7 @@ static inline uint8_t N_ILL_GET_TYPE(uint8_t *instrp) { #define M_ICMP(a, b) N_CR(a, b) #define M_ICMPU(a, b) N_CLR(a, b) #define M_ICMP_IMM(a, b) N_CHI(a, b) +#define M_ACMP(a, b) N_CR(a, b) #define M_CVTIF(src, dst) N_CEFBR(dst, src) #define M_CVTID(src, dst) N_CDFBR(dst, src) #define M_FMUL(a, dest) N_MEEBR(dest, a) @@ -803,42 +815,6 @@ static inline uint8_t N_ILL_GET_TYPE(uint8_t *instrp) { ICONST(GET_LOW_REG((reg)), (s4) ((s8) (c))); \ } 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(reg,dreg) \ - do { \ - if ((reg) != (dreg)) { \ - M_MOV(reg, dreg); \ - } \ - } 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(reg,dreg) \ - do { \ - if ((reg) != (dreg)) { \ - M_FMOV(reg, dreg); \ - } \ - } while (0) - #define M_ISUB_IMM32(imm, tmpreg, reg) \ do { \ if (N_VALID_IMM(imm)) { \ @@ -851,10 +827,6 @@ static inline uint8_t N_ILL_GET_TYPE(uint8_t *instrp) { #define M_ASUB_IMM32(imm, tmpreg, reg) M_ISUB_IMM32(imm, tmpreg, reg) -#define PROFILE_CYCLE_START - -#define PROFILE_CYCLE_STOP - #endif /* _CODEGEN_H */ /*