misc.isa (7247:e39b1d7c514f) | misc.isa (7249:ddf0cb9f0450) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2010 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 --- 140 unchanged lines hidden (view full) --- 149 ''' 150 revshIop = InstObjParams("revsh", "Revsh", "RevOp", 151 { "code": revshCode, 152 "predicate_test": predicateTest }, []) 153 header_output += RevOpDeclare.subst(revshIop) 154 decoder_output += RevOpConstructor.subst(revshIop) 155 exec_output += PredOpExecute.subst(revshIop) 156 | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2010 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 --- 140 unchanged lines hidden (view full) --- 149 ''' 150 revshIop = InstObjParams("revsh", "Revsh", "RevOp", 151 { "code": revshCode, 152 "predicate_test": predicateTest }, []) 153 header_output += RevOpDeclare.subst(revshIop) 154 decoder_output += RevOpConstructor.subst(revshIop) 155 exec_output += PredOpExecute.subst(revshIop) 156 |
157 rbitCode = ''' 158 uint8_t *opBytes = (uint8_t *)&Op1; 159 uint32_t resTemp; 160 uint8_t *destBytes = (uint8_t *)&resTemp; 161 // This reverses the bytes and bits of the input, or so says the 162 // internet. 163 for (int i = 0; i < 4; i++) { 164 uint32_t temp = opBytes[i]; 165 temp = (temp * 0x0802 & 0x22110) | (temp * 0x8020 & 0x88440); 166 destBytes[3 - i] = (temp * 0x10101) >> 16; 167 } 168 Dest = resTemp; 169 ''' 170 rbitIop = InstObjParams("rbit", "Rbit", "RevOp", 171 { "code": rbitCode, 172 "predicate_test": predicateTest }, []) 173 header_output += RevOpDeclare.subst(rbitIop) 174 decoder_output += RevOpConstructor.subst(rbitIop) 175 exec_output += PredOpExecute.subst(rbitIop) 176 |
|
157 ssatCode = ''' 158 int32_t operand = shift_rm_imm(Op1, shiftAmt, shiftType, 0); 159 int32_t res; 160 if (satInt(res, operand, imm)) 161 CondCodes = CondCodes | (1 << 27); 162 else 163 CondCodes = CondCodes; 164 Dest = res; --- 267 unchanged lines hidden --- | 177 ssatCode = ''' 178 int32_t operand = shift_rm_imm(Op1, shiftAmt, shiftType, 0); 179 int32_t res; 180 if (satInt(res, operand, imm)) 181 CondCodes = CondCodes | (1 << 27); 182 else 183 CondCodes = CondCodes; 184 Dest = res; --- 267 unchanged lines hidden --- |