1// -*- mode:c++ -*- 2 3// Copyright (c) 2007-2008 The Hewlett-Packard Development Company 4// All rights reserved. 5// 6// Redistribution and use of this software in source and binary forms, 7// with or without modification, are permitted provided that the 8// following conditions are met: --- 50 unchanged lines hidden (view full) --- 59//These are python representations of static insts which stand on their own 60//and make up an internal instruction set. They are used by the micro 61//assembler. 62##include "microops/microops.isa" 63 64//Include code to build macroops in both C++ and python. 65##include "macroop.isa" 66 |
67//Include code to fill out the microcode ROM in both C++ and python. 68##include "rom.isa" 69 |
70let {{ 71 import sys 72 sys.path[0:0] = ["src/arch/x86/isa/"] 73 from insts import microcode 74 # print microcode |
75 from micro_asm import MicroAssembler, Rom_Macroop 76 mainRom = X86MicrocodeRom('main ROM') |
77 assembler = MicroAssembler(X86Macroop, microopClasses, mainRom, Rom_Macroop) 78 # Add in symbols for the microcode registers 79 for num in range(15): 80 assembler.symbols["t%d" % num] = "NUM_INTREGS+%d" % num 81 for num in range(7): 82 assembler.symbols["ufp%d" % num] = "FLOATREG_MICROFP(%d)" % num 83 # Add in symbols for the segment descriptor registers 84 for letter in ("C", "D", "E", "F", "G", "S"): --- 99 unchanged lines hidden (view full) --- 184 assembler.symbols["label"] = labeler 185 186 def stack_index(index): 187 return "(NUM_FLOATREGS + (((%s) + 8) %% 8))" % index 188 189 assembler.symbols["st"] = stack_index 190 191 macroopDict = assembler.assemble(microcode) |
192 193 decoder_output += mainRom.getDefinition() 194 header_output += mainRom.getDeclaration() |
195}}; |