misc.isa (12106:7784fac1b159) misc.isa (12227:130ebc0761ed)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010-2013,2017 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

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

324 revshIop = InstObjParams("revsh", "Revsh", "RegRegOp",
325 { "code": revshCode,
326 "predicate_test": predicateTest }, [])
327 header_output += RegRegOpDeclare.subst(revshIop)
328 decoder_output += RegRegOpConstructor.subst(revshIop)
329 exec_output += PredOpExecute.subst(revshIop)
330
331 rbitCode = '''
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010-2013,2017 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

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

324 revshIop = InstObjParams("revsh", "Revsh", "RegRegOp",
325 { "code": revshCode,
326 "predicate_test": predicateTest }, [])
327 header_output += RegRegOpDeclare.subst(revshIop)
328 decoder_output += RegRegOpConstructor.subst(revshIop)
329 exec_output += PredOpExecute.subst(revshIop)
330
331 rbitCode = '''
332 uint8_t *opBytes = (uint8_t *)&Op1;
333 uint32_t resTemp;
334 uint8_t *destBytes = (uint8_t *)&resTemp;
335 // This reverses the bytes and bits of the input, or so says the
336 // internet.
337 for (int i = 0; i < 4; i++) {
338 uint32_t temp = opBytes[i];
339 temp = (temp * 0x0802 & 0x22110) | (temp * 0x8020 & 0x88440);
340 destBytes[3 - i] = (temp * 0x10101) >> 16;
341 }
342 Dest = resTemp;
332 Dest = reverseBits(Op1);
343 '''
344 rbitIop = InstObjParams("rbit", "Rbit", "RegRegOp",
345 { "code": rbitCode,
346 "predicate_test": predicateTest }, [])
347 header_output += RegRegOpDeclare.subst(rbitIop)
348 decoder_output += RegRegOpConstructor.subst(rbitIop)
349 exec_output += PredOpExecute.subst(rbitIop)
350

--- 777 unchanged lines hidden ---
333 '''
334 rbitIop = InstObjParams("rbit", "Rbit", "RegRegOp",
335 { "code": rbitCode,
336 "predicate_test": predicateTest }, [])
337 header_output += RegRegOpDeclare.subst(rbitIop)
338 decoder_output += RegRegOpConstructor.subst(rbitIop)
339 exec_output += PredOpExecute.subst(rbitIop)
340

--- 777 unchanged lines hidden ---