Bug 511329

Summary: Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK)
Product: [Developer tools] valgrind Reporter: Paul Floyd <pjfloyd>
Component: generalAssignee: Paul Floyd <pjfloyd>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.26 GIT   
Target Milestone: ---   
Platform: Other   
OS: FreeBSD   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Paul Floyd 2025-10-29 16:46:31 UTC
Having implemented two hacky solutions I recently noticed that Solaris does this by passing in a pointer to char, storing the carry flag in that char and then calling LibVEX_GuestAMD64_put_rflag_c(cflag, &tst->arch.vex) after ML_(do_syscall_for_client_WRK)

That's much more elegant.

Needs to be done on FreeBSD amd64 arm64 x86 and Darwin amd64 and x86.
Comment 1 Paul Floyd 2025-10-29 21:17:44 UTC
commit 4fb1e502dbd2a492eb5c9b89151120b8f615840d (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Wed Oct 29 22:09:08 2025 +0100

    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

(plus 2 other commits)