From c14955180925ced1e26d9f59cefc1d733ed22821 Mon Sep 17 00:00:00 2001 From: Liu Yu Date: Mon, 16 Aug 2021 19:00:06 +0800 Subject: [PATCH] [mips64][compiler] Fix kAtomicLoadWord32 Allows atomic loading of an unsigned 32bit value from 64bit widths. Bug: v8:12093 Change-Id: Ib6ca2f3f44d4e82e5e41bf1ca0494e48ca90a21a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3096888 Reviewed-by: Zhao Jiazhong Commit-Queue: Zhao Jiazhong Auto-Submit: Liu yu Cr-Commit-Position: refs/heads/master@{#76307} --- src/compiler/backend/mips64/code-generator-mips64.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/backend/mips64/code-generator-mips64.cc b/src/compiler/backend/mips64/code-generator-mips64.cc index 0c6f8becfa..081bbfe677 100644 --- a/src/compiler/backend/mips64/code-generator-mips64.cc +++ b/src/compiler/backend/mips64/code-generator-mips64.cc @@ -1883,7 +1883,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( ASSEMBLE_ATOMIC_LOAD_INTEGER(Lhu); break; case kAtomicLoadWord32: - ASSEMBLE_ATOMIC_LOAD_INTEGER(Lw); + if (AtomicWidthField::decode(opcode) == AtomicWidth::kWord32) + ASSEMBLE_ATOMIC_LOAD_INTEGER(Lw); + else + ASSEMBLE_ATOMIC_LOAD_INTEGER(Lwu); break; case kMips64Word64AtomicLoadUint64: ASSEMBLE_ATOMIC_LOAD_INTEGER(Ld);