From e2a58934367e16bca62615e8794d056ea586d2e5 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 3 Nov 2018 15:24:14 +0000 Subject: [PATCH] raise exception if permutation set to reserved value --- riscv/processor.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/riscv/processor.cc b/riscv/processor.cc index f24784b..37b762a 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -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++) { -- 2.30.2