Deleted Added
sdiff udiff text old ( 11723:0596db108c53 ) new ( 11724:d92c26d481b7 )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2015 RISC-V Foundation
4// Copyright (c) 2016 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

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

145 }
146
147 0x33: decode FUNCT3 {
148 format ROp {
149 0x0: decode FUNCT7 {
150 0x0: add({{
151 Rd = Rs1_sd + Rs2_sd;
152 }});
153 0x20: sub({{
154 Rd = Rs1_sd - Rs2_sd;
155 }});
156 }
157 0x1: decode FUNCT7 {
158 0x0: sll({{
159 Rd = Rs1 << Rs2<5:0>;
160 }});
161 }
162 0x2: decode FUNCT7 {
163 0x0: slt({{
164 Rd = (Rs1_sd < Rs2_sd) ? 1 : 0;
165 }});
166 }
167 0x3: decode FUNCT7 {
168 0x0: sltu({{
169 Rd = (Rs1 < Rs2) ? 1 : 0;
170 }});
171 }
172 0x4: decode FUNCT7 {
173 0x0: xor({{
174 Rd = Rs1 ^ Rs2;
175 }});
176 }
177 0x5: decode FUNCT7 {
178 0x0: srl({{
179 Rd = Rs1 >> Rs2<5:0>;
180 }});
181 0x20: sra({{
182 Rd_sd = Rs1_sd >> Rs2<5:0>;
183 }});
184 }
185 0x6: decode FUNCT7 {
186 0x0: or({{
187 Rd = Rs1 | Rs2;
188 }});
189 }
190 0x7: decode FUNCT7 {
191 0x0: and({{
192 Rd = Rs1 & Rs2;
193 }});
194 }
195 }
196 }
197
198 0x37: UOp::lui({{
199 Rd = (uint64_t)imm;
200 }});
201
202 0x3b: decode FUNCT3 {
203 format ROp {
204 0x0: decode FUNCT7 {
205 0x0: addw({{
206 Rd_sd = Rs1_sw + Rs2_sw;
207 }});
208 0x20: subw({{
209 Rd_sd = Rs1_sw - Rs2_sw;
210 }});
211 }
212 0x1: sllw({{
213 Rd_sd = Rs1_sw << Rs2<4:0>;
214 }});
215 0x5: decode FUNCT7 {
216 0x0: srlw({{
217 Rd_uw = Rs1_uw >> Rs2<4:0>;
218 }});
219 0x20: sraw({{
220 Rd_sd = Rs1_sw >> Rs2<4:0>;
221 }});
222 }
223 }
224 }
225
226 0x63: decode FUNCT3 {
227 format SBOp {
228 0x0: beq({{
229 if (Rs1 == Rs2) {
230 NPC = PC + imm;

--- 102 unchanged lines hidden ---