def GetLapicTimerDivideFields(reg_val):
    """ Helper function for DoLapicDump that prints the fields of the
        timer divide register.
        Params:
            reg_val: int - the value of the timer divide register
        Returns:   
            string showing the fields
    """
    divide_val = ((reg_val & 0x8) >> 1) | (reg_val & 0x3)
    if divide_val == 0x7:
        divide_by = 1
    else:
        divide_by = 2 << divide_val
    return "[Divide by {:d}]".format(divide_by)