From: Paul Floyd Date: Sat, 11 May 2024 18:51:46 +0000 (+0200) Subject: aarch64 dc zva: fix size calculation X-Git-Tag: VALGRIND_3_24_0~145 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76f9e08e48ce4003533d35147012cca7b94ff701;p=thirdparty%2Fvalgrind.git aarch64 dc zva: fix size calculation Cache block size is in words not bytes. --- diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c index d6053e6e3..a5c487717 100644 --- a/VEX/priv/guest_arm64_toIR.c +++ b/VEX/priv/guest_arm64_toIR.c @@ -8004,12 +8004,12 @@ Bool dis_ARM64_branch_etc(/*MB_OUT*/DisResult* dres, UInt insn, /* Round the requested address, in rT, down to the start of the containing block. */ UInt tt = INSN(4,0); - ULong lineszB = 1ULL << archinfo->arm64_cache_block_size; + ULong clearszB = 1UL << (archinfo->arm64_cache_block_size + 2); IRTemp addr = newTemp(Ity_I64); assign( addr, binop( Iop_And64, getIReg64orZR(tt), - mkU64(~(lineszB - 1))) ); - for (ULong o = 0; o < lineszB; o += 8) { + mkU64(~(clearszB - 1))) ); + for (ULong o = 0; o < clearszB; o += 8) { storeLE(binop(Iop_Add64,mkexpr(addr),mkU64(o)), mkU64(0)); } DIP("dc zva, %s\n", nameIReg64orZR(tt));