Bug 511329 - Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_client_WRK)
Summary: Darwin and FreeBSD: Move setting of carry flag out of ML_(do_syscall_for_clie...
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.26 GIT
Platform: Other FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-29 16:46 UTC by Paul Floyd
Modified: 2025-10-29 21:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)