def word_mem_r(opcode, syntax, xregs, fregs, imms, symbols):
    tpe = MEM_R
    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'] + mask_addr) + [syntax])
    symbols.append('symbol')
    return (tpe, insts)
def word_mem_r(opcode, syntax, xregs, fregs, imms, symbols):
    tpe = MEM_R
    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'] + mask_addr) + [syntax])
    symbols.append('symbol')
    return (tpe, insts)