git: libnvmm(3): Fix the emulation of REP/REPN prefixes

Aaron LI aly at crater.dragonflybsd.org
Sun Aug 16 22:26:13 PDT 2026


commit 1391cc4ab491c8f18d5b8ad4c94b20298618dc85
Author: Aaron LI <aly at aaronly.me>
Date:   Mon Aug 17 12:42:50 2026 +0800

    libnvmm(3): Fix the emulation of REP/REPN prefixes
    
    - REP applies only to string instructions, so restrict the emulation
      accordingly, and add a unit-test to ensure correctness.
    - REPN applies only to SCAS and CMPS, neither of which we support;
      nevertheless, allow REPN to be used with MOVS/LODS/STOS.
    
    Credit: Maxime Villard (m00nbsd)

Summary of changes:
 lib/libnvmm/libnvmm_x86.c                 | 24 ++++++++++++++++++------
 test/testcases/libnvmm/h_mem_assist.c     |  2 ++
 test/testcases/libnvmm/h_mem_assist_asm.S | 17 ++++++++++++++++-
 3 files changed, 36 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1391cc4ab491c8f18d5b8ad4c94b20298618dc85


-- 
DragonFly BSD source repository


More information about the Commits mailing list