Deleted Added
sdiff udiff text old ( 6273:e46f6767b2c0 ) new ( 6276:11dab30a70e8 )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007-2008 The Florida State University
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

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

96 DPRINTF(Arm, "in = %%d\\n", _in);
97 DPRINTF(Arm, "iz = %%d\\n", _iz);
98 DPRINTF(Arm, "ic = %%d\\n", _ic);
99 DPRINTF(Arm, "iv = %%d\\n", _iv);
100 '''
101
102}};
103
104def format DataOp(code, icValue = {{ }},
105 ivValue = {{ Cpsr<28:> }}) {{
106 regCode = '''uint32_t op2 = shift_rm_rs(Rm, Rs,
107 shift, Cpsr<29:0>);
108 op2 = op2;''' + code
109 immCode = '''uint32_t op2 = shift_rm_imm(Rm, shift_size,
110 shift, Cpsr<29:0>);
111 op2 = op2;''' + code
112 if icValue == " ":
113 icValueReg = 'shift_carry_rs(Rm, Rs, shift, Cpsr<29:>)'
114 icValueImm = 'shift_carry_imm(Rm, shift_size, shift, Cpsr<29:>)'
115 else:
116 icValueReg = icValue
117 icValueImm = icValue
118 regCcCode = calcCcCode % {"icValue" : icValueReg,
119 "ivValue" : ivValue}
120 immCcCode = calcCcCode % {"icValue" : icValueImm,
121 "ivValue" : ivValue}
122 regIop = InstObjParams(name, Name, 'PredIntOp',
123 {"code": regCode,
124 "predicate_test": predicateTest})
125 immIop = InstObjParams(name, Name + "Imm", 'PredIntOp',
126 {"code": immCode,
127 "predicate_test": predicateTest})
128 regCcIop = InstObjParams(name, Name + "Cc", 'PredIntOp',
129 {"code": regCode + regCcCode,

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

141 BasicConstructor.subst(immCcIop)
142 exec_output = PredOpExecute.subst(regIop) + \
143 PredOpExecute.subst(immIop) + \
144 PredOpExecute.subst(regCcIop) + \
145 PredOpExecute.subst(immCcIop)
146 decode_block = DataDecode.subst(regIop)
147}};
148
149def format DataImmOp(code,
150 icValue = {{ (rotate ? rotated_carry:Cpsr<29:>) }},
151 ivValue = {{ Cpsr<28:> }}) {{
152 code += "resTemp = resTemp;"
153 iop = InstObjParams(name, Name, 'PredImmOp',
154 {"code": code,
155 "predicate_test": predicateTest})
156 ccIop = InstObjParams(name, Name + "Cc", 'PredImmOp',
157 {"code": code + calcCcCode % vars(),
158 "predicate_test": predicateTest})
159 header_output = BasicDeclare.subst(iop) + \
160 BasicDeclare.subst(ccIop)
161 decoder_output = BasicConstructor.subst(iop) + \
162 BasicConstructor.subst(ccIop)
163 exec_output = PredOpExecute.subst(iop) + \
164 PredOpExecute.subst(ccIop)
165 decode_block = DataImmDecode.subst(iop)

--- 65 unchanged lines hidden ---