int.isa (2665:a124942bacb8) int.isa (3953:300d526414e6)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2005 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

108 # rewrite by substituting 'Rb' for 'Rb_or_imm'
109 code = re.sub(r'Rb_or_imm', 'Rb', orig_code)
110 # generate immediate version by substituting 'imm'
111 # note that imm takes no extenstion, so we extend
112 # the regexp to replace any extension as well
113 imm_code = re.sub(r'Rb_or_imm(\.\w+)?', 'imm', orig_code)
114
115 # generate declaration for register version
1// -*- mode:c++ -*-
2
3// Copyright (c) 2003-2005 The Regents of The University of Michigan
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

108 # rewrite by substituting 'Rb' for 'Rb_or_imm'
109 code = re.sub(r'Rb_or_imm', 'Rb', orig_code)
110 # generate immediate version by substituting 'imm'
111 # note that imm takes no extenstion, so we extend
112 # the regexp to replace any extension as well
113 imm_code = re.sub(r'Rb_or_imm(\.\w+)?', 'imm', orig_code)
114
115 # generate declaration for register version
116 cblk = CodeBlock(code)
117 iop = InstObjParams(name, Name, 'AlphaStaticInst', cblk, opt_flags)
116 iop = InstObjParams(name, Name, 'AlphaStaticInst', code, opt_flags)
118 header_output = BasicDeclare.subst(iop)
119 decoder_output = BasicConstructor.subst(iop)
120 exec_output = BasicExecute.subst(iop)
121
122 if uses_imm:
123 # append declaration for imm version
117 header_output = BasicDeclare.subst(iop)
118 decoder_output = BasicConstructor.subst(iop)
119 exec_output = BasicExecute.subst(iop)
120
121 if uses_imm:
122 # append declaration for imm version
124 imm_cblk = CodeBlock(imm_code)
125 imm_iop = InstObjParams(name, Name + 'Imm', 'IntegerImm', imm_cblk,
123 imm_iop = InstObjParams(name, Name + 'Imm', 'IntegerImm', imm_code,
126 opt_flags)
127 header_output += BasicDeclare.subst(imm_iop)
128 decoder_output += BasicConstructor.subst(imm_iop)
129 exec_output += BasicExecute.subst(imm_iop)
130 # decode checks IMM bit to pick correct version
131 decode_block = RegOrImmDecode.subst(iop)
132 else:
133 # no imm version: just check for nop
134 decode_block = OperateNopCheckDecode.subst(iop)
135}};
124 opt_flags)
125 header_output += BasicDeclare.subst(imm_iop)
126 decoder_output += BasicConstructor.subst(imm_iop)
127 exec_output += BasicExecute.subst(imm_iop)
128 # decode checks IMM bit to pick correct version
129 decode_block = RegOrImmDecode.subst(iop)
130 else:
131 # no imm version: just check for nop
132 decode_block = OperateNopCheckDecode.subst(iop)
133}};