Esempio n. 1
0
 def create_register_files(self):
     # Each declarative RegisterFiles entry is:
     #   (file_id, register class, valid values)
     #for reg_type, cls, values in self.RegisterFiles:
     #  regs = [cls(value) for value in values]
     #  self._register_files[cls] = spe.RegisterFile(regs, reg_type)
     #  self._reg_type[reg_type] = cls
     self._register_files[reg.TempRegister] = spe.RegisterFile(reg.r, 'r')
     self._register_files[reg.LiteralRegister] = spe.RegisterFile(
         reg.l, 'l')
     self._reg_type['r'] = reg.TempRegister
     self._reg_type['l'] = reg.LiteralRegister
     return
Esempio n. 2
0
    def create_register_files(self):
        # Each declarative RegisterFiles entry is:
        #   (file_id, register class, valid values)
        for reg_type, cls, values in self.RegisterFiles:
            regs = [cls(value, self) for value in values]
            self._register_files[cls] = spe.RegisterFile(regs, reg_type)
            self._reg_type[reg_type] = cls
            for reg in regs:
                reg.code = self

        return
Esempio n. 3
0
 def create_register_files(self):
     self._register_files[GPRegister8] = spe.RegisterFile(gp8_array, "gp8")
     self._register_files[GPRegister16] = spe.RegisterFile(gp16_array, "gp16")
     self._register_files[GPRegister32] = spe.RegisterFile(gp32_array, "gp32")
     self._register_files[GPRegister64] = spe.RegisterFile(gp64_array, "gp64")
     self._register_files[FPRegister] = spe.RegisterFile(st_array, "st")
     self._register_files[MMXRegister] = spe.RegisterFile(mm_array, "mm")
     self._register_files[XMMRegister] = spe.RegisterFile(xmm_array, "xmm")
     self._reg_type["gp8"] = GPRegister8
     self._reg_type["gp16"] = GPRegister16
     self._reg_type["gp32"] = GPRegister32
     self._reg_type["gp64"] = GPRegister64
     self._reg_type["st"] = FPRegister
     self._reg_type["mm"] = MMXRegister
     self._reg_type["xmm"] = XMMRegister