US 12,379,928 B2
Method and apparatus for rectifying weak memory ordering problem
Di Yu, Shenzhen (CN); Yandong Lv, Shanghai (CN); and Rutao Zhang, Shanghai (CN)
Assigned to Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed by HUAWEI TECHNOLOGIES CO., LTD., Guangdong (CN)
Filed on May 18, 2023, as Appl. No. 18/320,039.
Application 18/320,039 is a continuation of application No. PCT/CN2021/123883, filed on Oct. 14, 2021.
Claims priority of application No. 202011303988.0 (CN), filed on Nov. 19, 2020.
Prior Publication US 2023/0289187 A1, Sep. 14, 2023
Int. Cl. G06F 9/30 (2018.01); G06F 8/41 (2018.01); G06F 9/38 (2018.01)
CPC G06F 9/30192 (2013.01) [G06F 8/458 (2013.01); G06F 9/3004 (2013.01); G06F 9/30087 (2013.01); G06F 9/38 (2013.01); G06F 9/3834 (2013.01); G06F 9/3856 (2023.08); G06F 8/41 (2013.01); G06F 9/3851 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method, wherein the method comprises:
determining a read/write instruction set in to-be-repaired code, wherein the read/write instruction set comprises a read instruction or a write instruction in the to-be-repaired code, and wherein an instruction in the read/write instruction set is used for memory access;
classifying instructions in the read/write instruction set to determine a target instruction; and
inserting a memory barrier instruction between a previous read/write instruction of the target instruction and the target instruction.