def word_atomic(opcode, syntax, xregs, fregs, imms, symbols):
    tpe = MEM_W
    rand = random.random()
    if (rand < 0.1):
        mask_addr = ['lui xreg2, 0xffe00', 'xor xreg1, xreg1, xreg2']
        xregs.append('xreg2')
    else:
        mask_addr = []
    insts = ((['la xreg1, symbol', 'addi xreg1, xreg1, imm6'] + mask_addr) + [syntax])
    if (opcode in rv64.keys()):
        imms.append(('imm6', 8))
    else:
        imms.append(('imm6', 4))
    symbols.append('symbol')
    return (tpe, insts)
def word_atomic(opcode, syntax, xregs, fregs, imms, symbols):
    tpe = MEM_W
    rand = random.random()
    if (rand < 0.1):
        mask_addr = ['lui xreg2, 0xffe00', 'xor xreg1, xreg1, xreg2']
        xregs.append('xreg2')
    else:
        mask_addr = []
    insts = ((['la xreg1, symbol', 'addi xreg1, xreg1, imm6'] + mask_addr) + [syntax])
    if (opcode in rv64.keys()):
        imms.append(('imm6', 8))
    else:
        imms.append(('imm6', 4))
    symbols.append('symbol')
    return (tpe, insts)