diff options
| author | Paul Floyd <pjfloyd@wanadoo.fr> | 2025-10-29 22:09:08 +0100 |
|---|---|---|
| committer | Paul Floyd <pjfloyd@wanadoo.fr> | 2025-10-29 22:16:46 +0100 |
| commit | 4fb1e502dbd2a492eb5c9b89151120b8f615840d (patch) | |
| tree | ce6456babac3b5dc816e5ed277267541ece7be94 | |
| parent | Bug 511329 - Darwin and FreeBSD: Move setting of carry flag out of ML_(do_sys... (diff) | |
Bug 511329 - Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK) part 3
Remove guest_SETC and GENOFFSET
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | VEX/auxprogs/genoffsets.c | 3 | ||||
| -rw-r--r-- | VEX/priv/guest_amd64_helpers.c | 2 | ||||
| -rw-r--r-- | VEX/priv/guest_x86_helpers.c | 2 | ||||
| -rw-r--r-- | VEX/pub/libvex_guest_amd64.h | 5 | ||||
| -rw-r--r-- | VEX/pub/libvex_guest_arm64.h | 8 | ||||
| -rw-r--r-- | VEX/pub/libvex_guest_x86.h | 3 | ||||
| -rw-r--r-- | coregrind/m_syswrap/syswrap-main.c | 12 |
8 files changed, 5 insertions, 32 deletions
| @@ -26,6 +26,8 @@ than mailing the developers (or mailing lists) directly -- bugs that | |||
| 26 | are not entered into bugzilla tend to get forgotten about or ignored. | 26 | are not entered into bugzilla tend to get forgotten about or ignored. |
| 27 | 27 | ||
| 28 | 487055 memcheck/tests/x86-linux/scalar fails running in Docker | 28 | 487055 memcheck/tests/x86-linux/scalar fails running in Docker |
| 29 | 511329 Darwin and FreeBSD: Move setting of carry flag out of | ||
| 30 | ML_(do_syscall_for_client_WRK) | ||
| 29 | 31 | ||
| 30 | To see details of a given bug, visit | 32 | To see details of a given bug, visit |
| 31 | https://bugs.kde.org/show_bug.cgi?id=XXXXXX | 33 | https://bugs.kde.org/show_bug.cgi?id=XXXXXX |
diff --git a/VEX/auxprogs/genoffsets.c b/VEX/auxprogs/genoffsets.c index 07ff09be7d..914dbee747 100644 --- a/VEX/auxprogs/genoffsets.c +++ b/VEX/auxprogs/genoffsets.c | |||
| @@ -98,7 +98,6 @@ void foo ( void ) | |||
| 98 | GENOFFSET(X86,x86,FS); | 98 | GENOFFSET(X86,x86,FS); |
| 99 | GENOFFSET(X86,x86,GS); | 99 | GENOFFSET(X86,x86,GS); |
| 100 | GENOFFSET(X86,x86,SS); | 100 | GENOFFSET(X86,x86,SS); |
| 101 | GENOFFSET(X86,x86,SETC); | ||
| 102 | 101 | ||
| 103 | // amd64 | 102 | // amd64 |
| 104 | GENOFFSET(AMD64,amd64,RAX); | 103 | GENOFFSET(AMD64,amd64,RAX); |
| @@ -118,7 +117,6 @@ void foo ( void ) | |||
| 118 | GENOFFSET(AMD64,amd64,R14); | 117 | GENOFFSET(AMD64,amd64,R14); |
| 119 | GENOFFSET(AMD64,amd64,R15); | 118 | GENOFFSET(AMD64,amd64,R15); |
| 120 | GENOFFSET(AMD64,amd64,RIP); | 119 | GENOFFSET(AMD64,amd64,RIP); |
| 121 | GENOFFSET(AMD64,amd64,SETC); | ||
| 122 | 120 | ||
| 123 | // ppc32 | 121 | // ppc32 |
| 124 | GENOFFSET(PPC32,ppc32,GPR0); | 122 | GENOFFSET(PPC32,ppc32,GPR0); |
| @@ -174,7 +172,6 @@ void foo ( void ) | |||
| 174 | GENOFFSET(ARM64,arm64,X8); | 172 | GENOFFSET(ARM64,arm64,X8); |
| 175 | GENOFFSET(ARM64,arm64,XSP); | 173 | GENOFFSET(ARM64,arm64,XSP); |
| 176 | GENOFFSET(ARM64,arm64,PC); | 174 | GENOFFSET(ARM64,arm64,PC); |
| 177 | GENOFFSET(ARM64,arm64,SETC); | ||
| 178 | 175 | ||
| 179 | // s390x | 176 | // s390x |
| 180 | GENOFFSET(S390X,s390x,r2); | 177 | GENOFFSET(S390X,s390x,r2); |
diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index ca33f7c818..b8fa52460c 100644 --- a/VEX/priv/guest_amd64_helpers.c +++ b/VEX/priv/guest_amd64_helpers.c | |||
| @@ -4820,8 +4820,6 @@ void LibVEX_GuestAMD64_initialise ( /*OUT*/VexGuestAMD64State* vex_state ) | |||
| 4820 | 4820 | ||
| 4821 | vex_state->guest_EMNOTE = EmNote_NONE; | 4821 | vex_state->guest_EMNOTE = EmNote_NONE; |
| 4822 | 4822 | ||
| 4823 | vex_state->guest_SETC = 0; | ||
| 4824 | |||
| 4825 | /* These should not ever be either read or written, but we | 4823 | /* These should not ever be either read or written, but we |
| 4826 | initialise them anyway. */ | 4824 | initialise them anyway. */ |
| 4827 | vex_state->guest_CMSTART = 0; | 4825 | vex_state->guest_CMSTART = 0; |
diff --git a/VEX/priv/guest_x86_helpers.c b/VEX/priv/guest_x86_helpers.c index 90722d7673..f744ff53ee 100644 --- a/VEX/priv/guest_x86_helpers.c +++ b/VEX/priv/guest_x86_helpers.c | |||
| @@ -2914,8 +2914,6 @@ void LibVEX_GuestX86_initialise ( /*OUT*/VexGuestX86State* vex_state ) | |||
| 2914 | vex_state->guest_SC_CLASS = 0; | 2914 | vex_state->guest_SC_CLASS = 0; |
| 2915 | vex_state->guest_IP_AT_SYSCALL = 0; | 2915 | vex_state->guest_IP_AT_SYSCALL = 0; |
| 2916 | 2916 | ||
| 2917 | vex_state->guest_SETC = 0; | ||
| 2918 | |||
| 2919 | vex_state->padding1 = 0; | 2917 | vex_state->padding1 = 0; |
| 2920 | vex_state->padding2 = 0; | 2918 | vex_state->padding2 = 0; |
| 2921 | } | 2919 | } |
diff --git a/VEX/pub/libvex_guest_amd64.h b/VEX/pub/libvex_guest_amd64.h index e96b6b0f3f..1e2ca5dc64 100644 --- a/VEX/pub/libvex_guest_amd64.h +++ b/VEX/pub/libvex_guest_amd64.h | |||
| @@ -131,10 +131,7 @@ typedef | |||
| 131 | 131 | ||
| 132 | /* Emulation notes */ | 132 | /* Emulation notes */ |
| 133 | UInt guest_EMNOTE; | 133 | UInt guest_EMNOTE; |
| 134 | /* Used by Darwin and FreeBSD when setting the carry flag from | 134 | UInt pad2; |
| 135 | * ML_(do_syscall_for_client_WRK). Needed to determine how | ||
| 136 | * to restart interrupted syscalls. */ | ||
| 137 | UInt guest_SETC; | ||
| 138 | 135 | ||
| 139 | /* Translation-invalidation area description. Not used on amd64 | 136 | /* Translation-invalidation area description. Not used on amd64 |
| 140 | (there is no invalidate-icache insn), but needed so as to | 137 | (there is no invalidate-icache insn), but needed so as to |
diff --git a/VEX/pub/libvex_guest_arm64.h b/VEX/pub/libvex_guest_arm64.h index 30317dae65..35b417348e 100644 --- a/VEX/pub/libvex_guest_arm64.h +++ b/VEX/pub/libvex_guest_arm64.h | |||
| @@ -168,18 +168,12 @@ typedef | |||
| 168 | 168 | ||
| 169 | /* Used for FreeBSD syscall dispatching. */ | 169 | /* Used for FreeBSD syscall dispatching. */ |
| 170 | ULong guest_SC_CLASS; | 170 | ULong guest_SC_CLASS; |
| 171 | /* Used for FreeBSD client syscall when putting the carry flag | ||
| 172 | value into VEX. */ | ||
| 173 | UInt guest_SETC; | ||
| 174 | UInt pad_end_0; | ||
| 175 | /* Padding to make it have an 16-aligned size */ | 171 | /* Padding to make it have an 16-aligned size */ |
| 176 | /* UInt pad_end_1; */ | 172 | ULong pad_end_1; |
| 177 | /* ULong pad_end_2; */ | ||
| 178 | 173 | ||
| 179 | } | 174 | } |
| 180 | VexGuestARM64State; | 175 | VexGuestARM64State; |
| 181 | 176 | ||
| 182 | |||
| 183 | /*---------------------------------------------------------------*/ | 177 | /*---------------------------------------------------------------*/ |
| 184 | /*--- Utility functions for ARM64 guest stuff. ---*/ | 178 | /*--- Utility functions for ARM64 guest stuff. ---*/ |
| 185 | /*---------------------------------------------------------------*/ | 179 | /*---------------------------------------------------------------*/ |
diff --git a/VEX/pub/libvex_guest_x86.h b/VEX/pub/libvex_guest_x86.h index 80916a2bab..baf13f402c 100644 --- a/VEX/pub/libvex_guest_x86.h +++ b/VEX/pub/libvex_guest_x86.h | |||
| @@ -219,11 +219,10 @@ typedef | |||
| 219 | been interrupted by a signal. */ | 219 | been interrupted by a signal. */ |
| 220 | UInt guest_IP_AT_SYSCALL; | 220 | UInt guest_IP_AT_SYSCALL; |
| 221 | 221 | ||
| 222 | UInt guest_SETC; | ||
| 223 | |||
| 224 | /* Padding to make it have an 16-aligned size */ | 222 | /* Padding to make it have an 16-aligned size */ |
| 225 | UInt padding1; | 223 | UInt padding1; |
| 226 | UInt padding2; | 224 | UInt padding2; |
| 225 | UInt padding3; | ||
| 227 | } | 226 | } |
| 228 | VexGuestX86State; | 227 | VexGuestX86State; |
| 229 | 228 | ||
diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 64fa3c325b..49c264c40e 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c | |||
| @@ -3355,18 +3355,6 @@ VG_(fixup_guest_state_after_syscall_interrupted)( ThreadId tid, | |||
| 3355 | # error "Unknown OS" | 3355 | # error "Unknown OS" |
| 3356 | # endif | 3356 | # endif |
| 3357 | 3357 | ||
| 3358 | #if defined(VGO_freebsd) || defined(VGO_darwin) | ||
| 3359 | if (outside_range) | ||
| 3360 | { | ||
| 3361 | if (th_regs->vex.guest_SETC) | ||
| 3362 | { | ||
| 3363 | outside_range = False; | ||
| 3364 | in_complete_to_committed = True; | ||
| 3365 | } | ||
| 3366 | } | ||
| 3367 | #endif | ||
| 3368 | |||
| 3369 | |||
| 3370 | /* Figure out what the state of the syscall was by examining the | 3358 | /* Figure out what the state of the syscall was by examining the |
| 3371 | (real) IP at the time of the signal, and act accordingly. */ | 3359 | (real) IP at the time of the signal, and act accordingly. */ |
| 3372 | if (outside_range) { | 3360 | if (outside_range) { |
