microasm.isa (5682:6f1cab082ba7) microasm.isa (5854:f58bee925c28)
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:

--- 62 unchanged lines hidden (view full) ---

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
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:

--- 62 unchanged lines hidden (view full) ---

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):
79 for num in range(16):
80 assembler.symbols["t%d" % num] = "NUM_INTREGS+%d" % num
80 assembler.symbols["t%d" % num] = "NUM_INTREGS+%d" % num
81 for num in range(7):
81 for num in range(8):
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", "H", "S"):
85 assembler.symbols["%ss" % letter.lower()] = "SEGMENT_REG_%sS" % letter
86
87 # Add in symbols for the various checks of segment selectors.
88 for check in ("NoCheck", "CSCheck", "CallGateCheck", "IntGateCheck",
89 "SSCheck", "IretCheck", "IntCSCheck"):

--- 45 unchanged lines hidden (view full) ---

135 assembler.symbols["intseg"] = "SEGMENT_REG_MS"
136 # This segment always has base 0, and doesn't imply any special handling
137 # like the internal segment above
138 assembler.symbols["flatseg"] = "SEGMENT_REG_LS"
139
140 for reg in ('ax', 'bx', 'cx', 'dx', 'sp', 'bp', 'si', 'di'):
141 assembler.symbols["r%s" % reg] = "INTREG_R%s" % reg.upper()
142
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", "H", "S"):
85 assembler.symbols["%ss" % letter.lower()] = "SEGMENT_REG_%sS" % letter
86
87 # Add in symbols for the various checks of segment selectors.
88 for check in ("NoCheck", "CSCheck", "CallGateCheck", "IntGateCheck",
89 "SSCheck", "IretCheck", "IntCSCheck"):

--- 45 unchanged lines hidden (view full) ---

135 assembler.symbols["intseg"] = "SEGMENT_REG_MS"
136 # This segment always has base 0, and doesn't imply any special handling
137 # like the internal segment above
138 assembler.symbols["flatseg"] = "SEGMENT_REG_LS"
139
140 for reg in ('ax', 'bx', 'cx', 'dx', 'sp', 'bp', 'si', 'di'):
141 assembler.symbols["r%s" % reg] = "INTREG_R%s" % reg.upper()
142
143 for reg in range(15):
143 for reg in range(16):
144 assembler.symbols["cr%d" % reg] = "MISCREG_CR%d" % reg
145
146 for flag in ('CF', 'PF', 'ECF', 'AF', 'EZF', 'ZF', 'SF', 'OF', \
147 'TF', 'IF', 'NT', 'RF', 'VM', 'AC', 'VIF', 'VIP', 'ID'):
148 assembler.symbols[flag] = flag + "Bit"
149
150 for cond in ('True', 'False', 'ECF', 'EZF', 'SZnZF',
151 'MSTRZ', 'STRZ', 'MSTRC',

--- 59 unchanged lines hidden ---
144 assembler.symbols["cr%d" % reg] = "MISCREG_CR%d" % reg
145
146 for flag in ('CF', 'PF', 'ECF', 'AF', 'EZF', 'ZF', 'SF', 'OF', \
147 'TF', 'IF', 'NT', 'RF', 'VM', 'AC', 'VIF', 'VIP', 'ID'):
148 assembler.symbols[flag] = flag + "Bit"
149
150 for cond in ('True', 'False', 'ECF', 'EZF', 'SZnZF',
151 'MSTRZ', 'STRZ', 'MSTRC',

--- 59 unchanged lines hidden ---