decoder.isa (12445:cda4ad06d1ff) | decoder.isa (12535:22fe7cd9a852) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2017 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 198 unchanged lines hidden (view full) --- 207 CJUMPIMM<5:5> << 6 | 208 CJUMPIMM<4:4> << 7 | 209 CJUMPIMM<8:7> << 8 | 210 CJUMPIMM<6:6> << 10; 211 if (CJUMPIMM<10:10> > 0) 212 offset |= ~((int64_t)0x7FF); 213 NPC = PC + offset; 214 }}, IsIndirectControl, IsUncondControl, IsCall); | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2015 RISC-V Foundation 4// Copyright (c) 2017 The University of Virginia 5// All rights reserved. 6// 7// Redistribution and use in source and binary forms, with or without 8// modification, are permitted provided that the following conditions are --- 198 unchanged lines hidden (view full) --- 207 CJUMPIMM<5:5> << 6 | 208 CJUMPIMM<4:4> << 7 | 209 CJUMPIMM<8:7> << 8 | 210 CJUMPIMM<6:6> << 10; 211 if (CJUMPIMM<10:10> > 0) 212 offset |= ~((int64_t)0x7FF); 213 NPC = PC + offset; 214 }}, IsIndirectControl, IsUncondControl, IsCall); |
215 format BOp { | 215 format CBOp { |
216 0x6: c_beqz({{ | 216 0x6: c_beqz({{ |
217 int64_t offset = CIMM5<2:1> << 1 | 218 CIMM3<1:0> << 3 | 219 CIMM5<0:0> << 5 | 220 CIMM5<4:3> << 6; 221 if (CIMM3<2:2> > 0) 222 offset |= ~((int64_t)0xFF); 223 | |
224 if (Rp1 == 0) | 217 if (Rp1 == 0) |
225 NPC = PC + offset; | 218 NPC = PC + imm; |
226 else 227 NPC = NPC; 228 }}, IsDirectControl, IsCondControl); 229 0x7: c_bnez({{ | 219 else 220 NPC = NPC; 221 }}, IsDirectControl, IsCondControl); 222 0x7: c_bnez({{ |
230 int64_t offset = CIMM5<2:1> << 1 | 231 CIMM3<1:0> << 3 | 232 CIMM5<0:0> << 5 | 233 CIMM5<4:3> << 6; 234 if (CIMM3<2:2> > 0) 235 offset |= ~((int64_t)0xFF); 236 | |
237 if (Rp1 != 0) | 223 if (Rp1 != 0) |
238 NPC = PC + offset; | 224 NPC = PC + imm; |
239 else 240 NPC = NPC; 241 }}, IsDirectControl, IsCondControl); 242 } 243 } 244 0x2: decode COPCODE { 245 0x0: CIOp::c_slli({{ 246 imm = CIMM5 | (CIMM1 << 5); --- 1465 unchanged lines hidden --- | 225 else 226 NPC = NPC; 227 }}, IsDirectControl, IsCondControl); 228 } 229 } 230 0x2: decode COPCODE { 231 0x0: CIOp::c_slli({{ 232 imm = CIMM5 | (CIMM1 << 5); --- 1465 unchanged lines hidden --- |