Commit ebc2baf
feat(riscv): complete RVF/RVD floating-point extensions with RV64 conversions
This commit fully implements RISC-V floating-point instruction support to
achieve parity with Capstone disassembly engine.
Changes:
1. Add missing RV64-specific conversion instructions in RVF extension:
- fcvt.l.s / fcvt.lu.s: single-precision float to 64-bit integer
- fcvt.s.l / fcvt.s.lu: 64-bit integer to single-precision float
2. Fix endianness handling:
- Correct RISC-V architecture endianness to Little-endian
(was incorrectly set to Big-endian)
- Update test cases to match correct byte order
3. Improve extension matching logic:
- RVF extension returns None for fmt=01 (double-precision),
allowing RVD extension to handle it
- Ensures proper routing of single/double-precision instructions
4. Correct test case encodings:
- Update hexadecimal encodings in riscv64/test_cases.txt
for floating-point instructions
- All 17 floating-point instruction test cases now decode correctly
Test results:
- All unit tests pass (57 passed)
- All floating-point instruction tests pass (17/17, 100% success)
- Build succeeds (both debug and release)
Robustone now has complete RISC-V floating-point extension support
matching Capstone's capabilities.1 parent b63b833 commit ebc2baf
File tree
3 files changed
+58
-24
lines changed- robustone-core/src
- riscv/extensions
- utils
- test/architectures/riscv64
3 files changed
+58
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 228 | + | |
| 229 | + | |
232 | 230 | | |
233 | 231 | | |
234 | 232 | | |
| |||
248 | 246 | | |
249 | 247 | | |
250 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
251 | 267 | | |
252 | 268 | | |
253 | 269 | | |
| |||
263 | 279 | | |
264 | 280 | | |
265 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
266 | 300 | | |
267 | 301 | | |
268 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments