}
-static UChar *
-emit_S(UChar *p, UInt op, UChar b2, UShort d2)
-{
- ULong the_insn = op;
-
- the_insn |= ((ULong)b2) << 12;
- the_insn |= ((ULong)d2) << 0;
-
- return emit_4bytes(p, the_insn);
-}
-
-
static UChar *
emit_SI(UChar *p, UInt op, UChar i2, UChar b1, UShort d1)
{
}
-static UChar *
-s390_emit_LFPC(UChar *p, UChar b2, UShort d2)
-{
- if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
- s390_disasm(ENC2(MNM, UDXB), "lfpc", d2, 0, b2);
-
- return emit_S(p, 0xb29d0000, b2, d2);
-}
-
-
static UChar *
s390_emit_LDGR(UChar *p, UChar r1, UChar r2)
{
}
-static UChar *
-s390_emit_STFPC(UChar *p, UChar b2, UShort d2)
-{
- if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
- s390_disasm(ENC2(MNM, UDXB), "stfpc", d2, 0, b2);
-
- return emit_S(p, 0xb29c0000, b2, d2);
-}
-
-
static UChar *
s390_emit_AEBR(UChar *p, UChar r1, UChar r2)
{
Also, need to arrange for the return address be put into the
link-register */
buf = s390_emit_load_64imm(buf, 1, target);
-
- /* Stash away the client's FPC register because the helper might change it. */
- buf = s390_emit_STFPC(buf, S390_REGNO_STACK_POINTER, S390_OFFSET_SAVED_FPC_C);
-
- buf = s390_emit_BASR(buf, S390_REGNO_LINK_REGISTER, 1); // call helper
-
- buf = s390_emit_LFPC(buf, S390_REGNO_STACK_POINTER, // restore FPC
- S390_OFFSET_SAVED_FPC_C);
+ buf = s390_emit_BASR(buf, S390_REGNO_LINK_REGISTER, 1);
// preElse:
UChar* pPreElse = buf;
/* Dispatcher will save 8 FPRs at offsets 160 + 0 ... 160 + 56 */
/* Where the dispatcher saves the r2 contents. */
-#define S390_OFFSET_SAVED_R2 160+80
-
-/* Where client's FPC register is saved. */
-#define S390_OFFSET_SAVED_FPC_C 160+72
+#define S390_OFFSET_SAVED_R2 160+72
/* Where valgrind's FPC register is saved. */
#define S390_OFFSET_SAVED_FPC_V 160+64
Need size for
8 FPRs
+ 1 GPR (SAVED_R2)
- + 2 FPCs (SAVED_FPC_C and SAVED_FPC_V).
+ + 1 FPC (SAVED_FPC_V)
Additionally, we need a standard frame for helper functions being called
from client code. (See figure 1-16 in zSeries ABI) */
-#define S390_INNERLOOP_FRAME_SIZE ((8+1+2)*8 + 160)
+#define S390_INNERLOOP_FRAME_SIZE ((8+1+1)*8 + 160)
/*--------------------------------------------------------------*/