static_inst.cc (7142:c63c06703d0f) static_inst.cc (7145:a71ac505d83b)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

200 ccprintf(std::cerr, "Unhandled shift type\n");
201 exit(1);
202 break;
203 }
204 return 0;
205}
206
207
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

200 ccprintf(std::cerr, "Unhandled shift type\n");
201 exit(1);
202 break;
203 }
204 return 0;
205}
206
207
208// Generate the appropriate carry bit for an addition operation
209bool
210ArmStaticInstBase::arm_add_carry(int32_t result, int32_t lhs, int32_t rhs) const
211{
212 return findCarry(32, result, lhs, rhs);
213}
214
215// Generate the appropriate carry bit for a subtraction operation
216bool
217ArmStaticInstBase::arm_sub_carry(int32_t result, int32_t lhs, int32_t rhs) const
218{
219 return findCarry(32, result, lhs, ~rhs);
220}
221
222bool
223ArmStaticInstBase::arm_add_overflow(int32_t result, int32_t lhs, int32_t rhs) const
224{
225 return findOverflow(32, result, lhs, rhs);
226}
227
228bool
229ArmStaticInstBase::arm_sub_overflow(int32_t result, int32_t lhs, int32_t rhs) const
230{
231 return findOverflow(32, result, lhs, ~rhs);
232}
233
234void
235ArmStaticInstBase::printReg(std::ostream &os, int reg) const
236{
237 if (reg < FP_Base_DepTag) {
238 switch (reg) {
239 case PCReg:
240 ccprintf(os, "pc");
241 break;

--- 211 unchanged lines hidden ---
208void
209ArmStaticInstBase::printReg(std::ostream &os, int reg) const
210{
211 if (reg < FP_Base_DepTag) {
212 switch (reg) {
213 case PCReg:
214 ccprintf(os, "pc");
215 break;

--- 211 unchanged lines hidden ---