raise exception if permutation set to reserved value
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 3 Nov 2018 15:24:14 +0000 (15:24 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 3 Nov 2018 15:24:14 +0000 (15:24 +0000)
riscv/processor.cc

index f24784bec779b0cf8e35bff0b77251832db5073b..37b762ac69a1b2c7a8a223720de6517d95dcf14d 100644 (file)
@@ -153,6 +153,7 @@ void sv_shape_t::setup_map()
         case SV_SHAPE_PERM_YZX: order[0] = 1; order[1] = 2; order[2] = 0; break;
         case SV_SHAPE_PERM_ZXY: order[0] = 2; order[1] = 0; order[2] = 1; break;
         case SV_SHAPE_PERM_ZYX: order[0] = 2; order[1] = 1; order[2] = 0; break;
+        default: throw trap_illegal_instruction(0);
     }
     for (int i = 0; i < 128; i++)
     {