pred_inst.hh (7143:c81f34f9e075) pred_inst.hh (7328:f45289e4f2f4)
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

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

72 (bigData << 16) | (bigData << 24);
73 }
74 }
75 bigCtrl = (bigCtrl << 1) | ((bigData >> 7) & 0x1);
76 bigData |= (1 << 7);
77 return bigData << (32 - bigCtrl);
78}
79
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

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

72 (bigData << 16) | (bigData << 24);
73 }
74 }
75 bigCtrl = (bigCtrl << 1) | ((bigData >> 7) & 0x1);
76 bigData |= (1 << 7);
77 return bigData << (32 - bigCtrl);
78}
79
80static inline uint64_t
81simd_modified_imm(bool op, uint8_t cmode, uint8_t data)
82{
83 uint64_t bigData = data;
84 switch (cmode) {
85 case 0x0:
86 case 0x1:
87 bigData = (bigData << 0) | (bigData << 32);
88 break;
89 case 0x2:
90 case 0x3:
91 bigData = (bigData << 8) | (bigData << 40);
92 break;
93 case 0x4:
94 case 0x5:
95 bigData = (bigData << 16) | (bigData << 48);
96 break;
97 case 0x6:
98 case 0x7:
99 bigData = (bigData << 24) | (bigData << 56);
100 break;
101 case 0x8:
102 case 0x9:
103 bigData = (bigData << 0) | (bigData << 16) |
104 (bigData << 32) | (bigData << 48);
105 break;
106 case 0xa:
107 case 0xb:
108 bigData = (bigData << 8) | (bigData << 24) |
109 (bigData << 40) | (bigData << 56);
110 break;
111 case 0xc:
112 bigData = (0xffULL << 0) | (bigData << 8) |
113 (0xffULL << 32) | (bigData << 40);
114 break;
115 case 0xd:
116 bigData = (0xffffULL << 0) | (bigData << 16) |
117 (0xffffULL << 32) | (bigData << 48);
118 break;
119 case 0xe:
120 if (op) {
121 bigData = (bigData << 0) | (bigData << 8) |
122 (bigData << 16) | (bigData << 24) |
123 (bigData << 32) | (bigData << 40) |
124 (bigData << 48) | (bigData << 56);
125 } else {
126 bigData = 0;
127 for (int i = 7; i >= 0; i--) {
128 if (bits(data, i)) {
129 bigData |= (0xFF << (i * 8));
130 }
131 }
132 }
133 case 0xf:
134 if (!op) {
135 uint64_t bVal = bits(bigData, 6) ? (0x1F) : (0x20);
136 bigData = (bits(bigData, 5, 0) << 19) |
137 (bVal << 25) | (bits(bigData, 7) << 31);
138 bigData |= (bigData << 32);
139 }
140 // Fall through
141 default:
142 panic("Illegal modified SIMD immediate parameters.\n");
143 }
144 return bigData;
145}
80
146
147
81/**
82 * Base class for predicated integer operations.
83 */
84class PredOp : public ArmStaticInst
85{
86 protected:
87
88 ConditionCode condCode;

--- 160 unchanged lines hidden ---
148/**
149 * Base class for predicated integer operations.
150 */
151class PredOp : public ArmStaticInst
152{
153 protected:
154
155 ConditionCode condCode;

--- 160 unchanged lines hidden ---