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

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

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)
81simd_modified_imm(bool op, uint8_t cmode, uint8_t data, bool &immValid)
82{
83 uint64_t bigData = data;
84 immValid = true;
85 switch (cmode) {
86 case 0x0:
87 case 0x1:
88 bigData = (bigData << 0) | (bigData << 32);
89 break;
90 case 0x2:
91 case 0x3:
92 bigData = (bigData << 8) | (bigData << 40);

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

135 case 0xf:
136 if (!op) {
137 uint64_t bVal = bits(bigData, 6) ? (0x1F) : (0x20);
138 bigData = (bits(bigData, 5, 0) << 19) |
139 (bVal << 25) | (bits(bigData, 7) << 31);
140 bigData |= (bigData << 32);
141 break;
142 }
142 // Fall through
143 // Fall through, immediate encoding is invalid.
144 default:
144 panic("Illegal modified SIMD immediate parameters.\n");
145 immValid = false;
146 break;
147 }
148 return bigData;
149}
150
151static inline uint64_t
152vfp_modified_imm(uint8_t data, bool wide)
153{
154 uint64_t bigData = data;

--- 195 unchanged lines hidden ---