]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: Remove invalid asserts in s390_amode_bx...
authorFlorian Krohm <flo2030@eich-krohm.de>
Sun, 28 Jun 2026 08:15:15 +0000 (08:15 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Sun, 28 Jun 2026 08:23:16 +0000 (08:23 +0000)
Amodes are constructed before registers are allocated. This means
that registers passed in to the amode constructors are typically
virtual and thusly have a 0 register number. So these asserts would fire.
This has not surfaced yet because currently no BX12 and BX20 amodes
are being constructed.
Constructing BX12 and BX20 amodes wouldn't be a bad thing. So I'm
not removing those functions.

VEX/priv/host_s390_defs.c

index e2440095c144ae485a4742c806640301f7134a39..e398987600546fd763e38a61939b8a59cdd41894 100644 (file)
@@ -217,8 +217,6 @@ s390_amode_bx12(Int d, HReg b, HReg x)
    s390_amode *am = LibVEX_Alloc_inline(sizeof(s390_amode));
 
    vassert(fits_unsigned_12bit(d));
-   vassert(hregNumber(b) != 0);
-   vassert(hregNumber(x) != 0);
 
    am->tag = S390_AMODE_BX12;
    am->d = d;
@@ -236,8 +234,6 @@ s390_amode_bx20(Int d, HReg b, HReg x)
    s390_amode *am = LibVEX_Alloc_inline(sizeof(s390_amode));
 
    vassert(fits_signed_20bit(d));
-   vassert(hregNumber(b) != 0);
-   vassert(hregNumber(x) != 0);
 
    am->tag = S390_AMODE_BX20;
    am->d = d;