data64.isa (12106:7784fac1b159) data64.isa (12227:130ebc0761ed)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2011-2013, 2016 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

243 if (bits(op1, intWidth - 1))
244 op1 ^= mask(intWidth);
245 Dest64 = (op1 == 0) ? intWidth - 1 : (intWidth - 2 - findMsbSet(op1));
246 ''')
247 buildDataXRegInst("clz", 1, '''
248 Dest64 = (Op164 == 0) ? intWidth : (intWidth - 1 - findMsbSet(Op164));
249 ''')
250 buildDataXRegInst("rbit", 1, '''
1// -*- mode:c++ -*-
2
3// Copyright (c) 2011-2013, 2016 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

243 if (bits(op1, intWidth - 1))
244 op1 ^= mask(intWidth);
245 Dest64 = (op1 == 0) ? intWidth - 1 : (intWidth - 2 - findMsbSet(op1));
246 ''')
247 buildDataXRegInst("clz", 1, '''
248 Dest64 = (Op164 == 0) ? intWidth : (intWidth - 1 - findMsbSet(Op164));
249 ''')
250 buildDataXRegInst("rbit", 1, '''
251 uint64_t result = Op164;
252 uint64_t lBit = 1ULL << (intWidth - 1);
253 uint64_t rBit = 1ULL;
254 while (lBit > rBit) {
255 uint64_t maskBits = lBit | rBit;
256 uint64_t testBits = result & maskBits;
257 // If these bits are different, swap them by toggling them.
258 if (testBits && testBits != maskBits)
259 result ^= maskBits;
260 lBit >>= 1; rBit <<= 1;
261 }
262 Dest64 = result;
251 Dest64 = reverseBits(Op164, intWidth/8);
263 ''')
264 buildDataXRegInst("rev", 1, '''
265 if (intWidth == 32)
266 Dest64 = betole<uint32_t>(Op164);
267 else
268 Dest64 = betole<uint64_t>(Op164);
269 ''')
270 buildDataXRegInst("rev16", 1, '''

--- 210 unchanged lines hidden ---
252 ''')
253 buildDataXRegInst("rev", 1, '''
254 if (intWidth == 32)
255 Dest64 = betole<uint32_t>(Op164);
256 else
257 Dest64 = betole<uint64_t>(Op164);
258 ''')
259 buildDataXRegInst("rev16", 1, '''

--- 210 unchanged lines hidden ---