microasm.isa (4605:ffadb6f891a1) microasm.isa (4615:4ee8c5745c5d)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 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:

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

67let {{
68 import sys
69 sys.path[0:0] = ["src/arch/x86/isa/"]
70 from insts import microcode
71 # print microcode
72 from micro_asm import MicroAssembler, Rom_Macroop, Rom
73 mainRom = Rom('main ROM')
74 assembler = MicroAssembler(X86Macroop, microopClasses, mainRom, Rom_Macroop)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 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:

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

67let {{
68 import sys
69 sys.path[0:0] = ["src/arch/x86/isa/"]
70 from insts import microcode
71 # print microcode
72 from micro_asm import MicroAssembler, Rom_Macroop, Rom
73 mainRom = Rom('main ROM')
74 assembler = MicroAssembler(X86Macroop, microopClasses, mainRom, Rom_Macroop)
75 # Add in symbols for the microcode registers
76 for num in range(15):
77 assembler.symbols["t%d" % num] = "NUM_INTREGS+%d" % num
78 # Add in symbols for the segment descriptor registers
79 for letter in ("C", "D", "E", "F", "G", "S"):
80 assembler.symbols["%ss" % letter.lower()] = "SEGMENT_REG_%sS" % letter
81 # Miscellaneous symbols
82 symbols = {
83 "reg" : "env.reg",
84 "regm" : "env.regm",
85 "imm" : "IMMEDIATE",
86 "disp" : "DISPLACEMENT",
87 "scale" : "env.scale",
88 "index" : "env.index",
89 "base" : "env.base",
90 "dsz" : "env.dataSize",
91 "osz" : "env.operandSize",
92 "ssz" : "env.stackSize"
93 }
94 assembler.symbols.update(symbols)
95
96 # Code literal which forces a default 64 bit operand size in 64 bit mode.
97 assembler.symbols["oszIn64Override"] = '''
98 if (machInst.mode.submode == SixtyFourBitMode &&
99 env.dataSize == 4)
100 env.dataSize = 8;
101 '''
102
75 macroopDict = assembler.assemble(microcode)
76}};
103 macroopDict = assembler.assemble(microcode)
104}};