view python/ppci/target/arm/token.py @ 348:442fb043d149

Added log option to zcc
author Windel Bouwman
date Sat, 08 Mar 2014 15:32:33 +0100
parents b4882ff0ed06
children 899ae3aea803
line wrap: on
line source


from ..token import Token, u32, bit_range


class ArmToken(Token):
    def __init__(self):
        super().__init__(32)

    cond = bit_range(28, 32)
    S = bit_range(20, 21)
    Rd = bit_range(12, 16)
    Rn = bit_range(16, 20)

    def encode(self):
        return u32(self.bit_value)