}
}
+#if defined(VGO_freebsd) || defined(VGO_darwin)
+
+/* This dummy function is just used to have an address just after
+ amd64g_calculate_rflags_all_WRK */
+
+static
+void _______VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______ (void)
+{
+}
+
+/* Export addresses of amd64g_calculate_rflags_all_WRK and
+ _______VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______
+ Used in syswrap-main.c / VG_(post_syscall) in the case where
+ the above function was interrupted and we need to work out
+ what needs to be done for the resumption */
+
+Addr addr_amd64g_calculate_rflags_all_WRK = (Addr)amd64g_calculate_rflags_all_WRK;
+Addr addr________VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______ = (Addr)_______VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______;
+#endif
/* CALLED FROM GENERATED CODE: CLEAN HELPER */
/* Calculate all the 6 flags from the supplied thunk parameters. */
vex_state->guest_CC_NDEP = 0;
}
+#if defined(VGO_freebsd) || defined(VGO_darwin)
+/* Used in syswrap-main.c / VG_(post_syscall) in the case where
+ the above function was interrupted and we need to work out
+ what needs to be done for the resumption. These functions
+ are extern so no need for 'addr' global variables */
+void _______VVVVVVVV_after_GuestAMD64_put_rflag_c_VVVVVVVV_______ (void)
+{
+}
+#endif
/*---------------------------------------------------------------*/
/*--- %rflags translation-time function specialisers. ---*/
}
}
+#if defined(VGO_freebsd) || defined(VGO_darwin)
+
+/* see guest_amd64_helpers.c
+ Used in syswrap-main.c / VG_(post_syscall) for signal
+ resumption */
+
+static void _______VVVVVVVV_after_x86g_calculate_eflags_all_WRK_VVVVVVVV_______ (void)
+{
+}
+
+Addr addr_x86g_calculate_eflags_all_WRK = (Addr)x86g_calculate_eflags_all_WRK;
+Addr addr________VVVVVVVV_x86g_calculate_eflags_all_WRK_VVVVVVVV_______ = (Addr)_______VVVVVVVV_after_x86g_calculate_eflags_all_WRK_VVVVVVVV_______;
+#endif
+
/* CALLED FROM GENERATED CODE: CLEAN HELPER */
/* Calculate all the 6 flags from the supplied thunk parameters. */
vex_state->guest_CC_NDEP = 0;
}
+#if defined(VGO_freebsd) || defined(VGO_darwin)
+
+/* Used in syswrap-main.c / VG_(post_syscall) for signal resumption */
+
+void _______VVVVVVVV_after_LibVEX_GuestX86_put_eflag_c_VVVVVVVV_______ (void)
+{
+}
+#endif
+
/*---------------------------------------------------------------*/
/*--- %eflags translation-time function specialisers. ---*/
LibVEX_GuestAMD64_put_rflag_c ( ULong new_carry_flag,
/*MOD*/VexGuestAMD64State* vex_state );
+#if defined(VGO_freebsd) || defined(VGO_darwin)
+void _______VVVVVVVV_after_GuestAMD64_put_rflag_c_VVVVVVVV_______ (void);
+extern Addr addr_amd64g_calculate_rflags_all_WRK;
+extern Addr addr________VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______;
+#endif
+
+
/* Do FXSAVE from the supplied VexGuestAMD64tate structure and store the
result at the given address which represents a buffer of at least 416
bytes. */
LibVEX_GuestX86_put_eflag_c ( UInt new_carry_flag,
/*MOD*/VexGuestX86State* vex_state );
+#if defined(VGO_freebsd) || defined(VGO_darwin)
+extern void _______VVVVVVVV_after_LibVEX_GuestX86_put_eflag_c_VVVVVVVV_______ (void);
+extern Addr addr_x86g_calculate_eflags_all_WRK;
+extern Addr addr________VVVVVVVV_x86g_calculate_eflags_all_WRK_VVVVVVVV_______;
+#endif
+
/* Do x87 save from the supplied VexGuestX86State structure and store the
result at the given address which represents a buffer of at least 108
bytes. */
ML_(blksys_committed_UNIX): .quad MK_L_SCCLASS_N(UNIX,4)
ML_(blksys_finished_UNIX): .quad MK_L_SCCLASS_N(UNIX,5)
-.data
-globl ML_(blksys_saving_cflag)
-ML_(blksys_saving_cflag): .quad 0
-.previous
-
#endif // defined(VGP_amd64_darwin)
/* Let the linker know we don't need an executable stack */
movq %rax, %rdi /* arg1 = new flag */
movq %r11, %rsi /* arg2 = vex state */
addq $24, %rsp /* remove syscall parameters */
- movq $0x1, ML_(blksys_saving_cflag)
call LibVEX_GuestAMD64_put_rflag_c
- movq $0x0, ML_(blksys_saving_cflag)
4: /* Re-block signals. If eip is in [4,5), then the syscall
is complete and we needn't worry about it. */
ML_(blksys_finished): .quad 5b
.previous
- .data
- .globl ML_(blksys_saving_cflag)
- ML_(blksys_saving_cflag): .quad 0
- .previous
-
-
#endif /* defined(VGP_amd64_freebsd) */
/* Let the linker know we don't need an executable stack */
ML_(blksys_committed_UNIX): .long MK_L_SCCLASS_N(UNIX,4)
ML_(blksys_finished_UNIX): .long MK_L_SCCLASS_N(UNIX,5)
-.data
-.globl ML_(blksys_saving_cflag)
-ML_(blksys_saving_cflag): .long 0
-.previous
#endif // defined(VGP_x86_darwin)
/* Let the linker know we don't need an executable stack */
movl $0, 0(%esp)
movb 12(%esp), %al
movb %al, 0(%esp)
- movl $0x1, ML_(blksys_saving_cflag)
call LibVEX_GuestX86_put_eflag_c
- movl $0x0, ML_(blksys_saving_cflag)
addl $12, %esp
4: /* Re-block signals. If eip is in [4,5), then the syscall is
ML_(blksys_finished): .long 5b
.previous
- .data
- .globl ML_(blksys_saving_cflag)
- ML_(blksys_saving_cflag): .long 0
- .previous
-
#endif // defined(VGP_x86_freebsd)
/* Let the linker know we don't need an executable stack */
extern const Addr ML_(blksys_complete);
extern const Addr ML_(blksys_committed);
extern const Addr ML_(blksys_finished);
-#if defined(VGO_freebsd)
- extern const Addr ML_(blksys_saving_cflag);
-#endif
#elif defined(VGO_darwin)
/* Darwin requires extra uglyness */
extern const Addr ML_(blksys_setup_MACH);
extern const Addr ML_(blksys_complete_UNIX);
extern const Addr ML_(blksys_committed_UNIX);
extern const Addr ML_(blksys_finished_UNIX);
- extern const Addr ML_(blksys_saving_cflag);
#elif defined(VGO_solaris)
extern const Addr ML_(blksys_setup);
extern const Addr ML_(blksys_complete);
#if defined(VGO_freebsd) || defined(VGO_darwin)
if (outside_range)
{
- if (ML_(blksys_saving_cflag))
+ /* This is not guaranteed to work since the compiler / link editor
+ could lay out the binary functions in a different order to
+ the source file. However, it seems to work. */
+
+#if defined (VGA_amd64)
+
+ vg_assert((Addr)_______VVVVVVVV_after_GuestAMD64_put_rflag_c_VVVVVVVV_______ >
+ (Addr)LibVEX_GuestAMD64_put_rflag_c );
+
+ vg_assert(addr________VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______ >
+ addr_amd64g_calculate_rflags_all_WRK);
+
+ if ((ip >= (Addr)LibVEX_GuestAMD64_put_rflag_c &&
+ ip < (Addr)_______VVVVVVVV_after_GuestAMD64_put_rflag_c_VVVVVVVV_______) ||
+ (ip >= addr_amd64g_calculate_rflags_all_WRK &&
+ ip < addr________VVVVVVVV_amd64g_calculate_rflags_all_WRK_VVVVVVVV_______))
+#else
+
+ vg_assert((Addr)_______VVVVVVVV_after_LibVEX_GuestX86_put_eflag_c_VVVVVVVV_______ >
+ (Addr)LibVEX_GuestX86_put_eflag_c);
+
+ vg_assert(addr________VVVVVVVV_x86g_calculate_eflags_all_WRK_VVVVVVVV_______>
+ addr_x86g_calculate_eflags_all_WRK);
+
+ if ((ip >= (Addr)LibVEX_GuestX86_put_eflag_c &&
+ ip < (Addr)_______VVVVVVVV_after_LibVEX_GuestX86_put_eflag_c_VVVVVVVV_______) ||
+ (ip >= addr_x86g_calculate_eflags_all_WRK &&
+ ip < addr________VVVVVVVV_x86g_calculate_eflags_all_WRK_VVVVVVVV_______))
+#endif
{
outside_range = False;
in_complete_to_committed = True;