X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fs390%2Fmd-trap.h;h=3d3e4afe8b505c06dd9b34d9f4ded65ffad9de0d;hb=aed95b0ea70495483786dde13566ea05c3869dee;hp=a5e05a0716e82606a380dc0f3637eff78fd315e9;hpb=755791284a9ca3edc1d3be1c18a89973c2355d64;p=cacao.git diff --git a/src/vm/jit/s390/md-trap.h b/src/vm/jit/s390/md-trap.h index a5e05a071..3d3e4afe8 100644 --- a/src/vm/jit/s390/md-trap.h +++ b/src/vm/jit/s390/md-trap.h @@ -1,6 +1,6 @@ /* src/vm/jit/s390/md-trap.h - s390 hardware traps - Copyright (C) 2008 + Copyright (C) 2008, 2010 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -50,6 +50,18 @@ enum { TRAP_COUNTDOWN = 8 }; + +/** + * Macro to fixup a compiler stub. The XPC is the RA minus 2, + * because the RA points to the instruction after the call. + */ +#define MD_TRAP_COMPILER_FIXUP(xpc, ra, sp, pv) \ + do { \ + (pv) = (xpc); \ + (xpc) = (void*) (((uintptr_t) (ra)) - 2); \ + } while(0) + + #endif /* _MD_TRAP_H */