diff options
| -rw-r--r-- | src/gen_lib/prompt.lem | 5 | ||||
| -rw-r--r-- | src/gen_lib/sail_values.lem | 21 | ||||
| -rw-r--r-- | src/gen_lib/state.lem | 4 | ||||
| -rw-r--r-- | src/pretty_print.ml | 11 | ||||
| -rw-r--r-- | src/process_file.ml | 4 | ||||
| -rw-r--r-- | src/rewriter.ml | 1 | ||||
| -rw-r--r-- | src/test/power.sail | 7206 |
7 files changed, 534 insertions, 6718 deletions
diff --git a/src/gen_lib/prompt.lem b/src/gen_lib/prompt.lem index 3efdd163..6fa406b8 100644 --- a/src/gen_lib/prompt.lem +++ b/src/gen_lib/prompt.lem @@ -136,6 +136,9 @@ let return a = Done a val (>>=) : forall 'a 'b. M 'a -> ('a -> M 'b) -> M 'b val (>>>) : forall 'a 'b 'c. ('a -> M 'b) -> ('b -> M 'c) -> ('a -> M 'c) +val (>>) : forall 'b. M unit -> (unit -> M 'b) -> M 'b +let (>>) m n = m >>= fun _ -> n + let rec (>>=) m f = match m with | Done a -> f a | Read_mem rk addr sz rs k -> Read_mem rk addr sz rs (fun v -> (k v) >>= f) @@ -153,8 +156,6 @@ let rec (>>=) m f = match m with val exit : forall 'a 'e. 'e -> M 'a let exit _ = Escape -let (>>) m n = m >>= fun _ -> n - val byte_chunks : forall 'a. nat -> list 'a -> list (list 'a) let rec byte_chunks n list = match (n,list) with | (0,_) -> [] diff --git a/src/gen_lib/sail_values.lem b/src/gen_lib/sail_values.lem index fa2afe23..c78a6cdf 100644 --- a/src/gen_lib/sail_values.lem +++ b/src/gen_lib/sail_values.lem @@ -69,6 +69,8 @@ let unsigned (V bs _ _ as v) : integer = fst (List.foldl (fun (acc,exp) b -> (acc + (if b = I then integerPow 2 exp else 0),exp +1)) (0,0) bs) +let unsigned_big = unsigned + let signed v : integer = match most_significant v with | I -> 0 - (1 + (unsigned (bitwise_not v))) @@ -76,6 +78,8 @@ let signed v : integer = | _ -> failwith "signed applied to vector with undefined bits" end +let signed_big = signed + let to_num sign = if sign then signed else unsigned let max_64u = (integerPow 2 64) - 1 @@ -137,6 +141,8 @@ let to_vec is_inc ((len : integer),(n : integer)) = let (V bs start is_inc) = bitwise_not (V abs_bs start is_inc) in V (add_one_bit bs false (len-1)) start is_inc +let to_vec_big = to_vec + let to_vec_inc = to_vec true let to_vec_dec = to_vec false @@ -146,6 +152,13 @@ let to_vec_undef is_inc (len : integer) = let to_vec_inc_undef = to_vec_undef true let to_vec_dec_undef = to_vec_undef false +let get_dir (V _ _ ord) = ord + +let exts (len, vec) = to_vec (get_dir vec) (len,signed vec) +let extz (len, vec) = to_vec (get_dir vec) (len,unsigned vec) + +let exts_big (len, vec) = to_vec_big (get_dir vec) (len, signed_big vec) +let extz_big (len, vec) = to_vec_big (get_dir vec) (len, unsigned_big vec) let add = integerAdd let add_signed = integerAdd @@ -444,14 +457,6 @@ let neq_range_vec (l,r) = bitwise_not_bit (eq_range_vec (l,r)) (* temporarily *) val neq : forall 'a 'b. 'a * 'b -> bit let neq _ = O - - -let EXTS (v1,(V _ _ is_inc as v)) = - to_vec is_inc (v1,signed v) - -let EXTZ = EXTS - -let exts = EXTS val make_indexed_vector_reg : list (integer * register) -> maybe register -> integer -> integer -> vector register diff --git a/src/gen_lib/state.lem b/src/gen_lib/state.lem index 983d14c6..610bcc7d 100644 --- a/src/gen_lib/state.lem +++ b/src/gen_lib/state.lem @@ -30,12 +30,12 @@ let bind m f s = match m s with | (Right error,s') -> (Right error,s') end -val exit : forall 's 'e. 'e -> State 's 'e unit +val exit : forall 's 'e 'a. 'e -> State 's 'e 'a let exit e s = (Right e,s) let (>>=) = bind -val (>>): forall 's 'e 'a 'b. State 's 'e 'a -> State 's 'e 'b -> State 's 'e 'b +val (>>): forall 's 'e 'b. State 's 'e unit -> State 's 'e 'b -> State 's 'e 'b let (>>) m n = m >>= fun _ -> n val read_writeEA : forall 'e. unit -> State state 'e (integer * integer) diff --git a/src/pretty_print.ml b/src/pretty_print.ml index 88b2b0e2..d81ad23c 100644 --- a/src/pretty_print.ml +++ b/src/pretty_print.ml @@ -2161,7 +2161,7 @@ let doc_lit_lem in_pat (L_aux(lit,l)) a = | Tabbrev ({t = Tid "bit"},_) -> "Undef" | Tapp ("register",_) | Tabbrev ({t = Tapp ("register",_)},_) -> "UndefinedReg 0" - | _ -> raise (Reporting_basic.err_unreachable l "undefined value of unsupported type")) + | _ -> "(failwith \"undefined value of unsupported type\")") | L_string s -> "\"" ^ s ^ "\"") (* typ_doc is the doc for the type being quantified *) @@ -2302,8 +2302,10 @@ let doc_exp_lem, doc_let_lem = if aexp_needed then parens (align epp) else epp | E_for(id,exp1,exp2,exp3,(Ord_aux(order,_)),exp4) -> failwith "E_for should have been removed till now" - | E_let(leb,e) -> let_exp (regs,regtypes) leb ^^ space ^^ string "in" ^/^ - top_exp (regs,regtypes) false e + | E_let(leb,e) -> + let epp = let_exp (regs,regtypes) leb ^^ space ^^ string "in" ^/^ + top_exp (regs,regtypes) false e in + if aexp_needed then parens epp else epp | E_app(f,args) -> (match f with (* temporary hack to make the loop body a function of the temporary variables *) @@ -2340,6 +2342,7 @@ let doc_exp_lem, doc_let_lem = ) ) ) + | Id_aux (Id "None",_) -> string "Nothing" | _ -> (match annot with | Base (_,Constructor _,_,_,_,_) -> @@ -3110,4 +3113,4 @@ let pp_defs_lem f_arch f d top_line opens = (string "(*" ^^ (string top_line) ^^ string "*)" ^/^ ((separate_map hardline) (fun lib -> separate space [string "open import";string lib]) - ["Pervasives";"Assert_extra";"Vector"]) ^/^ hardline ^^ decls) + ["Pervasives_extra";"Assert_extra";"Vector"]) ^/^ hardline ^^ decls) diff --git a/src/process_file.ml b/src/process_file.ml index 870daba4..d12c1415 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -179,7 +179,7 @@ let output1 libpath out_arg filename defs = let ((o2,_, _) as ext_o2) = open_output_with_check_unformatted (f' ^ "embed.lem") in (Pretty_print.pp_defs_lem o1 o2 defs (generated_line filename)) - ["Pervasives";"Vector";"State";"Arch";"Sail_values"]; + ["Pervasives_extra";"Vector";"State";"Arch";"Sail_values"]; close_output_with_check ext_o1; close_output_with_check ext_o2 | Lem_out (Some lib) -> @@ -188,7 +188,7 @@ let output1 libpath out_arg filename defs = let ((o2,_, _) as ext_o2) = open_output_with_check_unformatted (f' ^ "embed.lem") in (Pretty_print.pp_defs_lem o1 o2 defs (generated_line filename)) - ["Pervasives";"Vector";"State";"Arch";"Sail_values"; lib]; + ["Pervasives_extra";"Vector";"State";"Arch";"Sail_values"; lib]; close_output_with_check ext_o1; close_output_with_check ext_o2 | Ocaml_out None -> diff --git a/src/rewriter.ml b/src/rewriter.ml index 9b97f296..3f8196b7 100644 --- a/src/rewriter.ml +++ b/src/rewriter.ml @@ -1931,3 +1931,4 @@ let rewrite_defs_lem defs = let defs = rewrite_defs_a_normalise defs in let defs = rewrite_defs_remove_e_assign defs in defs + diff --git a/src/test/power.sail b/src/test/power.sail index 20e23cb9..b3e14b5a 100644 --- a/src/test/power.sail +++ b/src/test/power.sail @@ -1,4 +1,3 @@ -val extern forall Nat 'm, Nat 'n. (implicit<'m>,bit['n]) -> bit['m] effect pure EXTS (* XXX binary coded decimal *) (*function bit[12] DEC_TO_BCD ( (bit[10]) declet ) = { @@ -181,7 +180,7 @@ let (vector <0, 1024, inc, (register<(bit[64])>) >) SPR = vector definition. *) register (vector <0, 64, inc, bit>) DCR0 register (vector <0, 64, inc, bit>) DCR1 -let (vector <0, 2** 64, inc, (register<(vector<0, 64, inc, bit>)>) >) DCR = +let (vector <0, 1024, inc, (register<(vector<0, 64, inc, bit>)>) >) DCR = [ 0=DCR0, 1=DCR1 ; default=undefined] (* Floating-point registers *) @@ -298,7 +297,7 @@ function bit[64] DOUBLE word = { } else if word[1..8] == 0 & word[9..31] != 0 then { sign := word[0]; - exp := -126; + exp := 0 - 126; (bit[53]) frac := 0b0 : word[9..31] : 0b00000000000000000000000000000; foreach (i from 0 to 52) { if frac[0] == 0 @@ -307,7 +306,7 @@ function bit[64] DOUBLE word = { else () }; temp[0] := sign; - temp[1..11] := (bit[11]) exp + 1023; + temp[1..11] := (bit[1:11]) exp + 1023; temp[12..63] := frac[1..52]; } else { temp[0..1] := word[0..1]; @@ -385,8 +384,8 @@ typedef vscr = register bits [ 96 : 127 ] { } register (vscr) VSCR -(* XXX extend with zeroes -- the resulting size in completely unknown and depends of context *) -val extern forall Nat 'n, Nat 'm. (implicit<'m>,bit['n]) -> bit['m] effect pure EXTZ +(*(* XXX extend with zeroes -- the resulting size in completely unknown and depends of context *) +val extern forall Nat 'n, Nat 'm. (implicit<'m>,bit['n]) -> bit['m] effect pure EXTZ*) (* Chop has a very weird definition where the resulting size depends of context, but in practice it is used with the following definition everywhere, @@ -453,7 +452,7 @@ function forall Nat 'n, Nat 'm, 'n*8 = 'm. (bit['m]) effect pure byte_reverse((b } (* XXX effect for trap? *) -val extern unit -> unit effect pure trap +val extern unit -> unit effect {escape} trap register (bit[1]) mode64bit register (bit[1]) bigendianmode @@ -490,21 +489,17 @@ function forall Nat 'n. (bit['n]) zero_or_undef ((bit['n]) x) = { scattered function unit execute scattered typedef ast = const union -val bit[32] -> ast effect {escape} decode +val bit[32] -> option<ast> effect pure decode -scattered function ast decode +scattered function option<ast> decode union ast member (bit[24], bit, bit) B -function clause decode (0b010010 : -(bit[24]) LI : -[AA] : -[LK] as instr) = - B (LI,AA,LK) +function clause decode (0b010010 : (bit[24]) LI : [AA] : [LK] as instr) = Some(B(LI,AA,LK)) function clause execute (B (LI, AA, LK)) = { - if AA then NIA := EXTS (LI : 0b00) else NIA := CIA + EXTS (LI : 0b00); + if AA then NIA := EXTS(LI : 0b00) else NIA := CIA + EXTS(LI : 0b00); if LK then LR := CIA + 4 else () } @@ -516,22 +511,22 @@ function clause decode (0b010000 : (bit[14]) BD : [AA] : [LK] as instr) = - Bc (BO,BI,BD,AA,LK) + Some(Bc(BO,BI,BD,AA,LK)) function clause execute (Bc (BO, BI, BD, AA, LK)) = { if mode64bit then M := 0 else M := 32; ctr_temp := CTR; - if ~ (BO[2]) + if ~(BO[2]) then { ctr_temp := ctr_temp - 1; CTR := ctr_temp } else (); - ctr_ok := (BO[2] | ~ (ctr_temp[M .. 63] == 0) ^ BO[3]); - cond_ok := (BO[0] | CR[BI + 32] ^ ~ (BO[1])); + ctr_ok := (BO[2] | ~(ctr_temp[M .. 63] == 0) ^ BO[3]); + cond_ok := (BO[0] | CR[BI + 32] ^ ~(BO[1])); if ctr_ok & cond_ok - then if AA then NIA := EXTS (BD : 0b00) else NIA := CIA + EXTS (BD : 0b00) + then if AA then NIA := EXTS(BD : 0b00) else NIA := CIA + EXTS(BD : 0b00) else (); if LK then LR := CIA + 4 else () } @@ -545,20 +540,20 @@ function clause decode (0b010011 : (bit[2]) BH : 0b0000010000 : [LK] as instr) = - Bclr (BO,BI,BH,LK) + Some(Bclr(BO,BI,BH,LK)) function clause execute (Bclr (BO, BI, BH, LK)) = { if mode64bit then M := 0 else M := 32; ctr_temp := CTR; - if ~ (BO[2]) + if ~(BO[2]) then { ctr_temp := ctr_temp - 1; CTR := ctr_temp } else (); - ctr_ok := (BO[2] | ~ (ctr_temp[M .. 63] == 0) ^ BO[3]); - cond_ok := (BO[0] | CR[BI + 32] ^ ~ (BO[1])); + ctr_ok := (BO[2] | ~(ctr_temp[M .. 63] == 0) ^ BO[3]); + cond_ok := (BO[0] | CR[BI + 32] ^ ~(BO[1])); if ctr_ok & cond_ok then NIA := LR[0 .. 61] : 0b00 else (); if LK then LR := CIA + 4 else () } @@ -572,11 +567,11 @@ function clause decode (0b010011 : (bit[2]) BH : 0b1000010000 : [LK] as instr) = - Bcctr (BO,BI,BH,LK) + Some(Bcctr(BO,BI,BH,LK)) function clause execute (Bcctr (BO, BI, BH, LK)) = { - cond_ok := (BO[0] | CR[BI + 32] ^ ~ (BO[1])); + cond_ok := (BO[0] | CR[BI + 32] ^ ~(BO[1])); if cond_ok then NIA := CTR[0 .. 61] : 0b00 else (); if LK then LR := CIA + 4 else () } @@ -589,10 +584,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0100000001 : (bit[1]) _ as instr) = - Crand (BT,BA,BB) + Some(Crand(BT,BA,BB)) -function clause execute (Crand (BT, BA, BB)) = - CR[BT + 32] := (CR[BA + 32] & CR[BB + 32]) +function clause execute (Crand (BT, BA, BB)) = CR[BT + 32] := (CR[BA + 32] & CR[BB + 32]) union ast member (bit[5], bit[5], bit[5]) Crnand @@ -602,10 +596,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0011100001 : (bit[1]) _ as instr) = - Crnand (BT,BA,BB) + Some(Crnand(BT,BA,BB)) -function clause execute (Crnand (BT, BA, BB)) = - CR[BT + 32] := ~ (CR[BA + 32] & CR[BB + 32]) +function clause execute (Crnand (BT, BA, BB)) = CR[BT + 32] := ~(CR[BA + 32] & CR[BB + 32]) union ast member (bit[5], bit[5], bit[5]) Cror @@ -615,10 +608,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0111000001 : (bit[1]) _ as instr) = - Cror (BT,BA,BB) + Some(Cror(BT,BA,BB)) -function clause execute (Cror (BT, BA, BB)) = - CR[BT + 32] := (CR[BA + 32] | CR[BB + 32]) +function clause execute (Cror (BT, BA, BB)) = CR[BT + 32] := (CR[BA + 32] | CR[BB + 32]) union ast member (bit[5], bit[5], bit[5]) Crxor @@ -628,10 +620,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0011000001 : (bit[1]) _ as instr) = - Crxor (BT,BA,BB) + Some(Crxor(BT,BA,BB)) -function clause execute (Crxor (BT, BA, BB)) = - CR[BT + 32] := CR[BA + 32] ^ CR[BB + 32] +function clause execute (Crxor (BT, BA, BB)) = CR[BT + 32] := CR[BA + 32] ^ CR[BB + 32] union ast member (bit[5], bit[5], bit[5]) Crnor @@ -641,10 +632,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0000100001 : (bit[1]) _ as instr) = - Crnor (BT,BA,BB) + Some(Crnor(BT,BA,BB)) -function clause execute (Crnor (BT, BA, BB)) = - CR[BT + 32] := ~ (CR[BA + 32] | CR[BB + 32]) +function clause execute (Crnor (BT, BA, BB)) = CR[BT + 32] := ~(CR[BA + 32] | CR[BB + 32]) union ast member (bit[5], bit[5], bit[5]) Creqv @@ -654,10 +644,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0100100001 : (bit[1]) _ as instr) = - Creqv (BT,BA,BB) + Some(Creqv(BT,BA,BB)) -function clause execute (Creqv (BT, BA, BB)) = - CR[BT + 32] := CR[BA + 32] ^ ~ (CR[BB + 32]) +function clause execute (Creqv (BT, BA, BB)) = CR[BT + 32] := CR[BA + 32] ^ ~(CR[BB + 32]) union ast member (bit[5], bit[5], bit[5]) Crandc @@ -667,10 +656,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0010000001 : (bit[1]) _ as instr) = - Crandc (BT,BA,BB) + Some(Crandc(BT,BA,BB)) -function clause execute (Crandc (BT, BA, BB)) = - CR[BT + 32] := (CR[BA + 32] & ~ (CR[BB + 32])) +function clause execute (Crandc (BT, BA, BB)) = CR[BT + 32] := (CR[BA + 32] & ~(CR[BB + 32])) union ast member (bit[5], bit[5], bit[5]) Crorc @@ -680,10 +668,9 @@ function clause decode (0b010011 : (bit[5]) BB : 0b0110100001 : (bit[1]) _ as instr) = - Crorc (BT,BA,BB) + Some(Crorc(BT,BA,BB)) -function clause execute (Crorc (BT, BA, BB)) = - CR[BT + 32] := (CR[BA + 32] | ~ (CR[BB + 32])) +function clause execute (Crorc (BT, BA, BB)) = CR[BT + 32] := (CR[BA + 32] | ~(CR[BB + 32])) union ast member (bit[3], bit[3]) Mcrf @@ -695,7 +682,7 @@ function clause decode (0b010011 : (bit[5]) _ : 0b0000000000 : (bit[1]) _ as instr) = - Mcrf (BF,BFA) + Some(Mcrf(BF,BFA)) function clause execute (Mcrf (BF, BFA)) = CR[4 * BF + 32..4 * BF + 35] := CR[4 * BFA + 32 .. 4 * BFA + 35] @@ -710,7 +697,7 @@ function clause decode (0b010001 : (bit[3]) _ : 0b1 : (bit[1]) _ as instr) = - Sc (LEV) + Some(Sc(LEV)) function clause execute (Sc (LEV)) = () @@ -724,7 +711,7 @@ function clause decode (0b010001 : (bit[3]) _ : 0b0 : 0b1 as instr) = - Scv (LEV) + Some(Scv(LEV)) function clause execute (Scv (LEV)) = () @@ -734,16 +721,15 @@ function clause decode (0b100010 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lbz (RT,RA,D) + Some(Lbz(RT,RA,D)) function clause execute (Lbz (RT, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - GPR[RT] := - 0b00000000000000000000000000000000000000000000000000000000 : MEMr (EA,1) + EA := b + EXTS(D); + GPR[RT] := 0b00000000000000000000000000000000000000000000000000000000 : MEMr(EA,1) } union ast member (bit[5], bit[5], bit[5]) Lbzx @@ -754,7 +740,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001010111 : (bit[1]) _ as instr) = - Lbzx (RT,RA,RB) + Some(Lbzx(RT,RA,RB)) function clause execute (Lbzx (RT, RA, RB)) = { @@ -762,8 +748,7 @@ function clause execute (Lbzx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := - 0b00000000000000000000000000000000000000000000000000000000 : MEMr (EA,1) + GPR[RT] := 0b00000000000000000000000000000000000000000000000000000000 : MEMr(EA,1) } union ast member (bit[5], bit[5], bit[16]) Lbzu @@ -772,15 +757,14 @@ function clause decode (0b100011 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lbzu (RT,RA,D) + Some(Lbzu(RT,RA,D)) function clause execute (Lbzu (RT, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; - GPR[RT] := - 0b00000000000000000000000000000000000000000000000000000000 : MEMr (EA,1) + GPR[RT] := 0b00000000000000000000000000000000000000000000000000000000 : MEMr(EA,1) } union ast member (bit[5], bit[5], bit[5]) Lbzux @@ -791,15 +775,14 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001110111 : (bit[1]) _ as instr) = - Lbzux (RT,RA,RB) + Some(Lbzux(RT,RA,RB)) function clause execute (Lbzux (RT, RA, RB)) = { (bit[64]) EA := 0; EA := GPR[RA] + GPR[RB]; GPR[RA] := EA; - GPR[RT] := - 0b00000000000000000000000000000000000000000000000000000000 : MEMr (EA,1) + GPR[RT] := 0b00000000000000000000000000000000000000000000000000000000 : MEMr(EA,1) } union ast member (bit[5], bit[5], bit[16]) Lhz @@ -808,15 +791,15 @@ function clause decode (0b101000 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lhz (RT,RA,D) + Some(Lhz(RT,RA,D)) function clause execute (Lhz (RT, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr (EA,2) + EA := b + EXTS(D); + GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr(EA,2) } union ast member (bit[5], bit[5], bit[5]) Lhzx @@ -827,7 +810,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0100010111 : (bit[1]) _ as instr) = - Lhzx (RT,RA,RB) + Some(Lhzx(RT,RA,RB)) function clause execute (Lhzx (RT, RA, RB)) = { @@ -835,7 +818,7 @@ function clause execute (Lhzx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr (EA,2) + GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr(EA,2) } union ast member (bit[5], bit[5], bit[16]) Lhzu @@ -844,14 +827,14 @@ function clause decode (0b101001 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lhzu (RT,RA,D) + Some(Lhzu(RT,RA,D)) function clause execute (Lhzu (RT, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; - GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr (EA,2) + GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr(EA,2) } union ast member (bit[5], bit[5], bit[5]) Lhzux @@ -862,14 +845,14 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0100110111 : (bit[1]) _ as instr) = - Lhzux (RT,RA,RB) + Some(Lhzux(RT,RA,RB)) function clause execute (Lhzux (RT, RA, RB)) = { (bit[64]) EA := 0; EA := GPR[RA] + GPR[RB]; GPR[RA] := EA; - GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr (EA,2) + GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr(EA,2) } union ast member (bit[5], bit[5], bit[16]) Lha @@ -878,15 +861,15 @@ function clause decode (0b101010 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lha (RT,RA,D) + Some(Lha(RT,RA,D)) function clause execute (Lha (RT, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - GPR[RT] := EXTS (MEMr (EA,2)) + EA := b + EXTS(D); + GPR[RT] := EXTS(MEMr(EA,2)) } union ast member (bit[5], bit[5], bit[5]) Lhax @@ -897,7 +880,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0101010111 : (bit[1]) _ as instr) = - Lhax (RT,RA,RB) + Some(Lhax(RT,RA,RB)) function clause execute (Lhax (RT, RA, RB)) = { @@ -905,7 +888,7 @@ function clause execute (Lhax (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := EXTS (MEMr (EA,2)) + GPR[RT] := EXTS(MEMr(EA,2)) } union ast member (bit[5], bit[5], bit[16]) Lhau @@ -914,14 +897,14 @@ function clause decode (0b101011 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lhau (RT,RA,D) + Some(Lhau(RT,RA,D)) function clause execute (Lhau (RT, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; - GPR[RT] := EXTS (MEMr (EA,2)) + GPR[RT] := EXTS(MEMr(EA,2)) } union ast member (bit[5], bit[5], bit[5]) Lhaux @@ -932,14 +915,14 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0101110111 : (bit[1]) _ as instr) = - Lhaux (RT,RA,RB) + Some(Lhaux(RT,RA,RB)) function clause execute (Lhaux (RT, RA, RB)) = { (bit[64]) EA := 0; EA := GPR[RA] + GPR[RB]; GPR[RA] := EA; - GPR[RT] := EXTS (MEMr (EA,2)) + GPR[RT] := EXTS(MEMr(EA,2)) } union ast member (bit[5], bit[5], bit[16]) Lwz @@ -948,15 +931,15 @@ function clause decode (0b100000 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lwz (RT,RA,D) + Some(Lwz(RT,RA,D)) function clause execute (Lwz (RT, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - GPR[RT] := 0b00000000000000000000000000000000 : MEMr (EA,4) + EA := b + EXTS(D); + GPR[RT] := 0b00000000000000000000000000000000 : MEMr(EA,4) } union ast member (bit[5], bit[5], bit[5]) Lwzx @@ -967,7 +950,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000010111 : (bit[1]) _ as instr) = - Lwzx (RT,RA,RB) + Some(Lwzx(RT,RA,RB)) function clause execute (Lwzx (RT, RA, RB)) = { @@ -975,7 +958,7 @@ function clause execute (Lwzx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := 0b00000000000000000000000000000000 : MEMr (EA,4) + GPR[RT] := 0b00000000000000000000000000000000 : MEMr(EA,4) } union ast member (bit[5], bit[5], bit[16]) Lwzu @@ -984,14 +967,14 @@ function clause decode (0b100001 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lwzu (RT,RA,D) + Some(Lwzu(RT,RA,D)) function clause execute (Lwzu (RT, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; - GPR[RT] := 0b00000000000000000000000000000000 : MEMr (EA,4) + GPR[RT] := 0b00000000000000000000000000000000 : MEMr(EA,4) } union ast member (bit[5], bit[5], bit[5]) Lwzux @@ -1002,14 +985,14 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000110111 : (bit[1]) _ as instr) = - Lwzux (RT,RA,RB) + Some(Lwzux(RT,RA,RB)) function clause execute (Lwzux (RT, RA, RB)) = { (bit[64]) EA := 0; EA := GPR[RA] + GPR[RB]; GPR[RA] := EA; - GPR[RT] := 0b00000000000000000000000000000000 : MEMr (EA,4) + GPR[RT] := 0b00000000000000000000000000000000 : MEMr(EA,4) } union ast member (bit[5], bit[5], bit[14]) Lwa @@ -1019,15 +1002,15 @@ function clause decode (0b111010 : (bit[5]) RA : (bit[14]) DS : 0b10 as instr) = - Lwa (RT,RA,DS) + Some(Lwa(RT,RA,DS)) function clause execute (Lwa (RT, RA, DS)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DS : 0b00); - GPR[RT] := EXTS (MEMr (EA,4)) + EA := b + EXTS(DS : 0b00); + GPR[RT] := EXTS(MEMr(EA,4)) } union ast member (bit[5], bit[5], bit[5]) Lwax @@ -1038,7 +1021,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0101010101 : (bit[1]) _ as instr) = - Lwax (RT,RA,RB) + Some(Lwax(RT,RA,RB)) function clause execute (Lwax (RT, RA, RB)) = { @@ -1046,7 +1029,7 @@ function clause execute (Lwax (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := EXTS (MEMr (EA,4)) + GPR[RT] := EXTS(MEMr(EA,4)) } union ast member (bit[5], bit[5], bit[5]) Lwaux @@ -1057,14 +1040,14 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0101110101 : (bit[1]) _ as instr) = - Lwaux (RT,RA,RB) + Some(Lwaux(RT,RA,RB)) function clause execute (Lwaux (RT, RA, RB)) = { (bit[64]) EA := 0; EA := GPR[RA] + GPR[RB]; GPR[RA] := EA; - GPR[RT] := EXTS (MEMr (EA,4)) + GPR[RT] := EXTS(MEMr(EA,4)) } union ast member (bit[5], bit[5], bit[14]) Ld @@ -1074,15 +1057,15 @@ function clause decode (0b111010 : (bit[5]) RA : (bit[14]) DS : 0b00 as instr) = - Ld (RT,RA,DS) + Some(Ld(RT,RA,DS)) function clause execute (Ld (RT, RA, DS)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DS : 0b00); - GPR[RT] := MEMr (EA,8) + EA := b + EXTS(DS : 0b00); + GPR[RT] := MEMr(EA,8) } union ast member (bit[5], bit[5], bit[5]) Ldx @@ -1093,7 +1076,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000010101 : (bit[1]) _ as instr) = - Ldx (RT,RA,RB) + Some(Ldx(RT,RA,RB)) function clause execute (Ldx (RT, RA, RB)) = { @@ -1101,7 +1084,7 @@ function clause execute (Ldx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := MEMr (EA,8) + GPR[RT] := MEMr(EA,8) } union ast member (bit[5], bit[5], bit[14]) Ldu @@ -1111,14 +1094,14 @@ function clause decode (0b111010 : (bit[5]) RA : (bit[14]) DS : 0b01 as instr) = - Ldu (RT,RA,DS) + Some(Ldu(RT,RA,DS)) function clause execute (Ldu (RT, RA, DS)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (DS : 0b00); + EA := GPR[RA] + EXTS(DS : 0b00); GPR[RA] := EA; - GPR[RT] := MEMr (EA,8) + GPR[RT] := MEMr(EA,8) } union ast member (bit[5], bit[5], bit[5]) Ldux @@ -1129,14 +1112,14 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000110101 : (bit[1]) _ as instr) = - Ldux (RT,RA,RB) + Some(Ldux(RT,RA,RB)) function clause execute (Ldux (RT, RA, RB)) = { (bit[64]) EA := 0; EA := GPR[RA] + GPR[RB]; GPR[RA] := EA; - GPR[RT] := MEMr (EA,8) + GPR[RT] := MEMr(EA,8) } union ast member (bit[5], bit[5], bit[16]) Stb @@ -1145,14 +1128,14 @@ function clause decode (0b100110 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Stb (RS,RA,D) + Some(Stb(RS,RA,D)) function clause execute (Stb (RS, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); + EA := b + EXTS(D); MEMw(EA,1) := (GPR[RS])[56 .. 63] } @@ -1164,7 +1147,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0011010111 : (bit[1]) _ as instr) = - Stbx (RS,RA,RB) + Some(Stbx(RS,RA,RB)) function clause execute (Stbx (RS, RA, RB)) = { @@ -1181,12 +1164,12 @@ function clause decode (0b100111 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Stbu (RS,RA,D) + Some(Stbu(RS,RA,D)) function clause execute (Stbu (RS, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; MEMw(EA,1) := (GPR[RS])[56 .. 63] } @@ -1199,7 +1182,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0011110111 : (bit[1]) _ as instr) = - Stbux (RS,RA,RB) + Some(Stbux(RS,RA,RB)) function clause execute (Stbux (RS, RA, RB)) = { @@ -1215,14 +1198,14 @@ function clause decode (0b101100 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Sth (RS,RA,D) + Some(Sth(RS,RA,D)) function clause execute (Sth (RS, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); + EA := b + EXTS(D); MEMw(EA,2) := (GPR[RS])[48 .. 63] } @@ -1234,7 +1217,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0110010111 : (bit[1]) _ as instr) = - Sthx (RS,RA,RB) + Some(Sthx(RS,RA,RB)) function clause execute (Sthx (RS, RA, RB)) = { @@ -1251,12 +1234,12 @@ function clause decode (0b101101 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Sthu (RS,RA,D) + Some(Sthu(RS,RA,D)) function clause execute (Sthu (RS, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; MEMw(EA,2) := (GPR[RS])[48 .. 63] } @@ -1269,7 +1252,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0110110111 : (bit[1]) _ as instr) = - Sthux (RS,RA,RB) + Some(Sthux(RS,RA,RB)) function clause execute (Sthux (RS, RA, RB)) = { @@ -1285,14 +1268,14 @@ function clause decode (0b100100 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Stw (RS,RA,D) + Some(Stw(RS,RA,D)) function clause execute (Stw (RS, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); + EA := b + EXTS(D); MEMw(EA,4) := (GPR[RS])[32 .. 63] } @@ -1304,7 +1287,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0010010111 : (bit[1]) _ as instr) = - Stwx (RS,RA,RB) + Some(Stwx(RS,RA,RB)) function clause execute (Stwx (RS, RA, RB)) = { @@ -1321,12 +1304,12 @@ function clause decode (0b100101 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Stwu (RS,RA,D) + Some(Stwu(RS,RA,D)) function clause execute (Stwu (RS, RA, D)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); + EA := GPR[RA] + EXTS(D); GPR[RA] := EA; MEMw(EA,4) := (GPR[RS])[32 .. 63] } @@ -1339,7 +1322,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0010110111 : (bit[1]) _ as instr) = - Stwux (RS,RA,RB) + Some(Stwux(RS,RA,RB)) function clause execute (Stwux (RS, RA, RB)) = { @@ -1356,14 +1339,14 @@ function clause decode (0b111110 : (bit[5]) RA : (bit[14]) DS : 0b00 as instr) = - Std (RS,RA,DS) + Some(Std(RS,RA,DS)) function clause execute (Std (RS, RA, DS)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DS : 0b00); + EA := b + EXTS(DS : 0b00); MEMw(EA,8) := GPR[RS] } @@ -1375,7 +1358,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0010010101 : (bit[1]) _ as instr) = - Stdx (RS,RA,RB) + Some(Stdx(RS,RA,RB)) function clause execute (Stdx (RS, RA, RB)) = { @@ -1393,12 +1376,12 @@ function clause decode (0b111110 : (bit[5]) RA : (bit[14]) DS : 0b01 as instr) = - Stdu (RS,RA,DS) + Some(Stdu(RS,RA,DS)) function clause execute (Stdu (RS, RA, DS)) = { (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (DS : 0b00); + EA := GPR[RA] + EXTS(DS : 0b00); GPR[RA] := EA; MEMw(EA,8) := GPR[RS] } @@ -1411,7 +1394,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0010110101 : (bit[1]) _ as instr) = - Stdux (RS,RA,RB) + Some(Stdux(RS,RA,RB)) function clause execute (Stdux (RS, RA, RB)) = { @@ -1428,22 +1411,22 @@ function clause decode (0b111000 : (bit[5]) RA : (bit[12]) DQ : (bit[4]) PT as instr) = - Lq (RTp,RA,DQ,PT) + Some(Lq(RTp,RA,DQ,PT)) function clause execute (Lq (RTp, RA, DQ, PT)) = { (bit[64]) EA := 0; (bit[64]) b := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DQ : 0b0000); - (bit[128]) mem := MEMr (EA,16); + EA := b + EXTS(DQ : 0b0000); + (bit[128]) mem := MEMr(EA,16); if bigendianmode then { GPR[RTp] := mem[0 .. 63]; GPR[RTp + 1] := mem[64 .. 127] } else { - (bit[128]) bytereverse := byte_reverse (mem); + (bit[128]) bytereverse := byte_reverse(mem); GPR[RTp] := bytereverse[0 .. 63]; GPR[RTp + 1] := bytereverse[64 .. 127] } @@ -1456,7 +1439,7 @@ function clause decode (0b111110 : (bit[5]) RA : (bit[14]) DS : 0b10 as instr) = - Stq (RSp,RA,DS) + Some(Stq(RSp,RA,DS)) function clause execute (Stq (RSp, RA, DS)) = { @@ -1466,14 +1449,14 @@ function clause execute (Stq (RSp, RA, DS)) = (bit[64]) EA := 0; (bit[64]) b := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DS : 0b00); + EA := b + EXTS(DS : 0b00); (bit[128]) mem := 0; mem[0..63] := GPR[RSp]; mem[64..127] := GPR[RSp + 1]; - if ~ (bigendianmode) then mem := byte_reverse (mem) else (); + if ~(bigendianmode) then mem := byte_reverse(mem) else (); MEMw(EA,16) := mem }; - EA := b + EXTS (DS : 0b00); + EA := b + EXTS(DS : 0b00); MEMw(EA,8) := RSp } @@ -1485,7 +1468,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1100010110 : (bit[1]) _ as instr) = - Lhbrx (RT,RA,RB) + Some(Lhbrx(RT,RA,RB)) function clause execute (Lhbrx (RT, RA, RB)) = { @@ -1493,10 +1476,9 @@ function clause execute (Lhbrx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - load_data := MEMr (EA,2); + load_data := MEMr(EA,2); GPR[RT] := - 0b000000000000000000000000000000000000000000000000 : - load_data[8 .. 15] : load_data[0 .. 7] + 0b000000000000000000000000000000000000000000000000 : load_data[8 .. 15] : load_data[0 .. 7] } union ast member (bit[5], bit[5], bit[5]) Sthbrx @@ -1507,7 +1489,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1110010110 : (bit[1]) _ as instr) = - Sthbrx (RS,RA,RB) + Some(Sthbrx(RS,RA,RB)) function clause execute (Sthbrx (RS, RA, RB)) = { @@ -1526,7 +1508,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1000010110 : (bit[1]) _ as instr) = - Lwbrx (RT,RA,RB) + Some(Lwbrx(RT,RA,RB)) function clause execute (Lwbrx (RT, RA, RB)) = { @@ -1534,11 +1516,10 @@ function clause execute (Lwbrx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - load_data := MEMr (EA,4); + load_data := MEMr(EA,4); GPR[RT] := 0b00000000000000000000000000000000 : - load_data[24 .. 31] : - load_data[16 .. 23] : load_data[8 .. 15] : load_data[0 .. 7] + load_data[24 .. 31] : load_data[16 .. 23] : load_data[8 .. 15] : load_data[0 .. 7] } union ast member (bit[5], bit[5], bit[5]) Stwbrx @@ -1549,7 +1530,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1010010110 : (bit[1]) _ as instr) = - Stwbrx (RS,RA,RB) + Some(Stwbrx(RS,RA,RB)) function clause execute (Stwbrx (RS, RA, RB)) = { @@ -1558,8 +1539,7 @@ function clause execute (Stwbrx (RS, RA, RB)) = if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; MEMw(EA,4) := - (GPR[RS])[56 .. 63] : - (GPR[RS])[48 .. 55] : (GPR[RS])[40 .. 47] : (GPR[RS])[32 .. 39] + (GPR[RS])[56 .. 63] : (GPR[RS])[48 .. 55] : (GPR[RS])[40 .. 47] : (GPR[RS])[32 .. 39] } union ast member (bit[5], bit[5], bit[5]) Ldbrx @@ -1570,7 +1550,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1000010100 : (bit[1]) _ as instr) = - Ldbrx (RT,RA,RB) + Some(Ldbrx(RT,RA,RB)) function clause execute (Ldbrx (RT, RA, RB)) = { @@ -1578,14 +1558,13 @@ function clause execute (Ldbrx (RT, RA, RB)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - load_data := MEMr (EA,8); + load_data := MEMr(EA,8); GPR[RT] := load_data[56 .. 63] : load_data[48 .. 55] : load_data[40 .. 47] : load_data[32 .. 39] : - load_data[24 .. 31] : - load_data[16 .. 23] : load_data[8 .. 15] : load_data[0 .. 7] + load_data[24 .. 31] : load_data[16 .. 23] : load_data[8 .. 15] : load_data[0 .. 7] } union ast member (bit[5], bit[5], bit[5]) Stdbrx @@ -1596,7 +1575,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1010010100 : (bit[1]) _ as instr) = - Stdbrx (RS,RA,RB) + Some(Stdbrx(RS,RA,RB)) function clause execute (Stdbrx (RS, RA, RB)) = { @@ -1609,8 +1588,7 @@ function clause execute (Stdbrx (RS, RA, RB)) = (GPR[RS])[48 .. 55] : (GPR[RS])[40 .. 47] : (GPR[RS])[32 .. 39] : - (GPR[RS])[24 .. 31] : - (GPR[RS])[16 .. 23] : (GPR[RS])[8 .. 15] : (GPR[RS])[0 .. 7] + (GPR[RS])[24 .. 31] : (GPR[RS])[16 .. 23] : (GPR[RS])[8 .. 15] : (GPR[RS])[0 .. 7] } union ast member (bit[5], bit[5], bit[16]) Lmw @@ -1619,16 +1597,16 @@ function clause decode (0b101110 : (bit[5]) RT : (bit[5]) RA : (bit[16]) D as instr) = - Lmw (RT,RA,D) + Some(Lmw(RT,RA,D)) function clause execute (Lmw (RT, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); + EA := b + EXTS(D); size := ([|32|]) (32 - RT) * 4; - buffer := MEMr (EA,size); + buffer := MEMr(EA,size); i := 0; foreach (r from RT to 31 by 1 in inc) { @@ -1643,14 +1621,14 @@ function clause decode (0b101111 : (bit[5]) RS : (bit[5]) RA : (bit[16]) D as instr) = - Stmw (RS,RA,D) + Some(Stmw(RS,RA,D)) function clause execute (Stmw (RS, RA, D)) = { (bit[64]) b := 0; (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); + EA := b + EXTS(D); size := ([|32|]) (32 - RS) * 4; (bit[994]) buffer := [0 = 0,993 = 0; default=0]; i := 0; @@ -1670,7 +1648,7 @@ function clause decode (0b011111 : (bit[5]) NB : 0b1001010101 : (bit[1]) _ as instr) = - Lswi (RT,RA,NB) + Some(Lswi(RT,RA,NB)) function clause execute (Lswi (RT, RA, NB)) = { @@ -1679,7 +1657,7 @@ function clause execute (Lswi (RT, RA, NB)) = ([|31|]) r := 0; r := RT - 1; ([|32|]) size := if NB == 0 then 32 else NB; - (bit[256]) membuffer := MEMr (EA,size); + (bit[256]) membuffer := MEMr(EA,size); j := 0; i := 32; foreach (n from (if NB == 0 then 32 else NB) to 1 by 1 in dec) @@ -1706,7 +1684,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1000010101 : (bit[1]) _ as instr) = - Lswx (RT,RA,RB) + Some(Lswx(RT,RA,RB)) function clause execute (Lswx (RT, RA, RB)) = { @@ -1717,12 +1695,12 @@ function clause execute (Lswx (RT, RA, RB)) = EA := b + GPR[RB]; r := RT - 1; i := 32; - ([|64|]) n_top := XER[57 .. 63]; - recalculate_dependency (()); + ([|128|]) n_top := XER[57 .. 63]; + recalculate_dependency(()); if n_top == 0 then GPR[RT] := undefined else { - (bit[512]) membuffer := MEMr (EA,n_top); + (bit[512]) membuffer := MEMr(EA,n_top); j := 0; n_r := n_top quot 4; n_mod := n_top mod 4; @@ -1753,7 +1731,7 @@ function clause decode (0b011111 : (bit[5]) NB : 0b1011010101 : (bit[1]) _ as instr) = - Stswi (RS,RA,NB) + Some(Stswi(RS,RA,NB)) function clause execute (Stswi (RS, RA, NB)) = { @@ -1784,7 +1762,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1010010101 : (bit[1]) _ as instr) = - Stswx (RS,RA,RB) + Some(Stswx(RS,RA,RB)) function clause execute (Stswx (RS, RA, RB)) = { @@ -1795,8 +1773,8 @@ function clause execute (Stswx (RS, RA, RB)) = EA := b + GPR[RB]; r := RS - 1; i := 32; - ([|64|]) n_top := XER[57 .. 63]; - recalculate_dependency (()); + ([|128|]) n_top := XER[57 .. 63]; + recalculate_dependency(()); (bit[512]) membuffer := [0 = 0,511 = 0; default=0]; j := 0; foreach (n from n_top to 1 by 1 in dec) @@ -1807,7 +1785,7 @@ function clause execute (Stswx (RS, RA, RB)) = j := j + 8; if i == 64 then i := 32 else () }; - if ~ (n_top == 0) then MEMw(EA,n_top) := membuffer[0 .. n_top * 8] else () + if ~(n_top == 0) then MEMw(EA,n_top) := membuffer[0 .. n_top * 8] else () } union ast member (bit[5], bit[5], bit[16]) Addi @@ -1816,10 +1794,10 @@ function clause decode (0b001110 : (bit[5]) RT : (bit[5]) RA : (bit[16]) SI as instr) = - Addi (RT,RA,SI) + Some(Addi(RT,RA,SI)) function clause execute (Addi (RT, RA, SI)) = - if RA == 0 then GPR[RT] := EXTS (SI) else GPR[RT] := GPR[RA] + EXTS (SI) + if RA == 0 then GPR[RT] := EXTS(SI) else GPR[RT] := GPR[RA] + EXTS(SI) union ast member (bit[5], bit[5], bit[16]) Addis @@ -1827,12 +1805,12 @@ function clause decode (0b001111 : (bit[5]) RT : (bit[5]) RA : (bit[16]) SI as instr) = - Addis (RT,RA,SI) + Some(Addis(RT,RA,SI)) function clause execute (Addis (RT, RA, SI)) = if RA == 0 - then GPR[RT] := EXTS (SI : 0b0000000000000000) - else GPR[RT] := GPR[RA] + EXTS (SI : 0b0000000000000000) + then GPR[RT] := EXTS(SI : 0b0000000000000000) + else GPR[RT] := GPR[RA] + EXTS(SI : 0b0000000000000000) union ast member (bit[5], bit[5], bit[5], bit, bit) Add @@ -1843,7 +1821,7 @@ function clause decode (0b011111 : [OE] : 0b100001010 : [Rc] as instr) = - Add (RT,RA,RB,OE,Rc) + Some(Add(RT,RA,RB,OE,Rc)) function clause execute (Add (RT, RA, RB, OE, Rc)) = let (temp, overflow, _) = (GPR[RA] +_s GPR[RB]) in @@ -1853,10 +1831,10 @@ function clause execute (Add (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Subf @@ -1868,10 +1846,10 @@ function clause decode (0b011111 : [OE] : 0b000101000 : [Rc] as instr) = - Subf (RT,RA,RB,OE,Rc) + Some(Subf(RT,RA,RB,OE,Rc)) function clause execute (Subf (RT, RA, RB, OE, Rc)) = - let (t1, o1, _) = (~ (GPR[RA]) +_s GPR[RB]) in + let (t1, o1, _) = (~(GPR[RA]) +_s GPR[RB]) in let (t2, o2, _) = (t1 +_s (bit) 1) in { (bit[64]) temp := t2; @@ -1881,10 +1859,10 @@ function clause execute (Subf (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[16]) Addic @@ -1893,10 +1871,10 @@ function clause decode (0b001100 : (bit[5]) RT : (bit[5]) RA : (bit[16]) SI as instr) = - Addic (RT,RA,SI) + Some(Addic(RT,RA,SI)) function clause execute (Addic (RT, RA, SI)) = - let (temp, _, carry) = (GPR[RA] +_s EXTS (SI)) in + let (temp, _, carry) = (GPR[RA] +_s EXTS(SI)) in { GPR[RT] := temp; CA := carry @@ -1908,14 +1886,14 @@ function clause decode (0b001101 : (bit[5]) RT : (bit[5]) RA : (bit[16]) SI as instr) = - AddicDot (RT,RA,SI) + Some(AddicDot(RT,RA,SI)) function clause execute (AddicDot (RT, RA, SI)) = - let (temp, overflow, carry) = (GPR[RA] +_s EXTS (SI)) in + let (temp, overflow, carry) = (GPR[RA] +_s EXTS(SI)) in { GPR[RT] := temp; CA := carry; - set_overflow_cr0 (temp,overflow | XER.SO) + set_overflow_cr0(temp,overflow | XER.SO) } union ast member (bit[5], bit[5], bit[16]) Subfic @@ -1924,10 +1902,10 @@ function clause decode (0b001000 : (bit[5]) RT : (bit[5]) RA : (bit[16]) SI as instr) = - Subfic (RT,RA,SI) + Some(Subfic(RT,RA,SI)) function clause execute (Subfic (RT, RA, SI)) = - let (t1, o1, c1) = (~ (GPR[RA]) +_s EXTS (SI)) in + let (t1, o1, c1) = (~(GPR[RA]) +_s EXTS(SI)) in let (t2, o2, c2) = (t1 +_s (bit) 1) in { (bit[64]) temp := t2; @@ -1944,7 +1922,7 @@ function clause decode (0b011111 : [OE] : 0b000001010 : [Rc] as instr) = - Addc (RT,RA,RB,OE,Rc) + Some(Addc(RT,RA,RB,OE,Rc)) function clause execute (Addc (RT, RA, RB, OE, Rc)) = let (temp, overflow, carry) = (GPR[RA] +_s GPR[RB]) in @@ -1954,11 +1932,11 @@ function clause execute (Addc (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Subfc @@ -1970,10 +1948,10 @@ function clause decode (0b011111 : [OE] : 0b000001000 : [Rc] as instr) = - Subfc (RT,RA,RB,OE,Rc) + Some(Subfc(RT,RA,RB,OE,Rc)) function clause execute (Subfc (RT, RA, RB, OE, Rc)) = - let (t1, o1, c1) = (~ (GPR[RA]) +_s GPR[RB]) in + let (t1, o1, c1) = (~(GPR[RA]) +_s GPR[RB]) in let (t2, o2, c2) = (t1 +_s (bit) 1) in { (bit[64]) temp := t2; @@ -1984,11 +1962,11 @@ function clause execute (Subfc (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Adde @@ -2000,7 +1978,7 @@ function clause decode (0b011111 : [OE] : 0b010001010 : [Rc] as instr) = - Adde (RT,RA,RB,OE,Rc) + Some(Adde(RT,RA,RB,OE,Rc)) function clause execute (Adde (RT, RA, RB, OE, Rc)) = let (t1, o1, c1) = (GPR[RA] +_s GPR[RB]) in @@ -2014,11 +1992,11 @@ function clause execute (Adde (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Subfe @@ -2030,10 +2008,10 @@ function clause decode (0b011111 : [OE] : 0b010001000 : [Rc] as instr) = - Subfe (RT,RA,RB,OE,Rc) + Some(Subfe(RT,RA,RB,OE,Rc)) function clause execute (Subfe (RT, RA, RB, OE, Rc)) = - let (t1, o1, c1) = (~ (GPR[RA]) +_s GPR[RB]) in + let (t1, o1, c1) = (~(GPR[RA]) +_s GPR[RB]) in let (t2, o2, c2) = (t1 +_s (bit) CA) in { (bit[64]) temp := t2; @@ -2044,11 +2022,11 @@ function clause execute (Subfe (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit, bit) Addme @@ -2060,12 +2038,11 @@ function clause decode (0b011111 : [OE] : 0b011101010 : [Rc] as instr) = - Addme (RT,RA,OE,Rc) + Some(Addme(RT,RA,OE,Rc)) function clause execute (Addme (RT, RA, OE, Rc)) = let (t1, o1, c1) = (GPR[RA] +_s CA) in - let (t2, o2, c2) = - (t1 +_s 0b1111111111111111111111111111111111111111111111111111111111111111) in + let (t2, o2, c2) = (t1 +_s 0b1111111111111111111111111111111111111111111111111111111111111111) in { (bit[64]) temp := t2; overflow := (o1 | o2); @@ -2075,11 +2052,11 @@ function clause execute (Addme (RT, RA, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit, bit) Subfme @@ -2091,12 +2068,11 @@ function clause decode (0b011111 : [OE] : 0b011101000 : [Rc] as instr) = - Subfme (RT,RA,OE,Rc) + Some(Subfme(RT,RA,OE,Rc)) function clause execute (Subfme (RT, RA, OE, Rc)) = - let (t1, o1, c1) = (~ (GPR[RA]) +_s CA) in - let (t2, o2, c2) = - (t1 +_s 0b1111111111111111111111111111111111111111111111111111111111111111) in + let (t1, o1, c1) = (~(GPR[RA]) +_s CA) in + let (t2, o2, c2) = (t1 +_s 0b1111111111111111111111111111111111111111111111111111111111111111) in { (bit[64]) temp := t2; overflow := (o1 | o2); @@ -2106,11 +2082,11 @@ function clause execute (Subfme (RT, RA, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit, bit) Addze @@ -2122,7 +2098,7 @@ function clause decode (0b011111 : [OE] : 0b011001010 : [Rc] as instr) = - Addze (RT,RA,OE,Rc) + Some(Addze(RT,RA,OE,Rc)) function clause execute (Addze (RT, RA, OE, Rc)) = let (temp, overflow, carry) = (GPR[RA] +_s CA) in @@ -2132,11 +2108,11 @@ function clause execute (Addze (RT, RA, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit, bit) Subfze @@ -2148,21 +2124,21 @@ function clause decode (0b011111 : [OE] : 0b011001000 : [Rc] as instr) = - Subfze (RT,RA,OE,Rc) + Some(Subfze(RT,RA,OE,Rc)) function clause execute (Subfze (RT, RA, OE, Rc)) = - let (temp, overflow, carry) = (~ (GPR[RA]) +_s CA) in + let (temp, overflow, carry) = (~(GPR[RA]) +_s CA) in { GPR[RT] := temp; if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (temp,xer_so) + set_overflow_cr0(temp,xer_so) } else (); CA := carry; - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit, bit) Neg @@ -2174,14 +2150,14 @@ function clause decode (0b011111 : [OE] : 0b001101000 : [Rc] as instr) = - Neg (RT,RA,OE,Rc) + Some(Neg(RT,RA,OE,Rc)) function clause execute (Neg (RT, RA, OE, Rc)) = - let (temp, overflow, _) = (~ (GPR[RA]) +_s (bit) 1) in + let (temp, overflow, _) = (~(GPR[RA]) +_s (bit) 1) in { GPR[RT] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else (); - if OE then set_SO_OV (overflow) else () + if Rc then set_overflow_cr0(temp,XER.SO) else (); + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[16]) Mulli @@ -2190,11 +2166,11 @@ function clause decode (0b000111 : (bit[5]) RT : (bit[5]) RA : (bit[16]) SI as instr) = - Mulli (RT,RA,SI) + Some(Mulli(RT,RA,SI)) function clause execute (Mulli (RT, RA, SI)) = { - (bit[128]) prod := GPR[RA] *_s EXTS (SI); + (bit[128]) prod := GPR[RA] *_s EXTS(SI); GPR[RT] := prod[64 .. 127] } @@ -2207,7 +2183,7 @@ function clause decode (0b011111 : [OE] : 0b011101011 : [Rc] as instr) = - Mullw (RT,RA,RB,OE,Rc) + Some(Mullw(RT,RA,RB,OE,Rc)) function clause execute (Mullw (RT, RA, RB, OE, Rc)) = let (prod, overflow, _) = ((GPR[RA])[32 .. 63] *_s (GPR[RB])[32 .. 63]) in @@ -2217,10 +2193,10 @@ function clause execute (Mullw (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (prod,xer_so) + set_overflow_cr0(prod,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit) Mulhw @@ -2232,7 +2208,7 @@ function clause decode (0b011111 : (bit[1]) _ : 0b001001011 : [Rc] as instr) = - Mulhw (RT,RA,RB,Rc) + Some(Mulhw(RT,RA,RB,Rc)) function clause execute (Mulhw (RT, RA, RB, Rc)) = { @@ -2244,13 +2220,13 @@ function clause execute (Mulhw (RT, RA, RB, Rc)) = overflow := o }; (GPR[RT])[32..63] := prod[0 .. 31]; - (GPR[RT])[0..31] := (bit[32]) undefined; + (GPR[RT])[0..31] := undefined; if Rc then { xer_so := XER.SO; if mode64bit then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (prod,xer_so) + else set_overflow_cr0(prod,xer_so) } else () } @@ -2264,19 +2240,19 @@ function clause decode (0b011111 : (bit[1]) _ : 0b000001011 : [Rc] as instr) = - Mulhwu (RT,RA,RB,Rc) + Some(Mulhwu(RT,RA,RB,Rc)) function clause execute (Mulhwu (RT, RA, RB, Rc)) = { (bit[64]) prod := (GPR[RA])[32 .. 63] * (GPR[RB])[32 .. 63]; (GPR[RT])[32..63] := prod[0 .. 31]; - (GPR[RT])[0..31] := (bit[32]) undefined; + (GPR[RT])[0..31] := undefined; if Rc then { xer_so := XER.SO; if mode64bit then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (prod,xer_so) + else set_overflow_cr0(prod,xer_so) } else () } @@ -2290,14 +2266,13 @@ function clause decode (0b011111 : [OE] : 0b111101011 : [Rc] as instr) = - Divw (RT,RA,RB,OE,Rc) + Some(Divw(RT,RA,RB,OE,Rc)) function clause execute (Divw (RT, RA, RB, OE, Rc)) = { (bit[32]) dividend := (GPR[RA])[32 .. 63]; (bit[32]) divisor := (GPR[RB])[32 .. 63]; - (bit[64]) divided := - 0b0000000000000000000000000000000000000000000000000000000000000000; + (bit[64]) divided := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit) overflow := 0; let (d, o, _) = (dividend quot_s divisor) in { @@ -2305,17 +2280,17 @@ function clause execute (Divw (RT, RA, RB, OE, Rc)) = overflow := o }; (GPR[RT])[32..63] := divided[32 .. 63]; - (GPR[RT])[0..31] := (bit[32]) undefined; + (GPR[RT])[0..31] := undefined; if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); if mode64bit | overflow then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (divided,xer_so) + else set_overflow_cr0(divided,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Divwu @@ -2327,14 +2302,13 @@ function clause decode (0b011111 : [OE] : 0b111001011 : [Rc] as instr) = - Divwu (RT,RA,RB,OE,Rc) + Some(Divwu(RT,RA,RB,OE,Rc)) function clause execute (Divwu (RT, RA, RB, OE, Rc)) = { (bit[32]) dividend := (GPR[RA])[32 .. 63]; (bit[32]) divisor := (GPR[RB])[32 .. 63]; - (bit[64]) divided := - 0b0000000000000000000000000000000000000000000000000000000000000000; + (bit[64]) divided := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit) overflow := 0; let (d, o, _) = (dividend quot divisor) in { @@ -2342,17 +2316,17 @@ function clause execute (Divwu (RT, RA, RB, OE, Rc)) = overflow := o }; (GPR[RT])[32..63] := divided[32 .. 63]; - (GPR[RT])[0..31] := (bit[32]) undefined; + (GPR[RT])[0..31] := undefined; if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); if mode64bit | overflow then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (divided,xer_so) + else set_overflow_cr0(divided,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Divwe @@ -2364,15 +2338,13 @@ function clause decode (0b011111 : [OE] : 0b110101011 : [Rc] as instr) = - Divwe (RT,RA,RB,OE,Rc) + Some(Divwe(RT,RA,RB,OE,Rc)) function clause execute (Divwe (RT, RA, RB, OE, Rc)) = { - (bit[64]) dividend := - (GPR[RA])[32 .. 63] : 0b00000000000000000000000000000000; + (bit[64]) dividend := (GPR[RA])[32 .. 63] : 0b00000000000000000000000000000000; (bit[32]) divisor := (GPR[RB])[32 .. 63]; - (bit[64]) divided := - 0b0000000000000000000000000000000000000000000000000000000000000000; + (bit[64]) divided := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit) overflow := 0; let (d, o, _) = (dividend quot_s divisor) in { @@ -2380,17 +2352,17 @@ function clause execute (Divwe (RT, RA, RB, OE, Rc)) = overflow := o }; (GPR[RT])[32..63] := divided[32 .. 63]; - (GPR[RT])[0..31] := (bit[32]) undefined; + (GPR[RT])[0..31] := undefined; if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); if mode64bit | overflow then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (divided,xer_so) + else set_overflow_cr0(divided,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Divweu @@ -2402,15 +2374,13 @@ function clause decode (0b011111 : [OE] : 0b110001011 : [Rc] as instr) = - Divweu (RT,RA,RB,OE,Rc) + Some(Divweu(RT,RA,RB,OE,Rc)) function clause execute (Divweu (RT, RA, RB, OE, Rc)) = { - (bit[64]) dividend := - (GPR[RA])[32 .. 63] : 0b00000000000000000000000000000000; + (bit[64]) dividend := (GPR[RA])[32 .. 63] : 0b00000000000000000000000000000000; (bit[32]) divisor := (GPR[RB])[32 .. 63]; - (bit[64]) divided := - 0b0000000000000000000000000000000000000000000000000000000000000000; + (bit[64]) divided := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit) overflow := 0; let (d, o, _) = (dividend quot divisor) in { @@ -2418,17 +2388,17 @@ function clause execute (Divweu (RT, RA, RB, OE, Rc)) = overflow := o }; (GPR[RT])[32..63] := divided[32 .. 63]; - (GPR[RT])[0..31] := (bit[32]) undefined; + (GPR[RT])[0..31] := undefined; if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); if mode64bit | overflow then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (divided,xer_so) + else set_overflow_cr0(divided,xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Mulld @@ -2440,7 +2410,7 @@ function clause decode (0b011111 : [OE] : 0b011101001 : [Rc] as instr) = - Mulld (RT,RA,RB,OE,Rc) + Some(Mulld(RT,RA,RB,OE,Rc)) function clause execute (Mulld (RT, RA, RB, OE, Rc)) = { @@ -2456,10 +2426,10 @@ function clause execute (Mulld (RT, RA, RB, OE, Rc)) = then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); - set_overflow_cr0 (prod[64 .. 127],xer_so) + set_overflow_cr0(prod[64 .. 127],xer_so) } else (); - if OE then set_SO_OV (overflow) else () + if OE then set_SO_OV(overflow) else () } union ast member (bit[5], bit[5], bit[5], bit) Mulhd @@ -2471,13 +2441,13 @@ function clause decode (0b011111 : (bit[1]) _ : 0b001001001 : [Rc] as instr) = - Mulhd (RT,RA,RB,Rc) + Some(Mulhd(RT,RA,RB,Rc)) function clause execute (Mulhd (RT, RA, RB, Rc)) = { (bit[128]) prod := GPR[RA] *_s GPR[RB]; GPR[RT] := prod[0 .. 63]; - if Rc then set_overflow_cr0 (prod[0 .. 63],XER.SO) else () + if Rc then set_overflow_cr0(prod[0 .. 63],XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Mulhdu @@ -2489,13 +2459,13 @@ function clause decode (0b011111 : (bit[1]) _ : 0b000001001 : [Rc] as instr) = - Mulhdu (RT,RA,RB,Rc) + Some(Mulhdu(RT,RA,RB,Rc)) function clause execute (Mulhdu (RT, RA, RB, Rc)) = { (bit[128]) prod := GPR[RA] * GPR[RB]; GPR[RT] := prod[0 .. 63]; - if Rc then set_overflow_cr0 (prod[0 .. 63],XER.SO) else () + if Rc then set_overflow_cr0(prod[0 .. 63],XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Divd @@ -2507,14 +2477,13 @@ function clause decode (0b011111 : [OE] : 0b111101001 : [Rc] as instr) = - Divd (RT,RA,RB,OE,Rc) + Some(Divd(RT,RA,RB,OE,Rc)) function clause execute (Divd (RT, RA, RB, OE, Rc)) = { (bit[64]) dividend := GPR[RA]; (bit[64]) divisor := GPR[RB]; - (bit[64]) divided := - 0b0000000000000000000000000000000000000000000000000000000000000000; + (bit[64]) divided := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit) overflow := 0; let (d, o, _) = (dividend quot_s divisor) in { @@ -2522,8 +2491,8 @@ function clause execute (Divd (RT, RA, RB, OE, Rc)) = overflow := o }; GPR[RT] := divided; - if OE then set_SO_OV (overflow) else (); - if Rc then set_overflow_cr0 (divided,overflow | XER.SO) else () + if OE then set_SO_OV(overflow) else (); + if Rc then set_overflow_cr0(divided,overflow | XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Divdu @@ -2535,14 +2504,13 @@ function clause decode (0b011111 : [OE] : 0b111001001 : [Rc] as instr) = - Divdu (RT,RA,RB,OE,Rc) + Some(Divdu(RT,RA,RB,OE,Rc)) function clause execute (Divdu (RT, RA, RB, OE, Rc)) = { (bit[64]) dividend := GPR[RA]; (bit[64]) divisor := GPR[RB]; - (bit[64]) divided := - 0b0000000000000000000000000000000000000000000000000000000000000000; + (bit[64]) divided := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit) overflow := 0; let (d, o, _) = (dividend quot divisor) in { @@ -2550,8 +2518,8 @@ function clause execute (Divdu (RT, RA, RB, OE, Rc)) = overflow := o }; GPR[RT] := divided; - if OE then set_SO_OV (overflow) else (); - if Rc then set_overflow_cr0 (divided,overflow | XER.SO) else () + if OE then set_SO_OV(overflow) else (); + if Rc then set_overflow_cr0(divided,overflow | XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit, bit) Divde @@ -2563,13 +2531,12 @@ function clause decode (0b011111 : [OE] : 0b110101001 : [Rc] as instr) = - Divde (RT,RA,RB,OE,Rc) + Some(Divde(RT,RA,RB,OE,Rc)) function clause execute (Divde (RT, RA, RB, OE, Rc)) = { (bit[128]) dividend := - GPR[RA] : - 0b0000000000000000000000000000000000000000000000000000000000000000; + GPR[RA] : 0b0000000000000000000000000000000000000000000000000000000000000000; (bit[64]) divisor := GPR[RB]; (bit[128]) divided := 0; (bit) overflow := 0; @@ -2579,14 +2546,14 @@ function clause execute (Divde (RT, RA, RB, OE, Rc)) = overflow := o }; GPR[RT] := divided[64 .. 127]; - if OE then set_SO_OV (overflow) else (); + if OE then set_SO_OV(overflow) else (); if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); if overflow then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (divided[64 .. 127],xer_so) + else set_overflow_cr0(divided[64 .. 127],xer_so) } else () } @@ -2600,13 +2567,12 @@ function clause decode (0b011111 : [OE] : 0b110001001 : [Rc] as instr) = - Divdeu (RT,RA,RB,OE,Rc) + Some(Divdeu(RT,RA,RB,OE,Rc)) function clause execute (Divdeu (RT, RA, RB, OE, Rc)) = { (bit[128]) dividend := - GPR[RA] : - 0b0000000000000000000000000000000000000000000000000000000000000000; + GPR[RA] : 0b0000000000000000000000000000000000000000000000000000000000000000; (bit[64]) divisor := GPR[RB]; (bit[128]) divided := 0; (bit) overflow := 0; @@ -2616,14 +2582,14 @@ function clause execute (Divdeu (RT, RA, RB, OE, Rc)) = overflow := o }; GPR[RT] := divided[64 .. 127]; - if OE then set_SO_OV (overflow) else (); + if OE then set_SO_OV(overflow) else (); if Rc then { xer_so := XER.SO; if OE & overflow then xer_so := overflow else (); if overflow then CR.CR0 := [undefined,undefined,undefined,xer_so] - else set_overflow_cr0 (divided[64 .. 127],xer_so) + else set_overflow_cr0(divided[64 .. 127],xer_so) } else () } @@ -2636,15 +2602,13 @@ function clause decode (0b001011 : [L] : (bit[5]) RA : (bit[16]) SI as instr) = - Cmpi (BF,L,RA,SI) + Some(Cmpi(BF,L,RA,SI)) function clause execute (Cmpi (BF, L, RA, SI)) = { (bit[64]) a := 0; - if L == 0 then a := EXTS ((GPR[RA])[32 .. 63]) else a := GPR[RA]; - if a < EXTS (SI) - then c := 0b100 - else if a > EXTS (SI) then c := 0b010 else c := 0b001; + if L == 0 then a := EXTS((GPR[RA])[32 .. 63]) else a := GPR[RA]; + if a < EXTS(SI) then c := 0b100 else if a > EXTS(SI) then c := 0b010 else c := 0b001; CR[4 * BF + 32..4 * BF + 35] := c : [XER.SO] } @@ -2658,7 +2622,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000000000 : (bit[1]) _ as instr) = - Cmp (BF,L,RA,RB) + Some(Cmp(BF,L,RA,RB)) function clause execute (Cmp (BF, L, RA, RB)) = { @@ -2666,8 +2630,8 @@ function clause execute (Cmp (BF, L, RA, RB)) = (bit[64]) b := 0; if L == 0 then { - a := EXTS ((GPR[RA])[32 .. 63]); - b := EXTS ((GPR[RB])[32 .. 63]) + a := EXTS((GPR[RA])[32 .. 63]); + b := EXTS((GPR[RB])[32 .. 63]) } else { a := GPR[RA]; @@ -2685,15 +2649,13 @@ function clause decode (0b001010 : [L] : (bit[5]) RA : (bit[16]) UI as instr) = - Cmpli (BF,L,RA,UI) + Some(Cmpli(BF,L,RA,UI)) function clause execute (Cmpli (BF, L, RA, UI)) = { (bit[64]) a := 0; (bit[3]) c := 0; - if L == 0 - then a := 0b00000000000000000000000000000000 : (GPR[RA])[32 .. 63] - else a := GPR[RA]; + if L == 0 then a := 0b00000000000000000000000000000000 : (GPR[RA])[32 .. 63] else a := GPR[RA]; if a <_u 0b000000000000000000000000000000000000000000000000 : UI then c := 0b100 else if a >_u 0b000000000000000000000000000000000000000000000000 : UI @@ -2712,7 +2674,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000100000 : (bit[1]) _ as instr) = - Cmpl (BF,L,RA,RB) + Some(Cmpl(BF,L,RA,RB)) function clause execute (Cmpl (BF, L, RA, RB)) = { @@ -2738,16 +2700,16 @@ function clause decode (0b000011 : (bit[5]) TO : (bit[5]) RA : (bit[16]) SI as instr) = - Twi (TO,RA,SI) + Some(Twi(TO,RA,SI)) function clause execute (Twi (TO, RA, SI)) = { - a := EXTS ((GPR[RA])[32 .. 63]); - if a < EXTS (SI) & TO[0] then trap () else (); - if a > EXTS (SI) & TO[1] then trap () else (); - if a == EXTS (SI) & TO[2] then trap () else (); - if a <_u EXTS (SI) & TO[3] then trap () else (); - if a >_u EXTS (SI) & TO[4] then trap () else () + a := EXTS((GPR[RA])[32 .. 63]); + if a < EXTS(SI) & TO[0] then trap() else (); + if a > EXTS(SI) & TO[1] then trap() else (); + if a == EXTS(SI) & TO[2] then trap() else (); + if a <_u EXTS(SI) & TO[3] then trap() else (); + if a >_u EXTS(SI) & TO[4] then trap() else () } union ast member (bit[5], bit[5], bit[5]) Tw @@ -2758,17 +2720,17 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000000100 : (bit[1]) _ as instr) = - Tw (TO,RA,RB) + Some(Tw(TO,RA,RB)) function clause execute (Tw (TO, RA, RB)) = { - a := EXTS ((GPR[RA])[32 .. 63]); - b := EXTS ((GPR[RB])[32 .. 63]); - if a < b & TO[0] then trap () else (); - if a > b & TO[1] then trap () else (); - if a == b & TO[2] then trap () else (); - if a <_u b & TO[3] then trap () else (); - if a >_u b & TO[4] then trap () else () + a := EXTS((GPR[RA])[32 .. 63]); + b := EXTS((GPR[RB])[32 .. 63]); + if a < b & TO[0] then trap() else (); + if a > b & TO[1] then trap() else (); + if a == b & TO[2] then trap() else (); + if a <_u b & TO[3] then trap() else (); + if a >_u b & TO[4] then trap() else () } union ast member (bit[5], bit[5], bit[16]) Tdi @@ -2777,7 +2739,7 @@ function clause decode (0b000010 : (bit[5]) TO : (bit[5]) RA : (bit[16]) SI as instr) = - Tdi (TO,RA,SI) + Some(Tdi(TO,RA,SI)) function clause execute (Tdi (TO, RA, SI)) = () @@ -2789,7 +2751,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001000100 : (bit[1]) _ as instr) = - Td (TO,RA,RB) + Some(Td(TO,RA,RB)) function clause execute (Td (TO, RA, RB)) = () @@ -2802,7 +2764,7 @@ function clause decode (0b011111 : (bit[5]) BC : 0b01111 : (bit[1]) _ as instr) = - Isel (RT,RA,RB,BC) + Some(Isel(RT,RA,RB,BC)) function clause execute (Isel (RT, RA, RB, BC)) = { @@ -2822,14 +2784,13 @@ function clause decode (0b011100 : (bit[5]) RS : (bit[5]) RA : (bit[16]) UI as instr) = - Andi (RS,RA,UI) + Some(Andi(RS,RA,UI)) function clause execute (Andi (RS, RA, UI)) = { - (bit[64]) temp := - (GPR[RS] & 0b000000000000000000000000000000000000000000000000 : UI); + (bit[64]) temp := (GPR[RS] & 0b000000000000000000000000000000000000000000000000 : UI); GPR[RA] := temp; - set_overflow_cr0 (temp,XER.SO) + set_overflow_cr0(temp,XER.SO) } union ast member (bit[5], bit[5], bit[16]) Andis @@ -2838,14 +2799,13 @@ function clause decode (0b011101 : (bit[5]) RS : (bit[5]) RA : (bit[16]) UI as instr) = - Andis (RS,RA,UI) + Some(Andis(RS,RA,UI)) function clause execute (Andis (RS, RA, UI)) = { - (bit[64]) temp := - (GPR[RS] & 0b00000000000000000000000000000000 : UI : 0b0000000000000000); + (bit[64]) temp := (GPR[RS] & 0b00000000000000000000000000000000 : UI : 0b0000000000000000); GPR[RA] := temp; - set_overflow_cr0 (temp,XER.SO) + set_overflow_cr0(temp,XER.SO) } union ast member (bit[5], bit[5], bit[16]) Ori @@ -2854,7 +2814,7 @@ function clause decode (0b011000 : (bit[5]) RS : (bit[5]) RA : (bit[16]) UI as instr) = - Ori (RS,RA,UI) + Some(Ori(RS,RA,UI)) function clause execute (Ori (RS, RA, UI)) = GPR[RA] := (GPR[RS] | 0b000000000000000000000000000000000000000000000000 : UI) @@ -2865,11 +2825,10 @@ function clause decode (0b011001 : (bit[5]) RS : (bit[5]) RA : (bit[16]) UI as instr) = - Oris (RS,RA,UI) + Some(Oris(RS,RA,UI)) function clause execute (Oris (RS, RA, UI)) = - GPR[RA] := - (GPR[RS] | 0b00000000000000000000000000000000 : UI : 0b0000000000000000) + GPR[RA] := (GPR[RS] | 0b00000000000000000000000000000000 : UI : 0b0000000000000000) union ast member (bit[5], bit[5], bit[16]) Xori @@ -2877,7 +2836,7 @@ function clause decode (0b011010 : (bit[5]) RS : (bit[5]) RA : (bit[16]) UI as instr) = - Xori (RS,RA,UI) + Some(Xori(RS,RA,UI)) function clause execute (Xori (RS, RA, UI)) = GPR[RA] := GPR[RS] ^ 0b000000000000000000000000000000000000000000000000 : UI @@ -2888,11 +2847,10 @@ function clause decode (0b011011 : (bit[5]) RS : (bit[5]) RA : (bit[16]) UI as instr) = - Xoris (RS,RA,UI) + Some(Xoris(RS,RA,UI)) function clause execute (Xoris (RS, RA, UI)) = - GPR[RA] := - GPR[RS] ^ 0b00000000000000000000000000000000 : UI : 0b0000000000000000 + GPR[RA] := GPR[RS] ^ 0b00000000000000000000000000000000 : UI : 0b0000000000000000 union ast member (bit[5], bit[5], bit[5], bit) And @@ -2902,13 +2860,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000011100 : [Rc] as instr) = - And (RS,RA,RB,Rc) + Some(And(RS,RA,RB,Rc)) function clause execute (And (RS, RA, RB, Rc)) = { (bit[64]) temp := (GPR[RS] & GPR[RB]); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Xor @@ -2919,7 +2877,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0100111100 : [Rc] as instr) = - Xor (RS,RA,RB,Rc) + Some(Xor(RS,RA,RB,Rc)) function clause execute (Xor (RS, RA, RB, Rc)) = { @@ -2934,7 +2892,7 @@ function clause execute (Xor (RS, RA, RB, Rc)) = temp := GPR[RS] ^ GPR[RB]; GPR[RA] := temp }; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Nand @@ -2945,13 +2903,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0111011100 : [Rc] as instr) = - Nand (RS,RA,RB,Rc) + Some(Nand(RS,RA,RB,Rc)) function clause execute (Nand (RS, RA, RB, Rc)) = { - (bit[64]) temp := ~ (GPR[RS] & GPR[RB]); + (bit[64]) temp := ~(GPR[RS] & GPR[RB]); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Or @@ -2962,13 +2920,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0110111100 : [Rc] as instr) = - Or (RS,RA,RB,Rc) + Some(Or(RS,RA,RB,Rc)) function clause execute (Or (RS, RA, RB, Rc)) = { (bit[64]) temp := (GPR[RS] | GPR[RB]); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Nor @@ -2979,13 +2937,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001111100 : [Rc] as instr) = - Nor (RS,RA,RB,Rc) + Some(Nor(RS,RA,RB,Rc)) function clause execute (Nor (RS, RA, RB, Rc)) = { - (bit[64]) temp := ~ (GPR[RS] | GPR[RB]); + (bit[64]) temp := ~(GPR[RS] | GPR[RB]); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Eqv @@ -2996,13 +2954,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0100011100 : [Rc] as instr) = - Eqv (RS,RA,RB,Rc) + Some(Eqv(RS,RA,RB,Rc)) function clause execute (Eqv (RS, RA, RB, Rc)) = { - (bit[64]) temp := GPR[RS] ^ ~ (GPR[RB]); + (bit[64]) temp := GPR[RS] ^ ~(GPR[RB]); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Andc @@ -3013,13 +2971,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000111100 : [Rc] as instr) = - Andc (RS,RA,RB,Rc) + Some(Andc(RS,RA,RB,Rc)) function clause execute (Andc (RS, RA, RB, Rc)) = { - (bit[64]) temp := (GPR[RS] & ~ (GPR[RB])); + (bit[64]) temp := (GPR[RS] & ~(GPR[RB])); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Orc @@ -3030,13 +2988,13 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0110011100 : [Rc] as instr) = - Orc (RS,RA,RB,Rc) + Some(Orc(RS,RA,RB,Rc)) function clause execute (Orc (RS, RA, RB, Rc)) = { - (bit[64]) temp := (GPR[RS] | ~ (GPR[RB])); + (bit[64]) temp := (GPR[RS] | ~(GPR[RB])); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit) Extsb @@ -3047,7 +3005,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1110111010 : [Rc] as instr) = - Extsb (RS,RA,Rc) + Some(Extsb(RS,RA,Rc)) function clause execute (Extsb (RS, RA, Rc)) = { @@ -3057,7 +3015,7 @@ function clause execute (Extsb (RS, RA, Rc)) = (GPR[RA])[56..63] := temp[56 .. 63]; temp[0..55] := s ^^ 56; (GPR[RA])[0..55] := temp[0 .. 55]; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit) Extsh @@ -3068,7 +3026,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1110011010 : [Rc] as instr) = - Extsh (RS,RA,Rc) + Some(Extsh(RS,RA,Rc)) function clause execute (Extsh (RS, RA, Rc)) = { @@ -3078,7 +3036,7 @@ function clause execute (Extsh (RS, RA, Rc)) = (GPR[RA])[48..63] := temp[48 .. 63]; temp[0..47] := s ^^ 48; (GPR[RA])[0..47] := temp[0 .. 47]; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit) Cntlzw @@ -3089,13 +3047,13 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0000011010 : [Rc] as instr) = - Cntlzw (RS,RA,Rc) + Some(Cntlzw(RS,RA,Rc)) function clause execute (Cntlzw (RS, RA, Rc)) = { - temp := (bit[64]) (countLeadingZeroes (GPR[RS],32)); + temp := (bit[64]) (countLeadingZeroes(GPR[RS],32)); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5]) Cmpb @@ -3106,7 +3064,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0111111100 : (bit[1]) _ as instr) = - Cmpb (RS,RA,RB) + Some(Cmpb(RS,RA,RB)) function clause execute (Cmpb (RS, RA, RB)) = foreach (n from 0 to 7 by 1 in inc) @@ -3122,14 +3080,13 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0001111010 : (bit[1]) _ as instr) = - Popcntb (RS,RA) + Some(Popcntb(RS,RA)) function clause execute (Popcntb (RS, RA)) = foreach (i from 0 to 7 by 1 in inc) { ([|64|]) n := 0; - foreach (j from 0 to 7 by 1 in inc) - if (GPR[RS])[i * 8 + j] == 1 then n := n + 1 else (); + foreach (j from 0 to 7 by 1 in inc) if (GPR[RS])[i * 8 + j] == 1 then n := n + 1 else (); (GPR[RA])[i * 8..i * 8 + 7] := (bit[8]) n } @@ -3141,14 +3098,13 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0101111010 : (bit[1]) _ as instr) = - Popcntw (RS,RA) + Some(Popcntw(RS,RA)) function clause execute (Popcntw (RS, RA)) = foreach (i from 0 to 1 by 1 in inc) { ([|64|]) n := 0; - foreach (j from 0 to 31 by 1 in inc) - if (GPR[RS])[i * 32 + j] == 1 then n := n + 1 else (); + foreach (j from 0 to 31 by 1 in inc) if (GPR[RS])[i * 32 + j] == 1 then n := n + 1 else (); (GPR[RA])[i * 32..i * 32 + 31] := (bit[32]) n } @@ -3160,14 +3116,13 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0010111010 : (bit[1]) _ as instr) = - Prtyd (RS,RA) + Some(Prtyd(RS,RA)) function clause execute (Prtyd (RS, RA)) = { s := 0; foreach (i from 0 to 7 by 1 in inc) s := s ^ (GPR[RS])[i * 8 + 7]; - GPR[RA] := - 0b000000000000000000000000000000000000000000000000000000000000000 : [s] + GPR[RA] := 0b000000000000000000000000000000000000000000000000000000000000000 : [s] } union ast member (bit[5], bit[5]) Prtyw @@ -3178,7 +3133,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0010011010 : (bit[1]) _ as instr) = - Prtyw (RS,RA) + Some(Prtyw(RS,RA)) function clause execute (Prtyw (RS, RA)) = { @@ -3198,7 +3153,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1111011010 : [Rc] as instr) = - Extsw (RS,RA,Rc) + Some(Extsw(RS,RA,Rc)) function clause execute (Extsw (RS, RA, Rc)) = { @@ -3206,7 +3161,7 @@ function clause execute (Extsw (RS, RA, Rc)) = (bit[64]) temp := 0; temp[32..63] := (GPR[RS])[32 .. 63]; temp[0..31] := s ^^ 32; - if Rc then set_overflow_cr0 (temp,XER.SO) else (); + if Rc then set_overflow_cr0(temp,XER.SO) else (); GPR[RA] := temp } @@ -3218,13 +3173,13 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0000111010 : [Rc] as instr) = - Cntlzd (RS,RA,Rc) + Some(Cntlzd(RS,RA,Rc)) function clause execute (Cntlzd (RS, RA, Rc)) = { - temp := (bit[64]) (countLeadingZeroes (GPR[RS],0)); + temp := (bit[64]) (countLeadingZeroes(GPR[RS],0)); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5]) Popcntd @@ -3235,13 +3190,12 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0111111010 : (bit[1]) _ as instr) = - Popcntd (RS,RA) + Some(Popcntd(RS,RA)) function clause execute (Popcntd (RS, RA)) = { ([|64|]) n := 0; - foreach (i from 0 to 63 by 1 in inc) - if (GPR[RS])[i] == 1 then n := n + 1 else (); + foreach (i from 0 to 63 by 1 in inc) if (GPR[RS])[i] == 1 then n := n + 1 else (); GPR[RA] := (bit[64]) n } @@ -3253,7 +3207,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0011111100 : (bit[1]) _ as instr) = - Bpermd (RS,RA,RB) + Some(Bpermd(RS,RA,RB)) function clause execute (Bpermd (RS, RA, RB)) = { @@ -3268,8 +3222,7 @@ function clause execute (Bpermd (RS, RA, RB)) = discard := GPR[RB] } }; - GPR[RA] := - 0b00000000000000000000000000000000000000000000000000000000 : perm[0 .. 7] + GPR[RA] := 0b00000000000000000000000000000000000000000000000000000000 : perm[0 .. 7] } union ast member (bit[5], bit[5], bit[5], bit[5], bit[5], bit) Rlwinm @@ -3281,16 +3234,16 @@ function clause decode (0b010101 : (bit[5]) MB : (bit[5]) ME : [Rc] as instr) = - Rlwinm (RS,RA,SH,MB,ME,Rc) + Some(Rlwinm(RS,RA,SH,MB,ME,Rc)) function clause execute (Rlwinm (RS, RA, SH, MB, ME, Rc)) = { n := SH; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); - m := MASK (MB + 32,ME + 32); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); + m := MASK(MB + 32,ME + 32); (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit[5], bit[5], bit) Rlwnm @@ -3302,16 +3255,16 @@ function clause decode (0b010111 : (bit[5]) MB : (bit[5]) ME : [Rc] as instr) = - Rlwnm (RS,RA,RB,MB,ME,Rc) + Some(Rlwnm(RS,RA,RB,MB,ME,Rc)) function clause execute (Rlwnm (RS, RA, RB, MB, ME, Rc)) = { n := (GPR[RB])[59 .. 63]; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); - m := MASK (MB + 32,ME + 32); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); + m := MASK(MB + 32,ME + 32); (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit[5], bit[5], bit) Rlwimi @@ -3323,85 +3276,16 @@ function clause decode (0b010100 : (bit[5]) MB : (bit[5]) ME : [Rc] as instr) = - Rlwimi (RS,RA,SH,MB,ME,Rc) + Some(Rlwimi(RS,RA,SH,MB,ME,Rc)) function clause execute (Rlwimi (RS, RA, SH, MB, ME, Rc)) = { n := SH; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); - m := MASK (MB + 32,ME + 32); - (bit[64]) temp := (r & m | GPR[RA] & ~ (m)); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); + m := MASK(MB + 32,ME + 32); + (bit[64]) temp := (r & m | GPR[RA] & ~(m)); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () - } - -union ast member (bit[5], bit[5], bit[6], bit[6], bit) Rldicl - -function clause decode (0b011110 : -(bit[5]) RS : -(bit[5]) RA : -(bit[5]) _ : -(bit[6]) mb : -0b000 : -(bit[1]) _ : -[Rc] as instr) = - Rldicl (RS,RA,instr[16 .. 20] : instr[30 .. 30],mb,Rc) - -function clause execute (Rldicl (RS, RA, sh, mb, Rc)) = - { - n := [sh[5]] : sh[0 .. 4]; - r := ROTL (GPR[RS],n); - b := [mb[5]] : mb[0 .. 4]; - m := MASK (b,63); - (bit[64]) temp := (r & m); - GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () - } - -union ast member (bit[5], bit[5], bit[6], bit[6], bit) Rldicr - -function clause decode (0b011110 : -(bit[5]) RS : -(bit[5]) RA : -(bit[5]) _ : -(bit[6]) me : -0b001 : -(bit[1]) _ : -[Rc] as instr) = - Rldicr (RS,RA,instr[16 .. 20] : instr[30 .. 30],me,Rc) - -function clause execute (Rldicr (RS, RA, sh, me, Rc)) = - { - n := [sh[5]] : sh[0 .. 4]; - r := ROTL (GPR[RS],n); - e := [me[5]] : me[0 .. 4]; - m := MASK (0,e); - (bit[64]) temp := (r & m); - GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () - } - -union ast member (bit[5], bit[5], bit[6], bit[6], bit) Rldic - -function clause decode (0b011110 : -(bit[5]) RS : -(bit[5]) RA : -(bit[5]) _ : -(bit[6]) mb : -0b010 : -(bit[1]) _ : -[Rc] as instr) = - Rldic (RS,RA,instr[16 .. 20] : instr[30 .. 30],mb,Rc) - -function clause execute (Rldic (RS, RA, sh, mb, Rc)) = - { - n := [sh[5]] : sh[0 .. 4]; - r := ROTL (GPR[RS],n); - b := [mb[5]] : mb[0 .. 4]; - m := MASK (b,(bit[6]) (~ (n))); - (bit[64]) temp := (r & m); - GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit[6], bit) Rldcl @@ -3413,17 +3297,17 @@ function clause decode (0b011110 : (bit[6]) mb : 0b1000 : [Rc] as instr) = - Rldcl (RS,RA,RB,mb,Rc) + Some(Rldcl(RS,RA,RB,mb,Rc)) function clause execute (Rldcl (RS, RA, RB, mb, Rc)) = { n := (GPR[RB])[58 .. 63]; - r := ROTL (GPR[RS],n); + r := ROTL(GPR[RS],n); b := [mb[5]] : mb[0 .. 4]; - m := MASK (b,63); + m := MASK(b,63); (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit[6], bit) Rldcr @@ -3435,40 +3319,17 @@ function clause decode (0b011110 : (bit[6]) me : 0b1001 : [Rc] as instr) = - Rldcr (RS,RA,RB,me,Rc) + Some(Rldcr(RS,RA,RB,me,Rc)) function clause execute (Rldcr (RS, RA, RB, me, Rc)) = { n := (GPR[RB])[58 .. 63]; - r := ROTL (GPR[RS],n); + r := ROTL(GPR[RS],n); e := [me[5]] : me[0 .. 4]; - m := MASK (0,e); + m := MASK(0,e); (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () - } - -union ast member (bit[5], bit[5], bit[6], bit[6], bit) Rldimi - -function clause decode (0b011110 : -(bit[5]) RS : -(bit[5]) RA : -(bit[5]) _ : -(bit[6]) mb : -0b011 : -(bit[1]) _ : -[Rc] as instr) = - Rldimi (RS,RA,instr[16 .. 20] : instr[30 .. 30],mb,Rc) - -function clause execute (Rldimi (RS, RA, sh, mb, Rc)) = - { - n := [sh[5]] : sh[0 .. 4]; - r := ROTL (GPR[RS],n); - b := [mb[5]] : mb[0 .. 4]; - m := MASK (b,(bit[6]) (~ (n))); - (bit[64]) temp := (r & m | GPR[RA] & ~ (m)); - GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Slw @@ -3479,18 +3340,18 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000011000 : [Rc] as instr) = - Slw (RS,RA,RB,Rc) + Some(Slw(RS,RA,RB,Rc)) function clause execute (Slw (RS, RA, RB, Rc)) = { n := (GPR[RB])[59 .. 63]; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],n); if (GPR[RB])[58] == 0 - then m := MASK (32,63 - n) + then m := MASK(32,63 - n) else m := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Srw @@ -3501,18 +3362,18 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1000011000 : [Rc] as instr) = - Srw (RS,RA,RB,Rc) + Some(Srw(RS,RA,RB,Rc)) function clause execute (Srw (RS, RA, RB, Rc)) = { n := (GPR[RB])[59 .. 63]; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],64 - n); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],64 - n); if (GPR[RB])[58] == 0 - then m := MASK (n + 32,63) + then m := MASK(n + 32,63) else m := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Srawi @@ -3523,18 +3384,18 @@ function clause decode (0b011111 : (bit[5]) SH : 0b1100111000 : [Rc] as instr) = - Srawi (RS,RA,SH,Rc) + Some(Srawi(RS,RA,SH,Rc)) function clause execute (Srawi (RS, RA, SH, Rc)) = { n := SH; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],64 - n); - m := MASK (n + 32,63); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],64 - n); + m := MASK(n + 32,63); s := (GPR[RS])[32]; - (bit[64]) temp := (r & m | s ^^ 64 & ~ (m)); + (bit[64]) temp := (r & m | s ^^ 64 & ~(m)); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else (); - XER.CA := if n >_u (bit[5]) 0 then s & ~ ((r & ~ (m)) == 0) else 0 + if Rc then set_overflow_cr0(temp,XER.SO) else (); + XER.CA := if n >_u (bit[5]) 0 then s & ~((r & ~(m)) == 0) else 0 } union ast member (bit[5], bit[5], bit[5], bit) Sraw @@ -3545,20 +3406,20 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1100011000 : [Rc] as instr) = - Sraw (RS,RA,RB,Rc) + Some(Sraw(RS,RA,RB,Rc)) function clause execute (Sraw (RS, RA, RB, Rc)) = { n := (GPR[RB])[59 .. 63]; - r := ROTL ((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],64 - n); + r := ROTL((GPR[RS])[32 .. 63] : (GPR[RS])[32 .. 63],64 - n); if (GPR[RB])[58] == 0 - then m := MASK (n + 32,63) + then m := MASK(n + 32,63) else m := 0b0000000000000000000000000000000000000000000000000000000000000000; s := (GPR[RS])[32]; - (bit[64]) temp := (r & m | s ^^ 64 & ~ (m)); + (bit[64]) temp := (r & m | s ^^ 64 & ~(m)); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else (); - XER.CA := if n >_u (bit[5]) 0 then s & ~ ((r & ~ (m)) == 0) else 0 + if Rc then set_overflow_cr0(temp,XER.SO) else (); + XER.CA := if n >_u (bit[5]) 0 then s & ~((r & ~(m)) == 0) else 0 } union ast member (bit[5], bit[5], bit[5], bit) Sld @@ -3569,18 +3430,18 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000011011 : [Rc] as instr) = - Sld (RS,RA,RB,Rc) + Some(Sld(RS,RA,RB,Rc)) function clause execute (Sld (RS, RA, RB, Rc)) = { n := (GPR[RB])[58 .. 63]; - r := ROTL (GPR[RS],n); + r := ROTL(GPR[RS],n); if (GPR[RB])[57] == 0 - then m := MASK (0,63 - n) + then m := MASK(0,63 - n) else m := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Srd @@ -3591,41 +3452,18 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1000011011 : [Rc] as instr) = - Srd (RS,RA,RB,Rc) + Some(Srd(RS,RA,RB,Rc)) function clause execute (Srd (RS, RA, RB, Rc)) = { n := (GPR[RB])[58 .. 63]; - r := ROTL (GPR[RS],64 - n); + r := ROTL(GPR[RS],64 - n); if (GPR[RB])[57] == 0 - then m := MASK (n,63) + then m := MASK(n,63) else m := 0b0000000000000000000000000000000000000000000000000000000000000000; (bit[64]) temp := (r & m); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else () - } - -union ast member (bit[5], bit[5], bit[6], bit) Sradi - -function clause decode (0b011111 : -(bit[5]) RS : -(bit[5]) RA : -(bit[5]) _ : -0b110011101 : -(bit[1]) _ : -[Rc] as instr) = - Sradi (RS,RA,instr[16 .. 20] : instr[30 .. 30],Rc) - -function clause execute (Sradi (RS, RA, sh, Rc)) = - { - n := [sh[5]] : sh[0 .. 4]; - r := ROTL (GPR[RS],64 - n); - m := MASK (n,63); - s := (GPR[RS])[0]; - (bit[64]) temp := (r & m | s ^^ 64 & ~ (m)); - GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else (); - XER.CA := if n >_u (bit[6]) 0 then s & ~ ((r & ~ (m)) == 0) else 0 + if Rc then set_overflow_cr0(temp,XER.SO) else () } union ast member (bit[5], bit[5], bit[5], bit) Srad @@ -3636,20 +3474,20 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1100011010 : [Rc] as instr) = - Srad (RS,RA,RB,Rc) + Some(Srad(RS,RA,RB,Rc)) function clause execute (Srad (RS, RA, RB, Rc)) = { n := (GPR[RB])[58 .. 63]; - r := ROTL (GPR[RS],64 - n); + r := ROTL(GPR[RS],64 - n); if (GPR[RB])[57] == 0 - then m := MASK (n,63) + then m := MASK(n,63) else m := 0b0000000000000000000000000000000000000000000000000000000000000000; s := (GPR[RS])[0]; - (bit[64]) temp := (r & m | s ^^ 64 & ~ (m)); + (bit[64]) temp := (r & m | s ^^ 64 & ~(m)); GPR[RA] := temp; - if Rc then set_overflow_cr0 (temp,XER.SO) else (); - XER.CA := if n >_u (bit[6]) 0 then s & ~ ((r & ~ (m)) == 0) else 0 + if Rc then set_overflow_cr0(temp,XER.SO) else (); + XER.CA := if n >_u (bit[6]) 0 then s & ~((r & ~(m)) == 0) else 0 } union ast member (bit[5], bit[5]) Cdtbcd @@ -3660,15 +3498,15 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0100011010 : (bit[1]) _ as instr) = - Cdtbcd (RS,RA) + Some(Cdtbcd(RS,RA)) function clause execute (Cdtbcd (RS, RA)) = foreach (i from 0 to 1 by 1 in inc) { n := i * 32; (GPR[RA])[n + 0..n + 7] := (bit[8]) 0; - (GPR[RA])[n + 8..n + 19] := DEC_TO_BCD ((GPR[RS])[n + 12 .. n + 21]); - (GPR[RA])[n + 20..n + 31] := DEC_TO_BCD ((GPR[RS])[n + 22 .. n + 31]) + (GPR[RA])[n + 8..n + 19] := DEC_TO_BCD((GPR[RS])[n + 12 .. n + 21]); + (GPR[RA])[n + 20..n + 31] := DEC_TO_BCD((GPR[RS])[n + 22 .. n + 31]) } union ast member (bit[5], bit[5]) Cbcdtd @@ -3679,15 +3517,15 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0100111010 : (bit[1]) _ as instr) = - Cbcdtd (RS,RA) + Some(Cbcdtd(RS,RA)) function clause execute (Cbcdtd (RS, RA)) = foreach (i from 0 to 1 by 1 in inc) { n := i * 32; (GPR[RA])[n + 0..n + 11] := (bit[12]) 0; - (GPR[RA])[n + 12..n + 21] := BCD_TO_DEC ((GPR[RS])[n + 8 .. n + 19]); - (GPR[RA])[n + 22..n + 31] := BCD_TO_DEC ((GPR[RS])[n + 20 .. n + 31]) + (GPR[RA])[n + 12..n + 21] := BCD_TO_DEC((GPR[RS])[n + 8 .. n + 19]); + (GPR[RA])[n + 22..n + 31] := BCD_TO_DEC((GPR[RS])[n + 20 .. n + 31]) } union ast member (bit[5], bit[5], bit[5]) Addg6s @@ -3699,14 +3537,13 @@ function clause decode (0b011111 : (bit[1]) _ : 0b001001010 : (bit[1]) _ as instr) = - Addg6s (RT,RA,RB) + Some(Addg6s(RT,RA,RB)) function clause execute (Addg6s (RT, RA, RB)) = { (bit[16]) dc := 0; foreach (i from 0 to 15 by 1 in inc) - let (v, _, co) = ((GPR[RA])[4 * i .. 63] + (GPR[RB])[4 * i .. 63]) in - dc[i] := carry_out (v,co); + let (v, _, co) = ((GPR[RA])[4 * i .. 63] + (GPR[RB])[4 * i .. 63]) in dc[i] := carry_out(v,co); c := (dc[0] ^^ 4) : (dc[1] ^^ 4) : @@ -3720,11 +3557,8 @@ function clause execute (Addg6s (RT, RA, RB)) = (dc[9] ^^ 4) : (dc[10] ^^ 4) : (dc[11] ^^ 4) : - (dc[12] ^^ 4) : - (dc[13] ^^ 4) : (dc[14] ^^ 4) : (dc[15] ^^ 4); - GPR[RT] := - (~ (c) & - 0b0110011001100110011001100110011001100110011001100110011001100110) + (dc[12] ^^ 4) : (dc[13] ^^ 4) : (dc[14] ^^ 4) : (dc[15] ^^ 4); + GPR[RT] := (~(c) & 0b0110011001100110011001100110011001100110011001100110011001100110) } union ast member (bit[5], bit[10]) Mtspr @@ -3734,27 +3568,27 @@ function clause decode (0b011111 : (bit[10]) spr : 0b0111010011 : (bit[1]) _ as instr) = - Mtspr (RS,spr) + Some(Mtspr(RS,spr)) function clause execute (Mtspr (RS, spr)) = { n := spr[5 .. 9] : spr[0 .. 4]; if n == 13 - then trap (()) + then trap(()) else if n == 1 then { (bit[64]) reg := GPR[RS]; - (bit[32]) front := zero_or_undef (reg[0 .. 31]); + (bit[32]) front := zero_or_undef(reg[0 .. 31]); (bit) xer_so := reg[32]; (bit) xer_ov := reg[33]; (bit) xer_ca := reg[34]; - (bit[22]) mid := zero_or_undef (reg[35 .. 56]); + (bit[22]) mid := zero_or_undef(reg[35 .. 56]); (bit[7]) bot := reg[57 .. 63]; XER := front : [xer_so] : [xer_ov] : [xer_ca] : mid : bot } - else if length (SPR[n]) == 64 + else if length(SPR[n]) == 64 then SPR[n] := GPR[RS] - else SPR[n] := ((bit[32]) 0):(GPR[RS])[32 .. 63] + else if n == 152 then CTRL := (GPR[RS])[32 .. 63] else () } union ast member (bit[5], bit[10]) Mfspr @@ -3764,12 +3598,12 @@ function clause decode (0b011111 : (bit[10]) spr : 0b0101010011 : (bit[1]) _ as instr) = - Mfspr (RT,spr) + Some(Mfspr(RT,spr)) function clause execute (Mfspr (RT, spr)) = { n := spr[5 .. 9] : spr[0 .. 4]; - if length (SPR[n]) == 64 + if length(SPR[n]) == 64 then GPR[RT] := SPR[n] else GPR[RT] := 0b00000000000000000000000000000000 : SPR[n] } @@ -3783,7 +3617,7 @@ function clause decode (0b011111 : (bit[1]) _ : 0b0010010000 : (bit[1]) _ as instr) = - Mtcrf (RS,FXM) + Some(Mtcrf(RS,FXM)) function clause execute (Mtcrf (RS, FXM)) = { @@ -3791,11 +3625,8 @@ function clause execute (Mtcrf (RS, FXM)) = (FXM[0] ^^ 4) : (FXM[1] ^^ 4) : (FXM[2] ^^ 4) : - (FXM[3] ^^ 4) : - (FXM[4] ^^ 4) : (FXM[5] ^^ 4) : (FXM[6] ^^ 4) : (FXM[7] ^^ 4); - CR := - ((bit[32]) ((GPR[RS])[32 .. 63] & mask) | - (bit[32]) (CR & ~ ((bit[32]) mask))) + (FXM[3] ^^ 4) : (FXM[4] ^^ 4) : (FXM[5] ^^ 4) : (FXM[6] ^^ 4) : (FXM[7] ^^ 4); + CR := ((bit[32]) ((GPR[RS])[32 .. 63] & mask) | (bit[32]) (CR & ~((bit[32]) mask))) } union ast member (bit[5]) Mfcr @@ -3806,10 +3637,9 @@ function clause decode (0b011111 : (bit[9]) _ : 0b0000010011 : (bit[1]) _ as instr) = - Mfcr (RT) + Some(Mfcr(RT)) -function clause execute (Mfcr (RT)) = - GPR[RT] := 0b00000000000000000000000000000000 : CR +function clause execute (Mfcr (RT)) = GPR[RT] := 0b00000000000000000000000000000000 : CR union ast member (bit[5], bit[8]) Mtocrf @@ -3820,7 +3650,7 @@ function clause decode (0b011111 : (bit[1]) _ : 0b0010010000 : (bit[1]) _ as instr) = - Mtocrf (RS,FXM) + Some(Mtocrf(RS,FXM)) function clause execute (Mtocrf (RS, FXM)) = { @@ -3847,7 +3677,7 @@ function clause decode (0b011111 : (bit[1]) _ : 0b0000010011 : (bit[1]) _ as instr) = - Mfocrf (RT,FXM) + Some(Mfocrf(RT,FXM)) function clause execute (Mfocrf (RT, FXM)) = { @@ -3878,7 +3708,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1000000000 : (bit[1]) _ as instr) = - Mcrxr (BF) + Some(Mcrxr(BF)) function clause execute (Mcrxr (BF)) = { @@ -3894,7 +3724,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0110100011 : (bit[1]) _ as instr) = - Mtdcrux (RS,RA) + Some(Mtdcrux(RS,RA)) function clause execute (Mtdcrux (RS, RA)) = { @@ -3910,7 +3740,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0100100011 : (bit[1]) _ as instr) = - Mfdcrux (RT,RA) + Some(Mfdcrux(RT,RA)) function clause execute (Mfdcrux (RT, RA)) = { @@ -3918,6028 +3748,6 @@ function clause execute (Mfdcrux (RT, RA)) = GPR[RT] := DCR[DCRN] } -union ast member (bit[5], bit[5], bit[16]) Lfs - -function clause decode (0b110000 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[16]) D as instr) = - Lfs (FRT,RA,D) - -function clause execute (Lfs (FRT, RA, D)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - FPR[FRT] := DOUBLE (MEMr (EA,4)) - } - -union ast member (bit[5], bit[5], bit[5]) Lfsx - -function clause decode (0b011111 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[5]) RB : -0b1000010111 : -(bit[1]) _ as instr) = - Lfsx (FRT,RA,RB) - -function clause execute (Lfsx (FRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - FPR[FRT] := DOUBLE (MEMr (EA,4)) - } - -union ast member (bit[5], bit[5], bit[16]) Lfsu - -function clause decode (0b110001 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[16]) D as instr) = - Lfsu (FRT,RA,D) - -function clause execute (Lfsu (FRT, RA, D)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); - FPR[FRT] := DOUBLE (MEMr (EA,4)); - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[5]) Lfsux - -function clause decode (0b011111 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[5]) RB : -0b1000110111 : -(bit[1]) _ as instr) = - Lfsux (FRT,RA,RB) - -function clause execute (Lfsux (FRT, RA, RB)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + GPR[RB]; - FPR[FRT] := DOUBLE (MEMr (EA,4)); - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[16]) Lfd - -function clause decode (0b110010 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[16]) D as instr) = - Lfd (FRT,RA,D) - -function clause execute (Lfd (FRT, RA, D)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - FPR[FRT] := MEMr (EA,8) - } - -union ast member (bit[5], bit[5], bit[5]) Lfdx - -function clause decode (0b011111 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[5]) RB : -0b1001010111 : -(bit[1]) _ as instr) = - Lfdx (FRT,RA,RB) - -function clause execute (Lfdx (FRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - FPR[FRT] := MEMr (EA,8) - } - -union ast member (bit[5], bit[5], bit[16]) Lfdu - -function clause decode (0b110011 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[16]) D as instr) = - Lfdu (FRT,RA,D) - -function clause execute (Lfdu (FRT, RA, D)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); - FPR[FRT] := MEMr (EA,8); - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[5]) Lfdux - -function clause decode (0b011111 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[5]) RB : -0b1001110111 : -(bit[1]) _ as instr) = - Lfdux (FRT,RA,RB) - -function clause execute (Lfdux (FRT, RA, RB)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + GPR[RB]; - FPR[FRT] := MEMr (EA,8); - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[5]) Lfiwax - -function clause decode (0b011111 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[5]) RB : -0b1101010111 : -(bit[1]) _ as instr) = - Lfiwax (FRT,RA,RB) - -function clause execute (Lfiwax (FRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - FPR[FRT] := EXTS (MEMr (EA,4)) - } - -union ast member (bit[5], bit[5], bit[5]) Lfiwzx - -function clause decode (0b011111 : -(bit[5]) FRT : -(bit[5]) RA : -(bit[5]) RB : -0b1101110111 : -(bit[1]) _ as instr) = - Lfiwzx (FRT,RA,RB) - -function clause execute (Lfiwzx (FRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - FPR[FRT] := 0b00000000000000000000000000000000 : MEMr (EA,4) - } - -union ast member (bit[5], bit[5], bit[16]) Stfs - -function clause decode (0b110100 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[16]) D as instr) = - Stfs (FRS,RA,D) - -function clause execute (Stfs (FRS, RA, D)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - MEMw(EA,4) := SINGLE (FPR[FRS]) - } - -union ast member (bit[5], bit[5], bit[5]) Stfsx - -function clause decode (0b011111 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[5]) RB : -0b1010010111 : -(bit[1]) _ as instr) = - Stfsx (FRS,RA,RB) - -function clause execute (Stfsx (FRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - MEMw(EA,4) := SINGLE (FPR[FRS]) - } - -union ast member (bit[5], bit[5], bit[16]) Stfsu - -function clause decode (0b110101 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[16]) D as instr) = - Stfsu (FRS,RA,D) - -function clause execute (Stfsu (FRS, RA, D)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); - MEMw(EA,4) := SINGLE (FPR[FRS]); - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[5]) Stfsux - -function clause decode (0b011111 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[5]) RB : -0b1010110111 : -(bit[1]) _ as instr) = - Stfsux (FRS,RA,RB) - -function clause execute (Stfsux (FRS, RA, RB)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + GPR[RB]; - MEMw(EA,4) := SINGLE (FPR[FRS]); - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[16]) Stfd - -function clause decode (0b110110 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[16]) D as instr) = - Stfd (FRS,RA,D) - -function clause execute (Stfd (FRS, RA, D)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (D); - MEMw(EA,8) := FPR[FRS] - } - -union ast member (bit[5], bit[5], bit[5]) Stfdx - -function clause decode (0b011111 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[5]) RB : -0b1011010111 : -(bit[1]) _ as instr) = - Stfdx (FRS,RA,RB) - -function clause execute (Stfdx (FRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - MEMw(EA,8) := FPR[FRS] - } - -union ast member (bit[5], bit[5], bit[16]) Stfdu - -function clause decode (0b110111 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[16]) D as instr) = - Stfdu (FRS,RA,D) - -function clause execute (Stfdu (FRS, RA, D)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + EXTS (D); - MEMw(EA,8) := FPR[FRS]; - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[5]) Stfdux - -function clause decode (0b011111 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[5]) RB : -0b1011110111 : -(bit[1]) _ as instr) = - Stfdux (FRS,RA,RB) - -function clause execute (Stfdux (FRS, RA, RB)) = - { - (bit[64]) EA := 0; - EA := GPR[RA] + GPR[RB]; - MEMw(EA,8) := FPR[FRS]; - GPR[RA] := EA - } - -union ast member (bit[5], bit[5], bit[5]) Stfiwx - -function clause decode (0b011111 : -(bit[5]) FRS : -(bit[5]) RA : -(bit[5]) RB : -0b1111010111 : -(bit[1]) _ as instr) = - Stfiwx (FRS,RA,RB) - -function clause execute (Stfiwx (FRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - MEMw(EA,4) := (FPR[FRS])[32 .. 63] - } - -union ast member (bit[5], bit[5], bit[14]) Lfdp - -function clause decode (0b111001 : -(bit[5]) FRTp : -(bit[5]) RA : -(bit[14]) DS : -0b0 : -0b0 as instr) = - Lfdp (FRTp,RA,DS) - -function clause execute (Lfdp (FRTp, RA, DS)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DS : 0b00); - FPRp[FRTp] := MEMr (EA,16) - } - -union ast member (bit[5], bit[5], bit[5]) Lfdpx - -function clause decode (0b011111 : -(bit[5]) FRTp : -(bit[5]) RA : -(bit[5]) RB : -0b1100010111 : -(bit[1]) _ as instr) = - Lfdpx (FRTp,RA,RB) - -function clause execute (Lfdpx (FRTp, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - FPRp[FRTp] := MEMr (EA,16) - } - -union ast member (bit[5], bit[5], bit[14]) Stfdp - -function clause decode (0b111101 : -(bit[5]) FRSp : -(bit[5]) RA : -(bit[14]) DS : -0b0 : -0b0 as instr) = - Stfdp (FRSp,RA,DS) - -function clause execute (Stfdp (FRSp, RA, DS)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + EXTS (DS : 0b00); - MEMw(EA,16) := FPRp[FRSp] - } - -union ast member (bit[5], bit[5], bit[5]) Stfdpx - -function clause decode (0b011111 : -(bit[5]) FRSp : -(bit[5]) RA : -(bit[5]) RB : -0b1110010111 : -(bit[1]) _ as instr) = - Stfdpx (FRSp,RA,RB) - -function clause execute (Stfdpx (FRSp, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - MEMw(EA,16) := FPRp[FRSp] - } - -union ast member (bit[5], bit[5], bit) Fmr - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0001001000 : -[Rc] as instr) = - Fmr (FRT,FRB,Rc) - -function clause execute (Fmr (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fneg - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0000101000 : -[Rc] as instr) = - Fneg (FRT,FRB,Rc) - -function clause execute (Fneg (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fabs - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0100001000 : -[Rc] as instr) = - Fabs (FRT,FRB,Rc) - -function clause execute (Fabs (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fnabs - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0010001000 : -[Rc] as instr) = - Fnabs (FRT,FRB,Rc) - -function clause execute (Fnabs (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fcpsgn - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -0b0000001000 : -[Rc] as instr) = - Fcpsgn (FRT,FRA,FRB,Rc) - -function clause execute (Fcpsgn (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fadds - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) _ : -0b10101 : -[Rc] as instr) = - Fadds (FRT,FRA,FRB,Rc) - -function clause execute (Fadds (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fadd - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) _ : -0b10101 : -[Rc] as instr) = - Fadd (FRT,FRA,FRB,Rc) - -function clause execute (Fadd (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fsubs - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) _ : -0b10100 : -[Rc] as instr) = - Fsubs (FRT,FRA,FRB,Rc) - -function clause execute (Fsubs (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fsub - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) _ : -0b10100 : -[Rc] as instr) = - Fsub (FRT,FRA,FRB,Rc) - -function clause execute (Fsub (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fmuls - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) _ : -(bit[5]) FRC : -0b11001 : -[Rc] as instr) = - Fmuls (FRT,FRA,FRC,Rc) - -function clause execute (Fmuls (FRT, FRA, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fmul - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) _ : -(bit[5]) FRC : -0b11001 : -[Rc] as instr) = - Fmul (FRT,FRA,FRC,Rc) - -function clause execute (Fmul (FRT, FRA, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fdivs - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) _ : -0b10010 : -[Rc] as instr) = - Fdivs (FRT,FRA,FRB,Rc) - -function clause execute (Fdivs (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Fdiv - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) _ : -0b10010 : -[Rc] as instr) = - Fdiv (FRT,FRA,FRB,Rc) - -function clause execute (Fdiv (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fsqrts - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -(bit[5]) _ : -0b10110 : -[Rc] as instr) = - Fsqrts (FRT,FRB,Rc) - -function clause execute (Fsqrts (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fsqrt - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -(bit[5]) _ : -0b10110 : -[Rc] as instr) = - Fsqrt (FRT,FRB,Rc) - -function clause execute (Fsqrt (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fres - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -(bit[5]) _ : -0b11000 : -[Rc] as instr) = - Fres (FRT,FRB,Rc) - -function clause execute (Fres (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fre - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -(bit[5]) _ : -0b11000 : -[Rc] as instr) = - Fre (FRT,FRB,Rc) - -function clause execute (Fre (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Frsqrtes - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -(bit[5]) _ : -0b11010 : -[Rc] as instr) = - Frsqrtes (FRT,FRB,Rc) - -function clause execute (Frsqrtes (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Frsqrte - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -(bit[5]) _ : -0b11010 : -[Rc] as instr) = - Frsqrte (FRT,FRB,Rc) - -function clause execute (Frsqrte (FRT, FRB, Rc)) = () - -union ast member (bit[3], bit[5], bit[5]) Ftdiv - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b0010000000 : -(bit[1]) _ as instr) = - Ftdiv (BF,FRA,FRB) - -function clause execute (Ftdiv (BF, FRA, FRB)) = () - -union ast member (bit[3], bit[5]) Ftsqrt - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) _ : -(bit[5]) FRB : -0b0010100000 : -(bit[1]) _ as instr) = - Ftsqrt (BF,FRB) - -function clause execute (Ftsqrt (BF, FRB)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fmadds - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11101 : -[Rc] as instr) = - Fmadds (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fmadds (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fmadd - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11101 : -[Rc] as instr) = - Fmadd (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fmadd (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fmsubs - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11100 : -[Rc] as instr) = - Fmsubs (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fmsubs (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fmsub - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11100 : -[Rc] as instr) = - Fmsub (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fmsub (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fnmadds - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11111 : -[Rc] as instr) = - Fnmadds (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fnmadds (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fnmadd - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11111 : -[Rc] as instr) = - Fnmadd (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fnmadd (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fnmsubs - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11110 : -[Rc] as instr) = - Fnmsubs (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fnmsubs (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fnmsub - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b11110 : -[Rc] as instr) = - Fnmsub (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fnmsub (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit[5], bit) Frsp - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0000001100 : -[Rc] as instr) = - Frsp (FRT,FRB,Rc) - -function clause execute (Frsp (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctid - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1100101110 : -[Rc] as instr) = - Fctid (FRT,FRB,Rc) - -function clause execute (Fctid (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctidz - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1100101111 : -[Rc] as instr) = - Fctidz (FRT,FRB,Rc) - -function clause execute (Fctidz (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctidu - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1110101110 : -[Rc] as instr) = - Fctidu (FRT,FRB,Rc) - -function clause execute (Fctidu (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctiduz - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1110101111 : -[Rc] as instr) = - Fctiduz (FRT,FRB,Rc) - -function clause execute (Fctiduz (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctiw - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0000001110 : -[Rc] as instr) = - Fctiw (FRT,FRB,Rc) - -function clause execute (Fctiw (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctiwz - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0000001111 : -[Rc] as instr) = - Fctiwz (FRT,FRB,Rc) - -function clause execute (Fctiwz (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctiwu - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0010001110 : -[Rc] as instr) = - Fctiwu (FRT,FRB,Rc) - -function clause execute (Fctiwu (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fctiwuz - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0010001111 : -[Rc] as instr) = - Fctiwuz (FRT,FRB,Rc) - -function clause execute (Fctiwuz (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fcfid - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1101001110 : -[Rc] as instr) = - Fcfid (FRT,FRB,Rc) - -function clause execute (Fcfid (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fcfidu - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1111001110 : -[Rc] as instr) = - Fcfidu (FRT,FRB,Rc) - -function clause execute (Fcfidu (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fcfids - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1101001110 : -[Rc] as instr) = - Fcfids (FRT,FRB,Rc) - -function clause execute (Fcfids (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Fcfidus - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1111001110 : -[Rc] as instr) = - Fcfidus (FRT,FRB,Rc) - -function clause execute (Fcfidus (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Frin - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0110001000 : -[Rc] as instr) = - Frin (FRT,FRB,Rc) - -function clause execute (Frin (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Frip - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0111001000 : -[Rc] as instr) = - Frip (FRT,FRB,Rc) - -function clause execute (Frip (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Friz - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0110101000 : -[Rc] as instr) = - Friz (FRT,FRB,Rc) - -function clause execute (Friz (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Frim - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0111101000 : -[Rc] as instr) = - Frim (FRT,FRB,Rc) - -function clause execute (Frim (FRT, FRB, Rc)) = () - -union ast member (bit[3], bit[5], bit[5]) Fcmpu - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b0000000000 : -(bit[1]) _ as instr) = - Fcmpu (BF,FRA,FRB) - -function clause execute (Fcmpu (BF, FRA, FRB)) = () - -union ast member (bit[3], bit[5], bit[5]) Fcmpo - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b0000100000 : -(bit[1]) _ as instr) = - Fcmpo (BF,FRA,FRB) - -function clause execute (Fcmpo (BF, FRA, FRB)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit) Fsel - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[5]) FRC : -0b10111 : -[Rc] as instr) = - Fsel (FRT,FRA,FRB,FRC,Rc) - -function clause execute (Fsel (FRT, FRA, FRB, FRC, Rc)) = () - -union ast member (bit[5], bit) Mffs - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) _ : -0b1001000111 : -[Rc] as instr) = - Mffs (FRT,Rc) - -function clause execute (Mffs (FRT, Rc)) = () - -union ast member (bit[3], bit[3]) Mcrfs - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[3]) BFA : -(bit[2]) _ : -(bit[5]) _ : -0b0001000000 : -(bit[1]) _ as instr) = - Mcrfs (BF,BFA) - -function clause execute (Mcrfs (BF, BFA)) = () - -union ast member (bit[3], bit, bit[4], bit) Mtfsfi - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[4]) _ : -[W] : -(bit[4]) U : -(bit[1]) _ : -0b0010000110 : -[Rc] as instr) = - Mtfsfi (BF,W,U,Rc) - -function clause execute (Mtfsfi (BF, W, U, Rc)) = () - -union ast member (bit, bit[8], bit, bit[5], bit) Mtfsf - -function clause decode (0b111111 : -[L] : -(bit[8]) FLM : -[W] : -(bit[5]) FRB : -0b1011000111 : -[Rc] as instr) = - Mtfsf (L,FLM,W,FRB,Rc) - -function clause execute (Mtfsf (L, FLM, W, FRB, Rc)) = () - -union ast member (bit[5], bit) Mtfsb0 - -function clause decode (0b111111 : -(bit[5]) BT : -(bit[5]) _ : -(bit[5]) _ : -0b0001000110 : -[Rc] as instr) = - Mtfsb0 (BT,Rc) - -function clause execute (Mtfsb0 (BT, Rc)) = () - -union ast member (bit[5], bit) Mtfsb1 - -function clause decode (0b111111 : -(bit[5]) BT : -(bit[5]) _ : -(bit[5]) _ : -0b0000100110 : -[Rc] as instr) = - Mtfsb1 (BT,Rc) - -function clause execute (Mtfsb1 (BT, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Daddq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b0000000010 : -[Rc] as instr) = - Daddq (FRTp,FRAp,FRBp,Rc) - -function clause execute (Daddq (FRTp, FRAp, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Dadd - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -0b0000000010 : -[Rc] as instr) = - Dadd (FRT,FRA,FRB,Rc) - -function clause execute (Dadd (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Dsubq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b1000000010 : -[Rc] as instr) = - Dsubq (FRTp,FRAp,FRBp,Rc) - -function clause execute (Dsubq (FRTp, FRAp, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Dsub - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -0b1000000010 : -[Rc] as instr) = - Dsub (FRT,FRA,FRB,Rc) - -function clause execute (Dsub (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Dmulq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b0000100010 : -[Rc] as instr) = - Dmulq (FRTp,FRAp,FRBp,Rc) - -function clause execute (Dmulq (FRTp, FRAp, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Dmul - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -0b0000100010 : -[Rc] as instr) = - Dmul (FRT,FRA,FRB,Rc) - -function clause execute (Dmul (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Ddivq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b1000100010 : -[Rc] as instr) = - Ddivq (FRTp,FRAp,FRBp,Rc) - -function clause execute (Ddivq (FRTp, FRAp, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Ddiv - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -0b1000100010 : -[Rc] as instr) = - Ddiv (FRT,FRA,FRB,Rc) - -function clause execute (Ddiv (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[3], bit[5], bit[5]) Dcmpuq - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b1010000010 : -(bit[1]) _ as instr) = - Dcmpuq (BF,FRAp,FRBp) - -function clause execute (Dcmpuq (BF, FRAp, FRBp)) = () - -union ast member (bit[3], bit[5], bit[5]) Dcmpu - -function clause decode (0b111011 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b1010000010 : -(bit[1]) _ as instr) = - Dcmpu (BF,FRA,FRB) - -function clause execute (Dcmpu (BF, FRA, FRB)) = () - -union ast member (bit[3], bit[5], bit[5]) Dcmpoq - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b0010000010 : -(bit[1]) _ as instr) = - Dcmpoq (BF,FRAp,FRBp) - -function clause execute (Dcmpoq (BF, FRAp, FRBp)) = () - -union ast member (bit[3], bit[5], bit[5]) Dcmpo - -function clause decode (0b111011 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b0010000010 : -(bit[1]) _ as instr) = - Dcmpo (BF,FRA,FRB) - -function clause execute (Dcmpo (BF, FRA, FRB)) = () - -union ast member (bit[3], bit[5], bit[6]) Dtstdcq - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRAp : -(bit[6]) DCM : -0b011000010 : -(bit[1]) _ as instr) = - Dtstdcq (BF,FRAp,DCM) - -function clause execute (Dtstdcq (BF, FRAp, DCM)) = () - -union ast member (bit[3], bit[5], bit[6]) Dtstdc - -function clause decode (0b111011 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[6]) DCM : -0b011000010 : -(bit[1]) _ as instr) = - Dtstdc (BF,FRA,DCM) - -function clause execute (Dtstdc (BF, FRA, DCM)) = () - -union ast member (bit[3], bit[5], bit[6]) Dtstdgq - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRAp : -(bit[6]) DGM : -0b011100010 : -(bit[1]) _ as instr) = - Dtstdgq (BF,FRAp,DGM) - -function clause execute (Dtstdgq (BF, FRAp, DGM)) = () - -union ast member (bit[3], bit[5], bit[6]) Dtstdg - -function clause decode (0b111011 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[6]) DGM : -0b011100010 : -(bit[1]) _ as instr) = - Dtstdg (BF,FRA,DGM) - -function clause execute (Dtstdg (BF, FRA, DGM)) = () - -union ast member (bit[3], bit[5], bit[5]) Dtstexq - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRAp : -(bit[5]) FRBp : -0b0010100010 : -(bit[1]) _ as instr) = - Dtstexq (BF,FRAp,FRBp) - -function clause execute (Dtstexq (BF, FRAp, FRBp)) = () - -union ast member (bit[3], bit[5], bit[5]) Dtstex - -function clause decode (0b111011 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b0010100010 : -(bit[1]) _ as instr) = - Dtstex (BF,FRA,FRB) - -function clause execute (Dtstex (BF, FRA, FRB)) = () - -union ast member (bit[3], bit[5], bit[5]) Dtstsfq - -function clause decode (0b111111 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRBp : -0b1010100010 : -(bit[1]) _ as instr) = - Dtstsfq (BF,FRA,FRBp) - -function clause execute (Dtstsfq (BF, FRA, FRBp)) = () - -union ast member (bit[3], bit[5], bit[5]) Dtstsf - -function clause decode (0b111011 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) FRA : -(bit[5]) FRB : -0b1010100010 : -(bit[1]) _ as instr) = - Dtstsf (BF,FRA,FRB) - -function clause execute (Dtstsf (BF, FRA, FRB)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit) Dquaiq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) TE : -(bit[5]) FRBp : -(bit[2]) RMC : -0b01000011 : -[Rc] as instr) = - Dquaiq (FRTp,TE,FRBp,RMC,Rc) - -function clause execute (Dquaiq (FRTp, TE, FRBp, RMC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit) Dquai - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) TE : -(bit[5]) FRB : -(bit[2]) RMC : -0b01000011 : -[Rc] as instr) = - Dquai (FRT,TE,FRB,RMC,Rc) - -function clause execute (Dquai (FRT, TE, FRB, RMC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit) Dquaq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[5]) FRBp : -(bit[2]) RMC : -0b00000011 : -[Rc] as instr) = - Dquaq (FRTp,FRAp,FRBp,RMC,Rc) - -function clause execute (Dquaq (FRTp, FRAp, FRBp, RMC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit) Dqua - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[2]) RMC : -0b00000011 : -[Rc] as instr) = - Dqua (FRT,FRA,FRB,RMC,Rc) - -function clause execute (Dqua (FRT, FRA, FRB, RMC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit) Drrndq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRA : -(bit[5]) FRBp : -(bit[2]) RMC : -0b00100011 : -[Rc] as instr) = - Drrndq (FRTp,FRA,FRBp,RMC,Rc) - -function clause execute (Drrndq (FRTp, FRA, FRBp, RMC, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit) Drrnd - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -(bit[2]) RMC : -0b00100011 : -[Rc] as instr) = - Drrnd (FRT,FRA,FRB,RMC,Rc) - -function clause execute (Drrnd (FRT, FRA, FRB, RMC, Rc)) = () - -union ast member (bit[5], bit, bit[5], bit[2], bit) Drintxq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[4]) _ : -[R] : -(bit[5]) FRBp : -(bit[2]) RMC : -0b01100011 : -[Rc] as instr) = - Drintxq (FRTp,R,FRBp,RMC,Rc) - -function clause execute (Drintxq (FRTp, R, FRBp, RMC, Rc)) = () - -union ast member (bit[5], bit, bit[5], bit[2], bit) Drintx - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[4]) _ : -[R] : -(bit[5]) FRB : -(bit[2]) RMC : -0b01100011 : -[Rc] as instr) = - Drintx (FRT,R,FRB,RMC,Rc) - -function clause execute (Drintx (FRT, R, FRB, RMC, Rc)) = () - -union ast member (bit[5], bit, bit[5], bit[2], bit) Drintnq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[4]) _ : -[R] : -(bit[5]) FRBp : -(bit[2]) RMC : -0b11100011 : -[Rc] as instr) = - Drintnq (FRTp,R,FRBp,RMC,Rc) - -function clause execute (Drintnq (FRTp, R, FRBp, RMC, Rc)) = () - -union ast member (bit[5], bit, bit[5], bit[2], bit) Drintn - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[4]) _ : -[R] : -(bit[5]) FRB : -(bit[2]) RMC : -0b11100011 : -[Rc] as instr) = - Drintn (FRT,R,FRB,RMC,Rc) - -function clause execute (Drintn (FRT, R, FRB, RMC, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dctdp - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0100000010 : -[Rc] as instr) = - Dctdp (FRT,FRB,Rc) - -function clause execute (Dctdp (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dctqpq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) _ : -(bit[5]) FRB : -0b0100000010 : -[Rc] as instr) = - Dctqpq (FRTp,FRB,Rc) - -function clause execute (Dctqpq (FRTp, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Drsp - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1100000010 : -[Rc] as instr) = - Drsp (FRT,FRB,Rc) - -function clause execute (Drsp (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Drdpq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) _ : -(bit[5]) FRBp : -0b1100000010 : -[Rc] as instr) = - Drdpq (FRTp,FRBp,Rc) - -function clause execute (Drdpq (FRTp, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dcffix - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b1100100010 : -[Rc] as instr) = - Dcffix (FRT,FRB,Rc) - -function clause execute (Dcffix (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dcffixq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) _ : -(bit[5]) FRB : -0b1100100010 : -[Rc] as instr) = - Dcffixq (FRTp,FRB,Rc) - -function clause execute (Dcffixq (FRTp, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dctfixq - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRBp : -0b0100100010 : -[Rc] as instr) = - Dctfixq (FRT,FRBp,Rc) - -function clause execute (Dctfixq (FRT, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dctfix - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0100100010 : -[Rc] as instr) = - Dctfix (FRT,FRB,Rc) - -function clause execute (Dctfix (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[2], bit[5], bit) Ddedpdq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[2]) SP : -(bit[3]) _ : -(bit[5]) FRBp : -0b0101000010 : -[Rc] as instr) = - Ddedpdq (FRTp,SP,FRBp,Rc) - -function clause execute (Ddedpdq (FRTp, SP, FRBp, Rc)) = () - -union ast member (bit[5], bit[2], bit[5], bit) Ddedpd - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[2]) SP : -(bit[3]) _ : -(bit[5]) FRB : -0b0101000010 : -[Rc] as instr) = - Ddedpd (FRT,SP,FRB,Rc) - -function clause execute (Ddedpd (FRT, SP, FRB, Rc)) = () - -union ast member (bit[5], bit, bit[5], bit) Denbcdq - -function clause decode (0b111111 : -(bit[5]) FRTp : -[S] : -(bit[4]) _ : -(bit[5]) FRBp : -0b1101000010 : -[Rc] as instr) = - Denbcdq (FRTp,S,FRBp,Rc) - -function clause execute (Denbcdq (FRTp, S, FRBp, Rc)) = () - -union ast member (bit[5], bit, bit[5], bit) Denbcd - -function clause decode (0b111011 : -(bit[5]) FRT : -[S] : -(bit[4]) _ : -(bit[5]) FRB : -0b1101000010 : -[Rc] as instr) = - Denbcd (FRT,S,FRB,Rc) - -function clause execute (Denbcd (FRT, S, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dxexq - -function clause decode (0b111111 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRBp : -0b0101100010 : -[Rc] as instr) = - Dxexq (FRT,FRBp,Rc) - -function clause execute (Dxexq (FRT, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit) Dxex - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) _ : -(bit[5]) FRB : -0b0101100010 : -[Rc] as instr) = - Dxex (FRT,FRB,Rc) - -function clause execute (Dxex (FRT, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Diexq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRA : -(bit[5]) FRBp : -0b1101100010 : -[Rc] as instr) = - Diexq (FRTp,FRA,FRBp,Rc) - -function clause execute (Diexq (FRTp, FRA, FRBp, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Diex - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[5]) FRB : -0b1101100010 : -[Rc] as instr) = - Diex (FRT,FRA,FRB,Rc) - -function clause execute (Diex (FRT, FRA, FRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[6], bit) Dscliq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[6]) SH : -0b001000010 : -[Rc] as instr) = - Dscliq (FRTp,FRAp,SH,Rc) - -function clause execute (Dscliq (FRTp, FRAp, SH, Rc)) = () - -union ast member (bit[5], bit[5], bit[6], bit) Dscli - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[6]) SH : -0b001000010 : -[Rc] as instr) = - Dscli (FRT,FRA,SH,Rc) - -function clause execute (Dscli (FRT, FRA, SH, Rc)) = () - -union ast member (bit[5], bit[5], bit[6], bit) Dscriq - -function clause decode (0b111111 : -(bit[5]) FRTp : -(bit[5]) FRAp : -(bit[6]) SH : -0b001100010 : -[Rc] as instr) = - Dscriq (FRTp,FRAp,SH,Rc) - -function clause execute (Dscriq (FRTp, FRAp, SH, Rc)) = () - -union ast member (bit[5], bit[5], bit[6], bit) Dscri - -function clause decode (0b111011 : -(bit[5]) FRT : -(bit[5]) FRA : -(bit[6]) SH : -0b001100010 : -[Rc] as instr) = - Dscri (FRT,FRA,SH,Rc) - -function clause execute (Dscri (FRT, FRA, SH, Rc)) = () - -union ast member (bit[5], bit[5], bit[5]) Lvebx - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0000000111 : -(bit[1]) _ as instr) = - Lvebx (VRT,RA,RB) - -function clause execute (Lvebx (VRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - eb := EA[60 .. 63]; - VR[VRT] := undefined; - if bigendianmode - then (VR[VRT])[8 * eb..8 * eb + 7] := MEMr (EA,1) - else (VR[VRT])[120 - 8 * eb..127 - 8 * eb] := MEMr (EA,1) - } - -union ast member (bit[5], bit[5], bit[5]) Lvehx - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0000100111 : -(bit[1]) _ as instr) = - Lvehx (VRT,RA,RB) - -function clause execute (Lvehx (VRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := - (b + GPR[RB] & - 0b1111111111111111111111111111111111111111111111111111111111111110); - eb := EA[60 .. 63]; - VR[VRT] := undefined; - if bigendianmode - then (VR[VRT])[8 * eb..8 * eb + 15] := MEMr (EA,2) - else (VR[VRT])[112 - 8 * eb..127 - 8 * eb] := MEMr (EA,2) - } - -union ast member (bit[5], bit[5], bit[5]) Lvewx - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0001000111 : -(bit[1]) _ as instr) = - Lvewx (VRT,RA,RB) - -function clause execute (Lvewx (VRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := - (b + GPR[RB] & - 0b1111111111111111111111111111111111111111111111111111111111111100); - eb := EA[60 .. 63]; - VR[VRT] := undefined; - if bigendianmode - then (VR[VRT])[8 * eb..8 * eb + 31] := MEMr (EA,4) - else (VR[VRT])[96 - 8 * eb..127 - 8 * eb] := MEMr (EA,4) - } - -union ast member (bit[5], bit[5], bit[5]) Lvx - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0001100111 : -(bit[1]) _ as instr) = - Lvx (VRT,RA,RB) - -function clause execute (Lvx (VRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - VR[VRT] := - MEMr - (EA & 0b1111111111111111111111111111111111111111111111111111111111110000,16) - } - -union ast member (bit[5], bit[5], bit[5]) Lvxl - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0101100111 : -(bit[1]) _ as instr) = - Lvxl (VRT,RA,RB) - -function clause execute (Lvxl (VRT, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - VR[VRT] := - MEMr - (EA & 0b1111111111111111111111111111111111111111111111111111111111110000,16); - mark_as_not_likely_to_be_needed_again_anytime_soon (EA) - } - -union ast member (bit[5], bit[5], bit[5]) Stvebx - -function clause decode (0b011111 : -(bit[5]) VRS : -(bit[5]) RA : -(bit[5]) RB : -0b0010000111 : -(bit[1]) _ as instr) = - Stvebx (VRS,RA,RB) - -function clause execute (Stvebx (VRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - eb := EA[60 .. 63]; - if bigendianmode - then MEMw(EA,1) := VRS[8 * eb .. 8 * eb + 7] - else MEMw(EA,1) := VRS[120 - 8 * eb .. 127 - 8 * eb] - } - -union ast member (bit[5], bit[5], bit[5]) Stvehx - -function clause decode (0b011111 : -(bit[5]) VRS : -(bit[5]) RA : -(bit[5]) RB : -0b0010100111 : -(bit[1]) _ as instr) = - Stvehx (VRS,RA,RB) - -function clause execute (Stvehx (VRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := - (b + GPR[RB] & - 0b1111111111111111111111111111111111111111111111111111111111111110); - eb := EA[60 .. 63]; - if bigendianmode - then MEMw(EA,2) := VRS[8 * eb .. 8 * eb + 15] - else MEMw(EA,2) := VRS[112 - 8 * eb .. 127 - 8 * eb] - } - -union ast member (bit[5], bit[5], bit[5]) Stvewx - -function clause decode (0b011111 : -(bit[5]) VRS : -(bit[5]) RA : -(bit[5]) RB : -0b0011000111 : -(bit[1]) _ as instr) = - Stvewx (VRS,RA,RB) - -function clause execute (Stvewx (VRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := - (b + GPR[RB] & - 0b1111111111111111111111111111111111111111111111111111111111111100); - eb := EA[60 .. 63]; - if bigendianmode - then MEMw(EA,4) := VRS[8 * eb .. 8 * eb + 31] - else MEMw(EA,4) := VRS[96 - 8 * eb .. 127 - 8 * eb] - } - -union ast member (bit[5], bit[5], bit[5]) Stvx - -function clause decode (0b011111 : -(bit[5]) VRS : -(bit[5]) RA : -(bit[5]) RB : -0b0011100111 : -(bit[1]) _ as instr) = - Stvx (VRS,RA,RB) - -function clause execute (Stvx (VRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - MEMw(EA & 0b1111111111111111111111111111111111111111111111111111111111110000,16) := - VR[VRS] - } - -union ast member (bit[5], bit[5], bit[5]) Stvxl - -function clause decode (0b011111 : -(bit[5]) VRS : -(bit[5]) RA : -(bit[5]) RB : -0b0111100111 : -(bit[1]) _ as instr) = - Stvxl (VRS,RA,RB) - -function clause execute (Stvxl (VRS, RA, RB)) = - { - (bit[64]) b := 0; - (bit[64]) EA := 0; - if RA == 0 then b := 0 else b := GPR[RA]; - EA := b + GPR[RB]; - MEMw(EA & 0b1111111111111111111111111111111111111111111111111111111111110000,16) := - VR[VRS]; - mark_as_not_likely_to_be_needed_again_anytime_soon (EA) - } - -union ast member (bit[5], bit[5], bit[5]) Lvsl - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0000000110 : -(bit[1]) _ as instr) = - Lvsl (VRT,RA,RB) - -function clause execute (Lvsl (VRT, RA, RB)) = () - -union ast member (bit[5], bit[5], bit[5]) Lvsr - -function clause decode (0b011111 : -(bit[5]) VRT : -(bit[5]) RA : -(bit[5]) RB : -0b0000100110 : -(bit[1]) _ as instr) = - Lvsr (VRT,RA,RB) - -function clause execute (Lvsr (VRT, RA, RB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vpkpx - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01100001110 as instr) = - Vpkpx (VRT,VRA,VRB) - -function clause execute (Vpkpx (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i] := (VR[VRA])[i * 2 + 7]; - (VR[VRT])[i + 1..i + 5] := (VR[VRA])[i * 2 + 8 .. i * 2 + 12]; - (VR[VRT])[i + 6..i + 10] := (VR[VRA])[i * 2 + 16 .. i * 2 + 20]; - (VR[VRT])[i + 11..i + 15] := (VR[VRA])[i * 2 + 24 .. i * 2 + 28]; - (VR[VRT])[i + 64] := (VR[VRB])[i * 2 + 7]; - (VR[VRT])[i + 65..i + 69] := (VR[VRB])[i * 2 + 8 .. i * 2 + 12]; - (VR[VRT])[i + 70..i + 74] := (VR[VRB])[i * 2 + 16 .. i * 2 + 20]; - (VR[VRT])[i + 75..i + 79] := (VR[VRB])[i * 2 + 24 .. i * 2 + 28] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkshss - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00110001110 as instr) = - Vpkshss (VRT,VRA,VRB) - -function clause execute (Vpkshss (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - { - (VR[VRT])[i..i + 7] := - (Clamp (EXTS ((VR[VRA])[i * 2 .. i * 2 + 15]),0 - 128,127))[24 .. 31]; - (VR[VRT])[i + 64..i + 71] := - (Clamp (EXTS ((VR[VRB])[i * 2 .. i * 2 + 15]),0 - 128,127))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkshus - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00100001110 as instr) = - Vpkshus (VRT,VRA,VRB) - -function clause execute (Vpkshus (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - { - (VR[VRT])[i..i + 7] := - (Clamp (EXTS ((VR[VRA])[i * 2 .. i * 2 + 15]),0,255))[24 .. 31]; - (VR[VRT])[i + 64..i + 71] := - (Clamp (EXTS ((VR[VRB])[i * 2 .. i * 2 + 15]),0,255))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkswss - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00111001110 as instr) = - Vpkswss (VRT,VRA,VRB) - -function clause execute (Vpkswss (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i..i + 15] := - (Clamp - (EXTS ((VR[VRA])[i * 2 .. i * 2 + 31]),0 - 0b1000000000000000,0b1000000000000000 - - 1))[16 .. 31]; - (VR[VRT])[i + 64..i + 79] := - (Clamp - (EXTS ((VR[VRB])[i * 2 .. i * 2 + 31]),0 - 0b1000000000000000,0b1000000000000000 - - 1))[16 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkswus - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00101001110 as instr) = - Vpkswus (VRT,VRA,VRB) - -function clause execute (Vpkswus (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i..i + 15] := - (Clamp (EXTS ((VR[VRA])[i * 2 .. i * 2 + 31]),0,0b10000000000000000 - 1))[16 .. - 31]; - (VR[VRT])[i + 64..i + 79] := - (Clamp (EXTS ((VR[VRB])[i * 2 .. i * 2 + 31]),0,0b10000000000000000 - 1))[16 .. - 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkuhum - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000001110 as instr) = - Vpkuhum (VRT,VRA,VRB) - -function clause execute (Vpkuhum (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - { - (VR[VRT])[i..i + 7] := (VR[VRA])[i * 2 + 8 .. i * 2 + 15]; - (VR[VRT])[i + 64..i + 71] := (VR[VRB])[i * 2 + 8 .. i * 2 + 15] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkuhus - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00010001110 as instr) = - Vpkuhus (VRT,VRA,VRB) - -function clause execute (Vpkuhus (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - { - (VR[VRT])[i..i + 7] := - (Clamp (EXTZ ((VR[VRA])[i * 2 .. i * 2 + 15]),0,255))[24 .. 31]; - (VR[VRT])[i + 64..i + 71] := - (Clamp (EXTZ ((VR[VRB])[i * 2 .. i * 2 + 15]),0,255))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkuwum - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001001110 as instr) = - Vpkuwum (VRT,VRA,VRB) - -function clause execute (Vpkuwum (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i..i + 15] := (VR[VRA])[i * 2 + 16 .. i * 2 + 31]; - (VR[VRT])[i + 64..i + 79] := (VR[VRB])[i * 2 + 16 .. i * 2 + 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vpkuwus - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00011001110 as instr) = - Vpkuwus (VRT,VRA,VRB) - -function clause execute (Vpkuwus (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i..i + 15] := - (Clamp (EXTZ ((VR[VRA])[i * 2 .. i * 2 + 31]),0,0b10000000000000000 - 1))[16 .. - 31]; - (VR[VRT])[i + 64..i + 79] := - (Clamp (EXTZ ((VR[VRB])[i * 2 .. i * 2 + 31]),0,0b10000000000000000 - 1))[16 .. - 31] - } - -union ast member (bit[5], bit[5]) Vupkhpx - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01101001110 as instr) = - Vupkhpx (VRT,VRB) - -function clause execute (Vupkhpx (VRT, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i * 2..i * 2 + 7] := EXTS ((VR[VRB])[i .. i]); - (VR[VRT])[i * 2 + 8..i * 2 + 15] := EXTZ ((VR[VRB])[i + 1 .. i + 5]); - (VR[VRT])[i * 2 + 16..i * 2 + 23] := EXTZ ((VR[VRB])[i + 6 .. i + 10]); - (VR[VRT])[i * 2 + 24..i * 2 + 31] := EXTZ ((VR[VRB])[i + 11 .. i + 15]) - } - -union ast member (bit[5], bit[5]) Vupkhsb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01000001110 as instr) = - Vupkhsb (VRT,VRB) - -function clause execute (Vupkhsb (VRT, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - (VR[VRT])[i * 2..i * 2 + 15] := EXTS ((VR[VRB])[i .. i + 7]) - -union ast member (bit[5], bit[5]) Vupkhsh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01001001110 as instr) = - Vupkhsh (VRT,VRB) - -function clause execute (Vupkhsh (VRT, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - (VR[VRT])[i * 2..i * 2 + 31] := EXTS ((VR[VRB])[i .. i + 15]) - -union ast member (bit[5], bit[5]) Vupklpx - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01111001110 as instr) = - Vupklpx (VRT,VRB) - -function clause execute (Vupklpx (VRT, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i * 2..i * 2 + 7] := EXTS ((VR[VRB])[i + 64 .. i + 64]); - (VR[VRT])[i * 2 + 8..i * 2 + 15] := EXTZ ((VR[VRB])[i + 65 .. i + 69]); - (VR[VRT])[i * 2 + 16..i * 2 + 23] := EXTZ ((VR[VRB])[i + 70 .. i + 74]); - (VR[VRT])[i * 2 + 24..i * 2 + 31] := EXTZ ((VR[VRB])[i + 75 .. i + 79]) - } - -union ast member (bit[5], bit[5]) Vupklsb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01010001110 as instr) = - Vupklsb (VRT,VRB) - -function clause execute (Vupklsb (VRT, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - (VR[VRT])[i * 2..i * 2 + 15] := EXTS ((VR[VRB])[i + 64 .. i + 71]) - -union ast member (bit[5], bit[5]) Vupklsh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01011001110 as instr) = - Vupklsh (VRT,VRB) - -function clause execute (Vupklsh (VRT, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - (VR[VRT])[i * 2..i * 2 + 31] := EXTS ((VR[VRB])[i + 64 .. i + 79]) - -union ast member (bit[5], bit[5], bit[5]) Vmrghb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000001100 as instr) = - Vmrghb (VRT,VRA,VRB) - -function clause execute (Vmrghb (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - { - (VR[VRT])[i * 2..i * 2 + 7] := (VR[VRA])[i .. i + 7]; - (VR[VRT])[i * 2 + 8..i * 2 + 15] := (VR[VRB])[i .. i + 7] - } - -union ast member (bit[5], bit[5], bit[5]) Vmrghh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001001100 as instr) = - Vmrghh (VRT,VRA,VRB) - -function clause execute (Vmrghh (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i * 2..i * 2 + 15] := (VR[VRA])[i .. i + 15]; - (VR[VRT])[i * 2 + 16..i * 2 + 31] := (VR[VRB])[i .. i + 15] - } - -union ast member (bit[5], bit[5], bit[5]) Vmrghw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00010001100 as instr) = - Vmrghw (VRT,VRA,VRB) - -function clause execute (Vmrghw (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 32 in inc) - { - (VR[VRT])[i * 2..i * 2 + 31] := (VR[VRA])[i .. i + 31]; - (VR[VRT])[i * 2 + 32..i * 2 + 63] := (VR[VRB])[i .. i + 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vmrglb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00100001100 as instr) = - Vmrglb (VRT,VRA,VRB) - -function clause execute (Vmrglb (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 8 in inc) - { - (VR[VRT])[i * 2..i * 2 + 7] := (VR[VRA])[i + 64 .. i + 71]; - (VR[VRT])[i * 2 + 8..i * 2 + 15] := (VR[VRB])[i + 64 .. i + 71] - } - -union ast member (bit[5], bit[5], bit[5]) Vmrglh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00101001100 as instr) = - Vmrglh (VRT,VRA,VRB) - -function clause execute (Vmrglh (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 16 in inc) - { - (VR[VRT])[i * 2..i * 2 + 15] := (VR[VRA])[i + 64 .. i + 79]; - (VR[VRT])[i * 2 + 16..i * 2 + 31] := (VR[VRB])[i + 64 .. i + 79] - } - -union ast member (bit[5], bit[5], bit[5]) Vmrglw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00110001100 as instr) = - Vmrglw (VRT,VRA,VRB) - -function clause execute (Vmrglw (VRT, VRA, VRB)) = - foreach (i from 0 to 63 by 32 in inc) - { - (VR[VRT])[i * 2..i * 2 + 31] := (VR[VRA])[i + 64 .. i + 95]; - (VR[VRT])[i * 2 + 32..i * 2 + 63] := (VR[VRB])[i + 64 .. i + 95] - } - -union ast member (bit[5], bit[4], bit[5]) Vspltb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[1]) _ : -(bit[4]) UIM : -(bit[5]) VRB : -0b01000001100 as instr) = - Vspltb (VRT,UIM,VRB) - -function clause execute (Vspltb (VRT, UIM, VRB)) = - { - b := UIM : 0b000; - foreach (i from 0 to 127 by 8 in inc) - (VR[VRT])[i..i + 7] := (VR[VRB])[b .. b + 7] - } - -union ast member (bit[5], bit[3], bit[5]) Vsplth - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[2]) _ : -(bit[3]) UIM : -(bit[5]) VRB : -0b01001001100 as instr) = - Vsplth (VRT,UIM,VRB) - -function clause execute (Vsplth (VRT, UIM, VRB)) = - { - b := UIM : 0b0000; - foreach (i from 0 to 127 by 16 in inc) - (VR[VRT])[i..i + 15] := (VR[VRB])[b .. b + 15] - } - -union ast member (bit[5], bit[2], bit[5]) Vspltw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[3]) _ : -(bit[2]) UIM : -(bit[5]) VRB : -0b01010001100 as instr) = - Vspltw (VRT,UIM,VRB) - -function clause execute (Vspltw (VRT, UIM, VRB)) = - { - b := UIM : 0b00000; - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := (VR[VRB])[b .. b + 31] - } - -union ast member (bit[5], bit[5]) Vspltisb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) SIM : -(bit[5]) _ : -0b01100001100 as instr) = - Vspltisb (VRT,SIM) - -function clause execute (Vspltisb (VRT, SIM)) = - foreach (i from 0 to 127 by 8 in inc) - (VR[VRT])[i..i + 7] := EXTS_EXPLICIT (SIM,8) - -union ast member (bit[5], bit[5]) Vspltish - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) SIM : -(bit[5]) _ : -0b01101001100 as instr) = - Vspltish (VRT,SIM) - -function clause execute (Vspltish (VRT, SIM)) = - foreach (i from 0 to 127 by 16 in inc) - (VR[VRT])[i..i + 15] := EXTS_EXPLICIT (SIM,16) - -union ast member (bit[5], bit[5]) Vspltisw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) SIM : -(bit[5]) _ : -0b01110001100 as instr) = - Vspltisw (VRT,SIM) - -function clause execute (Vspltisw (VRT, SIM)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := EXTS_EXPLICIT (SIM,32) - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vperm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b101011 as instr) = - Vperm (VRT,VRA,VRB,VRC) - -function clause execute (Vperm (VRT, VRA, VRB, VRC)) = - { - (bit[256]) temp := VR[VRA] : VR[VRB]; - foreach (i from 0 to 127 by 8 in inc) - { - b := (VR[VRC])[i + 3 .. i + 7] : 0b000; - (VR[VRT])[i..i + 7] := temp[b .. b + 7] - } - } - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vsel - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b101010 as instr) = - Vsel (VRT,VRA,VRB,VRC) - -function clause execute (Vsel (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5]) Vsl - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00111000100 as instr) = - Vsl (VRT,VRA,VRB) - -function clause execute (Vsl (VRT, VRA, VRB)) = - { - sh := (VR[VRB])[125 .. 127]; - t := 1; - foreach (i from 0 to 127 by 8 in inc) - t := (t & (VR[VRB])[i + 5 .. i + 7] == sh); - if t == 1 then VR[VRT] := VR[VRA] << sh else VR[VRT] := undefined - } - -union ast member (bit[5], bit[5], bit[5], bit[4]) Vsldoi - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[1]) _ : -(bit[4]) SHB : -0b101100 as instr) = - Vsldoi (VRT,VRA,VRB,SHB) - -function clause execute (Vsldoi (VRT, VRA, VRB, SHB)) = - VR[VRT] := (VR[VRA] : VR[VRB])[8 * SHB .. 8 * SHB + 127] - -union ast member (bit[5], bit[5], bit[5]) Vslo - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10000001100 as instr) = - Vslo (VRT,VRA,VRB) - -function clause execute (Vslo (VRT, VRA, VRB)) = - { - shb := (VR[VRB])[121 .. 124]; - VR[VRT] := VR[VRA] << (shb : 0b000) - } - -union ast member (bit[5], bit[5], bit[5]) Vsr - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01011000100 as instr) = - Vsr (VRT,VRA,VRB) - -function clause execute (Vsr (VRT, VRA, VRB)) = - { - sh := (VR[VRB])[125 .. 127]; - t := 1; - foreach (i from 0 to 127 by 8 in inc) - t := (t & (VR[VRB])[i + 5 .. i + 7] == sh); - if t == 1 then VR[VRT] := VR[VRA] >> sh else VR[VRT] := undefined - } - -union ast member (bit[5], bit[5], bit[5]) Vsro - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10001001100 as instr) = - Vsro (VRT,VRA,VRB) - -function clause execute (Vsro (VRT, VRA, VRB)) = - { - shb := (VR[VRB])[121 .. 124]; - VR[VRT] := VR[VRA] >> (shb : 0b000) - } - -union ast member (bit[5], bit[5], bit[5]) Vaddcuw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00110000000 as instr) = - Vaddcuw (VRT,VRA,VRB) - -function clause execute (Vaddcuw (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 31]); - bop := EXTZ ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := Chop (aop + bop >> 32,1) - } - -union ast member (bit[5], bit[5], bit[5]) Vaddsbs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01100000000 as instr) = - Vaddsbs (VRT,VRA,VRB) - -function clause execute (Vaddsbs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTS (VRA[i .. i + 7]); - bop := EXTS (VRB[i .. i + 7]); - (VR[VRT])[i..i + 7] := (Clamp (aop + bop,0 - 128,127))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vaddshs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01101000000 as instr) = - Vaddshs (VRT,VRA,VRB) - -function clause execute (Vaddshs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 15]); - bop := EXTS ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := - (Clamp (aop + bop,0 - 0b1000000000000000,0b1000000000000000 - 1))[16 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vaddsws - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01110000000 as instr) = - Vaddsws (VRT,VRA,VRB) - -function clause execute (Vaddsws (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 31]); - bop := EXTS ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := - Clamp - (aop + bop,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vaddubm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000000000 as instr) = - Vaddubm (VRT,VRA,VRB) - -function clause execute (Vaddubm (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 7]); - bop := EXTZ ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 7] := Chop (aop + bop,8) - } - -union ast member (bit[5], bit[5], bit[5]) Vadduhm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001000000 as instr) = - Vadduhm (VRT,VRA,VRB) - -function clause execute (Vadduhm (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 15]); - bop := EXTZ ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := Chop (aop + bop,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vadduwm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00010000000 as instr) = - Vadduwm (VRT,VRA,VRB) - -function clause execute (Vadduwm (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 31]); - bop := EXTZ ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := Chop (aop + bop,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vaddubs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01000000000 as instr) = - Vaddubs (VRT,VRA,VRB) - -function clause execute (Vaddubs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 7]); - bop := EXTZ ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 7] := (Clamp (aop + bop,0,255))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vadduhs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01001000000 as instr) = - Vadduhs (VRT,VRA,VRB) - -function clause execute (Vadduhs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 15]); - bop := EXTZ ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := - (Clamp (aop + bop,0,0b10000000000000000 - 1))[16 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vadduws - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01010000000 as instr) = - Vadduws (VRT,VRA,VRB) - -function clause execute (Vadduws (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 31]); - bop := EXTZ ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := - Clamp (aop + bop,0,0b100000000000000000000000000000000 - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsubcuw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10110000000 as instr) = - Vsubcuw (VRT,VRA,VRB) - -function clause execute (Vsubcuw (VRT, VRA, VRB)) = - { - (bit[32]) temp := 0; - foreach (i from 0 to 127 by 32 in inc) - { - aop := (VR[VRA])[i .. i + 31]; - bop := (VR[VRB])[i .. i + 31]; - temp := (bit[32]) (EXTZ (aop) + EXTZ (~ (bop))) + 1 >> 32; - (VR[VRT])[i..i + 31] := (temp & 0b00000000000000000000000000000001) - } - } - -union ast member (bit[5], bit[5], bit[5]) Vsubsbs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11100000000 as instr) = - Vsubsbs (VRT,VRA,VRB) - -function clause execute (Vsubsbs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 7]); - bop := EXTS ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 7] := - (Clamp ((bit[32]) (aop + ~ (bop)) + 1,0 - 128,127))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vsubshs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11101000000 as instr) = - Vsubshs (VRT,VRA,VRB) - -function clause execute (Vsubshs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 15]); - bop := EXTS ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := - (Clamp - ((bit[32]) (aop + ~ (bop)) + 1,0 - 0b1000000000000000,0b1000000000000000 - - 1))[16 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vsubsws - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11110000000 as instr) = - Vsubsws (VRT,VRA,VRB) - -function clause execute (Vsubsws (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 31]); - bop := EXTS ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := - Clamp - ((bit[32]) (aop + ~ (bop)) + 1,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsububm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10000000000 as instr) = - Vsububm (VRT,VRA,VRB) - -function clause execute (Vsububm (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 7]); - bop := EXTZ ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 7] := Chop ((bit[32]) (aop + ~ (bop)) + 1,8) - } - -union ast member (bit[5], bit[5], bit[5]) Vsubuhm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10001000000 as instr) = - Vsubuhm (VRT,VRA,VRB) - -function clause execute (Vsubuhm (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 15]); - bop := EXTZ ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 16] := Chop ((bit[32]) (aop + ~ (bop)) + 1,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vsubuwm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10010000000 as instr) = - Vsubuwm (VRT,VRA,VRB) - -function clause execute (Vsubuwm (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 31]); - bop := EXTZ ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := Chop ((bit[64]) (aop + ~ (bop)) + 1,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vsububs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11000000000 as instr) = - Vsububs (VRT,VRA,VRB) - -function clause execute (Vsububs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 7]); - bop := EXTZ ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 7] := - (Clamp ((bit[32]) (aop + ~ (bop)) + 1,0,255))[24 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vsubuhs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11001000000 as instr) = - Vsubuhs (VRT,VRA,VRB) - -function clause execute (Vsubuhs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 15]); - bop := EXTZ ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := - (Clamp ((bit[32]) (aop + ~ (bop)) + 1,0,0b10000000000000000 - 1))[16 .. 31] - } - -union ast member (bit[5], bit[5], bit[5]) Vsubuws - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11010000000 as instr) = - Vsubuws (VRT,VRA,VRB) - -function clause execute (Vsubuws (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 31]); - bop := EXTZ ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := - Clamp - ((bit[64]) (aop + ~ (bop)) + 1,0,0b100000000000000000000000000000000 - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vmulesb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01100001000 as instr) = - Vmulesb (VRT,VRA,VRB) - -function clause execute (Vmulesb (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - prod := EXTS ((VR[VRA])[i .. i + 7]) * EXTS ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 15] := Chop (prod,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vmulesh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01101001000 as instr) = - Vmulesh (VRT,VRA,VRB) - -function clause execute (Vmulesh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - prod := EXTS ((VR[VRA])[i .. i + 15]) * EXTS ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 31] := Chop (prod,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vmuleub - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01000001000 as instr) = - Vmuleub (VRT,VRA,VRB) - -function clause execute (Vmuleub (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - prod := EXTZ ((VR[VRA])[i .. i + 7]) * EXTZ ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 15] := Chop (prod,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vmuleuh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01001001000 as instr) = - Vmuleuh (VRT,VRA,VRB) - -function clause execute (Vmuleuh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - prod := EXTZ ((VR[VRA])[i .. i + 15]) * EXTZ ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 31] := Chop (prod,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vmulosb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00100001000 as instr) = - Vmulosb (VRT,VRA,VRB) - -function clause execute (Vmulosb (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - prod := - EXTS ((VR[VRA])[i + 8 .. i + 15]) * EXTS ((VR[VRB])[i + 8 .. i + 15]); - (VR[VRT])[i..i + 15] := Chop (prod,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vmulosh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00101001000 as instr) = - Vmulosh (VRT,VRA,VRB) - -function clause execute (Vmulosh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - prod := - EXTS ((VR[VRA])[i + 16 .. i + 31]) * EXTS ((VR[VRB])[i + 16 .. i + 31]); - (VR[VRT])[i..i + 31] := Chop (prod,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vmuloub - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000001000 as instr) = - Vmuloub (VRT,VRA,VRB) - -function clause execute (Vmuloub (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - prod := - EXTZ ((VR[VRA])[i + 8 .. i + 15]) * EXTZ ((VR[VRB])[i + 8 .. i + 15]); - (VR[VRT])[i..i + 15] := Chop (prod,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vmulouh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001001000 as instr) = - Vmulouh (VRT,VRA,VRB) - -function clause execute (Vmulouh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - prod := - EXTZ ((VR[VRA])[i + 16 .. i + 31]) * EXTZ ((VR[VRB])[i + 16 .. i + 31]); - (VR[VRT])[i..i + 31] := Chop (prod,32) - } - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmhaddshs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100000 as instr) = - Vmhaddshs (VRT,VRA,VRB,VRC) - -function clause execute (Vmhaddshs (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmhraddshs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100001 as instr) = - Vmhraddshs (VRT,VRA,VRB,VRC) - -function clause execute (Vmhraddshs (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmladduhm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100010 as instr) = - Vmladduhm (VRT,VRA,VRB,VRC) - -function clause execute (Vmladduhm (VRT, VRA, VRB, VRC)) = - { - (bit[16]) prod := 0; - (bit[16]) sum := 0; - foreach (i from 0 to 127 by 16 in inc) - { - prod := EXTZ ((VR[VRA])[i .. i + 15]) * EXTZ ((VR[VRB])[i .. i + 15]); - sum := Chop (prod,16) + (VR[VRC])[i .. i + 15]; - (VR[VRT])[i..i + 15] := Chop (sum,16) - } - } - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmsumubm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100100 as instr) = - Vmsumubm (VRT,VRA,VRB,VRC) - -function clause execute (Vmsumubm (VRT, VRA, VRB, VRC)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTZ ((VR[VRC])[i .. i + 31]); - foreach (j from 0 to 31 by 8 in inc) - { - prod := - EXTZ ((VR[VRA])[i + j .. i + j + 7]) * - EXTZ ((VR[VRB])[i + j .. i + j + 7]); - temp := temp + prod - }; - (VR[VRT])[i..i + 31] := Chop (temp,32) - } - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmsummbm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100101 as instr) = - Vmsummbm (VRT,VRA,VRB,VRC) - -function clause execute (Vmsummbm (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmsumshm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b101000 as instr) = - Vmsumshm (VRT,VRA,VRB,VRC) - -function clause execute (Vmsumshm (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmsumshs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b101001 as instr) = - Vmsumshs (VRT,VRA,VRB,VRC) - -function clause execute (Vmsumshs (VRT, VRA, VRB, VRC)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTS ((VR[VRC])[i .. i + 31]); - foreach (j from 0 to 31 by 16 in inc) - { - prod := - EXTS ((VR[VRA])[i + j .. i + j + 15]) * - EXTS ((VR[VRB])[i + j .. i + j + 15]); - temp := temp + prod - }; - (VR[VRT])[i..i + 31] := - Clamp - (temp,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmsumuhm - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100110 as instr) = - Vmsumuhm (VRT,VRA,VRB,VRC) - -function clause execute (Vmsumuhm (VRT, VRA, VRB, VRC)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTZ ((VR[VRC])[i .. i + 31]); - foreach (j from 0 to 31 by 16 in inc) - { - prod := - EXTZ ((VR[VRA])[i + j .. i + j + 15]) * - EXTZ ((VR[VRB])[i + j .. i + j + 15]); - temp := temp + prod - }; - (VR[VRT])[i..i + 31] := Chop (temp,32) - } - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmsumuhs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b100111 as instr) = - Vmsumuhs (VRT,VRA,VRB,VRC) - -function clause execute (Vmsumuhs (VRT, VRA, VRB, VRC)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTZ ((VR[VRC])[i .. i + 31]); - foreach (j from 0 to 31 by 16 in inc) - { - prod := - EXTZ ((VR[VRA])[i + j .. i + j + 15]) * - EXTZ ((VR[VRB])[i + j .. i + j + 15]); - temp := temp + prod - }; - (VR[VRT])[i..i + 31] := - Clamp (temp,0,0b100000000000000000000000000000000 - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsumsws - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11110001000 as instr) = - Vsumsws (VRT,VRA,VRB) - -function clause execute (Vsumsws (VRT, VRA, VRB)) = - { - temp := EXTS ((VR[VRB])[96 .. 127]); - foreach (i from 0 to 127 by 32 in inc) - temp := temp + EXTS ((VR[VRA])[i .. i + 31]); - (VR[VRT])[0..31] := 0b00000000000000000000000000000000; - (VR[VRT])[32..63] := 0b00000000000000000000000000000000; - (VR[VRT])[64..95] := 0b00000000000000000000000000000000; - (VR[VRT])[96..127] := - Clamp - (temp,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsum2sws - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11010001000 as instr) = - Vsum2sws (VRT,VRA,VRB) - -function clause execute (Vsum2sws (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 64 in inc) - { - temp := EXTS ((VR[VRB])[i + 32 .. i + 63]); - foreach (j from 0 to 63 by 32 in inc) - temp := temp + EXTS ((VR[VRA])[i + j .. i + j + 31]); - (VR[VRT])[i..i + 63] := - 0b00000000000000000000000000000000 : - Clamp - (temp,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsum4sbs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11100001000 as instr) = - Vsum4sbs (VRT,VRA,VRB) - -function clause execute (Vsum4sbs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTS ((VR[VRB])[i .. i + 31]); - foreach (j from 0 to 31 by 8 in inc) - temp := temp + EXTS ((VR[VRA])[i + j .. i + j + 7]); - (VR[VRT])[i..i + 31] := - Clamp - (temp,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsum4shs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11001001000 as instr) = - Vsum4shs (VRT,VRA,VRB) - -function clause execute (Vsum4shs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTS ((VR[VRB])[i .. i + 31]); - foreach (j from 0 to 31 by 16 in inc) - temp := temp + EXTS ((VR[VRA])[i + j .. i + j + 15]); - (VR[VRT])[i..i + 31] := - Clamp - (temp,0 - 0b10000000000000000000000000000000,0b10000000000000000000000000000000 - - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vsum4ubs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b11000001000 as instr) = - Vsum4ubs (VRT,VRA,VRB) - -function clause execute (Vsum4ubs (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - temp := EXTZ ((VR[VRB])[i .. i + 31]); - foreach (j from 0 to 31 by 8 in inc) - temp := temp + EXTZ ((VR[VRA])[i + j .. i + j + 7]); - (VR[VRT])[i..i + 31] := - Clamp (temp,0,0b100000000000000000000000000000000 - 1) - } - -union ast member (bit[5], bit[5], bit[5]) Vavgsb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10100000010 as instr) = - Vavgsb (VRT,VRA,VRB) - -function clause execute (Vavgsb (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 7]); - bop := EXTS ((VR[VRB])[i .. i + 7]); - (VR[VRT])[i..i + 7] := Chop ((bit[32]) (aop + bop) + 1 >> 1,8) - } - -union ast member (bit[5], bit[5], bit[5]) Vavgsh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10101000010 as instr) = - Vavgsh (VRT,VRA,VRB) - -function clause execute (Vavgsh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 15]); - bop := EXTS ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := Chop ((bit[32]) (aop + bop) + 1 >> 1,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vavgsw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10110000010 as instr) = - Vavgsw (VRT,VRA,VRB) - -function clause execute (Vavgsw (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTS ((VR[VRA])[i .. i + 31]); - bop := EXTS ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := Chop ((bit[32]) (aop + bop) + 1 >> 1,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vavgub - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10000000010 as instr) = - Vavgub (VRT,VRA,VRB) - -function clause execute (Vavgub (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vavguh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10001000010 as instr) = - Vavguh (VRT,VRA,VRB) - -function clause execute (Vavguh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 15]); - bop := EXTZ ((VR[VRB])[i .. i + 15]); - (VR[VRT])[i..i + 15] := Chop ((bit[32]) (aop + bop) + 1 >> 1,16) - } - -union ast member (bit[5], bit[5], bit[5]) Vavguw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10010000010 as instr) = - Vavguw (VRT,VRA,VRB) - -function clause execute (Vavguw (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - aop := EXTZ ((VR[VRA])[i .. i + 31]); - bop := EXTZ ((VR[VRB])[i .. i + 31]); - (VR[VRT])[i..i + 31] := Chop ((bit[32]) (aop + bop) + 1 >> 1,32) - } - -union ast member (bit[5], bit[5], bit[5]) Vmaxsb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00100000010 as instr) = - Vmaxsb (VRT,VRA,VRB) - -function clause execute (Vmaxsb (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vmaxsh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00101000010 as instr) = - Vmaxsh (VRT,VRA,VRB) - -function clause execute (Vmaxsh (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vmaxsw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00110000010 as instr) = - Vmaxsw (VRT,VRA,VRB) - -function clause execute (Vmaxsw (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vmaxub - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000000010 as instr) = - Vmaxub (VRT,VRA,VRB) - -function clause execute (Vmaxub (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vmaxuh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001000010 as instr) = - Vmaxuh (VRT,VRA,VRB) - -function clause execute (Vmaxuh (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vmaxuw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00010000010 as instr) = - Vmaxuw (VRT,VRA,VRB) - -function clause execute (Vmaxuw (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminsb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01100000010 as instr) = - Vminsb (VRT,VRA,VRB) - -function clause execute (Vminsb (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminsh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01101000010 as instr) = - Vminsh (VRT,VRA,VRB) - -function clause execute (Vminsh (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminsw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01110000010 as instr) = - Vminsw (VRT,VRA,VRB) - -function clause execute (Vminsw (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminub - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01000000010 as instr) = - Vminub (VRT,VRA,VRB) - -function clause execute (Vminub (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminuh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01001000010 as instr) = - Vminuh (VRT,VRA,VRB) - -function clause execute (Vminuh (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminuw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01010000010 as instr) = - Vminuw (VRT,VRA,VRB) - -function clause execute (Vminuw (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpequb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b0000000110 as instr) = - Vcmpequb (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpequb (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpequh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b0001000110 as instr) = - Vcmpequh (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpequh (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpequw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b0010000110 as instr) = - Vcmpequw (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpequw (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtsb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1100000110 as instr) = - Vcmpgtsb (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtsb (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtsh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1101000110 as instr) = - Vcmpgtsh (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtsh (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtsw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1110000110 as instr) = - Vcmpgtsw (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtsw (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtub - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1000000110 as instr) = - Vcmpgtub (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtub (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtuh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1001000110 as instr) = - Vcmpgtuh (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtuh (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtuw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1010000110 as instr) = - Vcmpgtuw (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtuw (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5]) Vand - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10000000100 as instr) = - Vand (VRT,VRA,VRB) - -function clause execute (Vand (VRT, VRA, VRB)) = VR[VRT] := (VR[VRA] & VR[VRB]) - -union ast member (bit[5], bit[5], bit[5]) Vandc - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10001000100 as instr) = - Vandc (VRT,VRA,VRB) - -function clause execute (Vandc (VRT, VRA, VRB)) = - VR[VRT] := (VR[VRA] & ~ (VR[VRB])) - -union ast member (bit[5], bit[5], bit[5]) Vnor - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10100000100 as instr) = - Vnor (VRT,VRA,VRB) - -function clause execute (Vnor (VRT, VRA, VRB)) = - VR[VRT] := ~ (VR[VRA] | VR[VRB]) - -union ast member (bit[5], bit[5], bit[5]) Vor - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10010000100 as instr) = - Vor (VRT,VRA,VRB) - -function clause execute (Vor (VRT, VRA, VRB)) = VR[VRT] := (VR[VRA] | VR[VRB]) - -union ast member (bit[5], bit[5], bit[5]) Vxor - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10011000100 as instr) = - Vxor (VRT,VRA,VRB) - -function clause execute (Vxor (VRT, VRA, VRB)) = VR[VRT] := VR[VRA] ^ VR[VRB] - -union ast member (bit[5], bit[5], bit[5]) Vrlb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000000100 as instr) = - Vrlb (VRT,VRA,VRB) - -function clause execute (Vrlb (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - sh := (VR[VRB])[i + 5 .. i + 7]; - (VR[VRT])[i..i + 7] := (VR[VRA])[i .. i + 7] << sh - } - -union ast member (bit[5], bit[5], bit[5]) Vrlh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001000100 as instr) = - Vrlh (VRT,VRA,VRB) - -function clause execute (Vrlh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - sh := (VR[VRB])[i + 12 .. i + 15]; - (VR[VRT])[i..i + 15] := (VR[VRA])[i .. i + 15] << sh - } - -union ast member (bit[5], bit[5], bit[5]) Vrlw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00010000100 as instr) = - Vrlw (VRT,VRA,VRB) - -function clause execute (Vrlw (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - sh := (VR[VRB])[i + 27 .. i + 31]; - (VR[VRT])[i..i + 31] := (VR[VRA])[i .. i + 31] << sh - } - -union ast member (bit[5], bit[5], bit[5]) Vslb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00100000100 as instr) = - Vslb (VRT,VRA,VRB) - -function clause execute (Vslb (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - sh := (VR[VRB])[i + 5 .. i + 7]; - (VR[VRT])[i..i + 7] := (VR[VRA])[i .. i + 7] << sh - } - -union ast member (bit[5], bit[5], bit[5]) Vslh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00101000100 as instr) = - Vslh (VRT,VRA,VRB) - -function clause execute (Vslh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - sh := (VR[VRB])[i + 12 .. i + 15]; - (VR[VRT])[i..i + 15] := (VR[VRA])[i .. i + 15] << sh - } - -union ast member (bit[5], bit[5], bit[5]) Vslw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00110000100 as instr) = - Vslw (VRT,VRA,VRB) - -function clause execute (Vslw (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - sh := (VR[VRB])[i + 27 .. i + 31]; - (VR[VRT])[i..i + 31] := (VR[VRA])[i .. i + 31] << sh - } - -union ast member (bit[5], bit[5], bit[5]) Vsrb - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01000000100 as instr) = - Vsrb (VRT,VRA,VRB) - -function clause execute (Vsrb (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 8 in inc) - { - sh := (VR[VRB])[i + 5 .. i + 7]; - (VR[VRT])[i..i + 7] := (VR[VRA])[i .. i + 7] >> sh - } - -union ast member (bit[5], bit[5], bit[5]) Vsrh - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01001000100 as instr) = - Vsrh (VRT,VRA,VRB) - -function clause execute (Vsrh (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 16 in inc) - { - sh := (VR[VRB])[i + 12 .. i + 15]; - (VR[VRT])[i..i + 15] := (VR[VRA])[i .. i + 15] >> sh - } - -union ast member (bit[5], bit[5], bit[5]) Vsrw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01010000100 as instr) = - Vsrw (VRT,VRA,VRB) - -function clause execute (Vsrw (VRT, VRA, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - { - sh := (VR[VRB])[i + 27 .. i + 31]; - (VR[VRT])[i..i + 31] := (VR[VRA])[i .. i + 31] >> sh - } - -union ast member (bit[5], bit[5], bit[5]) Vsrab - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01100000100 as instr) = - Vsrab (VRT,VRA,VRB) - -function clause execute (Vsrab (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vsrah - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01101000100 as instr) = - Vsrah (VRT,VRA,VRB) - -function clause execute (Vsrah (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vsraw - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b01110000100 as instr) = - Vsraw (VRT,VRA,VRB) - -function clause execute (Vsraw (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vaddfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00000001010 as instr) = - Vaddfp (VRT,VRA,VRB) - -function clause execute (Vaddfp (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vsubfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b00001001010 as instr) = - Vsubfp (VRT,VRA,VRB) - -function clause execute (Vsubfp (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vmaddfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b101110 as instr) = - Vmaddfp (VRT,VRA,VRB,VRC) - -function clause execute (Vmaddfp (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5]) Vnmsubfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -(bit[5]) VRC : -0b101111 as instr) = - Vnmsubfp (VRT,VRA,VRB,VRC) - -function clause execute (Vnmsubfp (VRT, VRA, VRB, VRC)) = () - -union ast member (bit[5], bit[5], bit[5]) Vmaxfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10000001010 as instr) = - Vmaxfp (VRT,VRA,VRB) - -function clause execute (Vmaxfp (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vminfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -0b10001001010 as instr) = - Vminfp (VRT,VRA,VRB) - -function clause execute (Vminfp (VRT, VRA, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vctsxs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) UIM : -(bit[5]) VRB : -0b01111001010 as instr) = - Vctsxs (VRT,UIM,VRB) - -function clause execute (Vctsxs (VRT, UIM, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := ConvertSPtoSXWsaturate ((VR[VRB])[i .. i + 31],UIM) - -union ast member (bit[5], bit[5], bit[5]) Vctuxs - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) UIM : -(bit[5]) VRB : -0b01110001010 as instr) = - Vctuxs (VRT,UIM,VRB) - -function clause execute (Vctuxs (VRT, UIM, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := ConvertSPtoUXWsaturate ((VR[VRB])[i .. i + 31],UIM) - -union ast member (bit[5], bit[5], bit[5]) Vcfsx - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) UIM : -(bit[5]) VRB : -0b01101001010 as instr) = - Vcfsx (VRT,UIM,VRB) - -function clause execute (Vcfsx (VRT, UIM, VRB)) = () - -union ast member (bit[5], bit[5], bit[5]) Vcfux - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) UIM : -(bit[5]) VRB : -0b01100001010 as instr) = - Vcfux (VRT,UIM,VRB) - -function clause execute (Vcfux (VRT, UIM, VRB)) = () - -union ast member (bit[5], bit[5]) Vrfim - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01011001010 as instr) = - Vrfim (VRT,VRB) - -function clause execute (Vrfim (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[0..31] := RoundToSPIntFloor ((VR[VRB])[0 .. 31]) - -union ast member (bit[5], bit[5]) Vrfin - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01000001010 as instr) = - Vrfin (VRT,VRB) - -function clause execute (Vrfin (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[0..31] := RoundToSPIntNear ((VR[VRB])[0 .. 31]) - -union ast member (bit[5], bit[5]) Vrfip - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01010001010 as instr) = - Vrfip (VRT,VRB) - -function clause execute (Vrfip (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[0..31] := RoundToSPIntCeil ((VR[VRB])[0 .. 31]) - -union ast member (bit[5], bit[5]) Vrfiz - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b01001001010 as instr) = - Vrfiz (VRT,VRB) - -function clause execute (Vrfiz (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[0..31] := RoundToSPIntTrunc ((VR[VRB])[0 .. 31]) - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpbfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1111000110 as instr) = - Vcmpbfp (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpbfp (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpeqfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b0011000110 as instr) = - Vcmpeqfp (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpeqfp (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgefp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b0111000110 as instr) = - Vcmpgefp (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgefp (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Vcmpgtfp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) VRA : -(bit[5]) VRB : -[Rc] : -0b1011000110 as instr) = - Vcmpgtfp (VRT,VRA,VRB,Rc) - -function clause execute (Vcmpgtfp (VRT, VRA, VRB, Rc)) = () - -union ast member (bit[5], bit[5]) Vexptefp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b00110001010 as instr) = - Vexptefp (VRT,VRB) - -function clause execute (Vexptefp (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := Power2EstimateSP ((VR[VRB])[i .. i + 31]) - -union ast member (bit[5], bit[5]) Vlogefp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b00111001010 as instr) = - Vlogefp (VRT,VRB) - -function clause execute (Vlogefp (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := LogBase2EstimateSP ((VR[VRB])[i .. i + 31]) - -union ast member (bit[5], bit[5]) Vrefp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b00100001010 as instr) = - Vrefp (VRT,VRB) - -function clause execute (Vrefp (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := ReciprocalEstimateSP ((VR[VRB])[i .. i + 31]) - -union ast member (bit[5], bit[5]) Vrsqrtefp - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[5]) _ : -(bit[5]) VRB : -0b00101001010 as instr) = - Vrsqrtefp (VRT,VRB) - -function clause execute (Vrsqrtefp (VRT, VRB)) = - foreach (i from 0 to 127 by 32 in inc) - (VR[VRT])[i..i + 31] := - ReciprocalSquareRootEstimateSP ((VR[VRB])[i .. i + 31]) - -union ast member (bit[5]) Mtvscr - -function clause decode (0b000100 : -(bit[10]) _ : -(bit[5]) VRB : -0b11001000100 as instr) = - Mtvscr (VRB) - -function clause execute (Mtvscr (VRB)) = VSCR := (VR[VRB])[96 .. 127] - -union ast member (bit[5]) Mfvscr - -function clause decode (0b000100 : -(bit[5]) VRT : -(bit[10]) _ : -0b11000000100 as instr) = - Mfvscr (VRT) - -function clause execute (Mfvscr (VRT)) = - VR[VRT] := - 0b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 : - VSCR - -union ast member (bit[5], bit[5], bit[5], bit) Lxsdx - -function clause decode (0b011111 : -(bit[5]) T : -(bit[5]) RA : -(bit[5]) RB : -0b1001001100 : -[TX] as instr) = - Lxsdx (T,RA,RB,TX) - -function clause execute (Lxsdx (T, RA, RB, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Lxvd2x - -function clause decode (0b011111 : -(bit[5]) T : -(bit[5]) RA : -(bit[5]) RB : -0b1101001100 : -[TX] as instr) = - Lxvd2x (T,RA,RB,TX) - -function clause execute (Lxvd2x (T, RA, RB, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Lxvdsx - -function clause decode (0b011111 : -(bit[5]) T : -(bit[5]) RA : -(bit[5]) RB : -0b0101001100 : -[TX] as instr) = - Lxvdsx (T,RA,RB,TX) - -function clause execute (Lxvdsx (T, RA, RB, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Lxvw4x - -function clause decode (0b011111 : -(bit[5]) T : -(bit[5]) RA : -(bit[5]) RB : -0b1100001100 : -[TX] as instr) = - Lxvw4x (T,RA,RB,TX) - -function clause execute (Lxvw4x (T, RA, RB, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Stxsdx - -function clause decode (0b011111 : -(bit[5]) S : -(bit[5]) RA : -(bit[5]) RB : -0b1011001100 : -[SX] as instr) = - Stxsdx (S,RA,RB,SX) - -function clause execute (Stxsdx (S, RA, RB, SX)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Stxvd2x - -function clause decode (0b011111 : -(bit[5]) S : -(bit[5]) RA : -(bit[5]) RB : -0b1111001100 : -[SX] as instr) = - Stxvd2x (S,RA,RB,SX) - -function clause execute (Stxvd2x (S, RA, RB, SX)) = () - -union ast member (bit[5], bit[5], bit[5], bit) Stxvw4x - -function clause decode (0b011111 : -(bit[5]) S : -(bit[5]) RA : -(bit[5]) RB : -0b1110001100 : -[SX] as instr) = - Stxvw4x (S,RA,RB,SX) - -function clause execute (Stxvw4x (S, RA, RB, SX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsabsdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101011001 : -[BX] : -[TX] as instr) = - Xsabsdp (T,B,BX,TX) - -function clause execute (Xsabsdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsadddp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00100000 : -[AX] : -[BX] : -[TX] as instr) = - Xsadddp (T,A,B,AX,BX,TX) - -function clause execute (Xsadddp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[3], bit[5], bit[5], bit, bit) Xscmpodp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) A : -(bit[5]) B : -0b00101011 : -[AX] : -[BX] : -(bit[1]) _ as instr) = - Xscmpodp (BF,A,B,AX,BX) - -function clause execute (Xscmpodp (BF, A, B, AX, BX)) = () - -union ast member (bit[3], bit[5], bit[5], bit, bit) Xscmpudp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) A : -(bit[5]) B : -0b00100011 : -[AX] : -[BX] : -(bit[1]) _ as instr) = - Xscmpudp (BF,A,B,AX,BX) - -function clause execute (Xscmpudp (BF, A, B, AX, BX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xscpsgndp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10110000 : -[AX] : -[BX] : -[TX] as instr) = - Xscpsgndp (T,A,B,AX,BX,TX) - -function clause execute (Xscpsgndp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvdpsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b100001001 : -[BX] : -[TX] as instr) = - Xscvdpsp (T,B,BX,TX) - -function clause execute (Xscvdpsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvdpsxds - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101011000 : -[BX] : -[TX] as instr) = - Xscvdpsxds (T,B,BX,TX) - -function clause execute (Xscvdpsxds (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvdpsxws - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001011000 : -[BX] : -[TX] as instr) = - Xscvdpsxws (T,B,BX,TX) - -function clause execute (Xscvdpsxws (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvdpuxds - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101001000 : -[BX] : -[TX] as instr) = - Xscvdpuxds (T,B,BX,TX) - -function clause execute (Xscvdpuxds (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvdpuxws - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001001000 : -[BX] : -[TX] as instr) = - Xscvdpuxws (T,B,BX,TX) - -function clause execute (Xscvdpuxws (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvspdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101001001 : -[BX] : -[TX] as instr) = - Xscvspdp (T,B,BX,TX) - -function clause execute (Xscvspdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvsxddp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101111000 : -[BX] : -[TX] as instr) = - Xscvsxddp (T,B,BX,TX) - -function clause execute (Xscvsxddp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xscvuxddp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101101000 : -[BX] : -[TX] as instr) = - Xscvuxddp (T,B,BX,TX) - -function clause execute (Xscvuxddp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsdivdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00111000 : -[AX] : -[BX] : -[TX] as instr) = - Xsdivdp (T,A,B,AX,BX,TX) - -function clause execute (Xsdivdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmaddmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00101001 : -[AX] : -[BX] : -[TX] as instr) = - Xsmaddmdp (T,A,B,AX,BX,TX) - -function clause execute (Xsmaddmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmaddadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00100001 : -[AX] : -[BX] : -[TX] as instr) = - Xsmaddadp (T,A,B,AX,BX,TX) - -function clause execute (Xsmaddadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmaxdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10100000 : -[AX] : -[BX] : -[TX] as instr) = - Xsmaxdp (T,A,B,AX,BX,TX) - -function clause execute (Xsmaxdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmindp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10101000 : -[AX] : -[BX] : -[TX] as instr) = - Xsmindp (T,A,B,AX,BX,TX) - -function clause execute (Xsmindp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmsubmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00111001 : -[AX] : -[BX] : -[TX] as instr) = - Xsmsubmdp (T,A,B,AX,BX,TX) - -function clause execute (Xsmsubmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmsubadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00110001 : -[AX] : -[BX] : -[TX] as instr) = - Xsmsubadp (T,A,B,AX,BX,TX) - -function clause execute (Xsmsubadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsmuldp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00110000 : -[AX] : -[BX] : -[TX] as instr) = - Xsmuldp (T,A,B,AX,BX,TX) - -function clause execute (Xsmuldp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsnabsdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101101001 : -[BX] : -[TX] as instr) = - Xsnabsdp (T,B,BX,TX) - -function clause execute (Xsnabsdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsnegdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b101111001 : -[BX] : -[TX] as instr) = - Xsnegdp (T,B,BX,TX) - -function clause execute (Xsnegdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsnmaddmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10101001 : -[AX] : -[BX] : -[TX] as instr) = - Xsnmaddmdp (T,A,B,AX,BX,TX) - -function clause execute (Xsnmaddmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsnmaddadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10100001 : -[AX] : -[BX] : -[TX] as instr) = - Xsnmaddadp (T,A,B,AX,BX,TX) - -function clause execute (Xsnmaddadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsnmsubmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10111001 : -[AX] : -[BX] : -[TX] as instr) = - Xsnmsubmdp (T,A,B,AX,BX,TX) - -function clause execute (Xsnmsubmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xsnmsubadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10110001 : -[AX] : -[BX] : -[TX] as instr) = - Xsnmsubadp (T,A,B,AX,BX,TX) - -function clause execute (Xsnmsubadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsrdpi - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001001001 : -[BX] : -[TX] as instr) = - Xsrdpi (T,B,BX,TX) - -function clause execute (Xsrdpi (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsrdpic - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001101011 : -[BX] : -[TX] as instr) = - Xsrdpic (T,B,BX,TX) - -function clause execute (Xsrdpic (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsrdpim - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001111001 : -[BX] : -[TX] as instr) = - Xsrdpim (T,B,BX,TX) - -function clause execute (Xsrdpim (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsrdpip - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001101001 : -[BX] : -[TX] as instr) = - Xsrdpip (T,B,BX,TX) - -function clause execute (Xsrdpip (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsrdpiz - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001011001 : -[BX] : -[TX] as instr) = - Xsrdpiz (T,B,BX,TX) - -function clause execute (Xsrdpiz (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsredp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001011010 : -[BX] : -[TX] as instr) = - Xsredp (T,B,BX,TX) - -function clause execute (Xsredp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xsrsqrtedp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001001010 : -[BX] : -[TX] as instr) = - Xsrsqrtedp (T,B,BX,TX) - -function clause execute (Xsrsqrtedp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xssqrtdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b001001011 : -[BX] : -[TX] as instr) = - Xssqrtdp (T,B,BX,TX) - -function clause execute (Xssqrtdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xssubdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00101000 : -[AX] : -[BX] : -[TX] as instr) = - Xssubdp (T,A,B,AX,BX,TX) - -function clause execute (Xssubdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[3], bit[5], bit[5], bit, bit) Xstdivdp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) A : -(bit[5]) B : -0b00111101 : -[AX] : -[BX] : -(bit[1]) _ as instr) = - Xstdivdp (BF,A,B,AX,BX) - -function clause execute (Xstdivdp (BF, A, B, AX, BX)) = () - -union ast member (bit[3], bit[5], bit) Xstsqrtdp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) _ : -(bit[5]) B : -0b001101010 : -[BX] : -(bit[1]) _ as instr) = - Xstsqrtdp (BF,B,BX) - -function clause execute (Xstsqrtdp (BF, B, BX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvabsdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111011001 : -[BX] : -[TX] as instr) = - Xvabsdp (T,B,BX,TX) - -function clause execute (Xvabsdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvabssp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110011001 : -[BX] : -[TX] as instr) = - Xvabssp (T,B,BX,TX) - -function clause execute (Xvabssp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvadddp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01100000 : -[AX] : -[BX] : -[TX] as instr) = - Xvadddp (T,A,B,AX,BX,TX) - -function clause execute (Xvadddp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvaddsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01000000 : -[AX] : -[BX] : -[TX] as instr) = - Xvaddsp (T,A,B,AX,BX,TX) - -function clause execute (Xvaddsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit, bit) Xvcmpeqdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -[Rc] : -0b1100011 : -[AX] : -[BX] : -[TX] as instr) = - Xvcmpeqdp (T,A,B,Rc,AX,BX,TX) - -function clause execute (Xvcmpeqdp (T, A, B, Rc, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit, bit) Xvcmpeqsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -[Rc] : -0b1000011 : -[AX] : -[BX] : -[TX] as instr) = - Xvcmpeqsp (T,A,B,Rc,AX,BX,TX) - -function clause execute (Xvcmpeqsp (T, A, B, Rc, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit, bit) Xvcmpgedp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -[Rc] : -0b1110011 : -[AX] : -[BX] : -[TX] as instr) = - Xvcmpgedp (T,A,B,Rc,AX,BX,TX) - -function clause execute (Xvcmpgedp (T, A, B, Rc, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit, bit) Xvcmpgesp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -[Rc] : -0b1010011 : -[AX] : -[BX] : -[TX] as instr) = - Xvcmpgesp (T,A,B,Rc,AX,BX,TX) - -function clause execute (Xvcmpgesp (T, A, B, Rc, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit, bit) Xvcmpgtdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -[Rc] : -0b1101011 : -[AX] : -[BX] : -[TX] as instr) = - Xvcmpgtdp (T,A,B,Rc,AX,BX,TX) - -function clause execute (Xvcmpgtdp (T, A, B, Rc, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit, bit) Xvcmpgtsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -[Rc] : -0b1001011 : -[AX] : -[BX] : -[TX] as instr) = - Xvcmpgtsp (T,A,B,Rc,AX,BX,TX) - -function clause execute (Xvcmpgtsp (T, A, B, Rc, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvcpsgndp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11110000 : -[AX] : -[BX] : -[TX] as instr) = - Xvcpsgndp (T,A,B,AX,BX,TX) - -function clause execute (Xvcpsgndp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvcpsgnsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11010000 : -[AX] : -[BX] : -[TX] as instr) = - Xvcpsgnsp (T,A,B,AX,BX,TX) - -function clause execute (Xvcpsgnsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvdpsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110001001 : -[BX] : -[TX] as instr) = - Xvcvdpsp (T,B,BX,TX) - -function clause execute (Xvcvdpsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvdpsxds - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111011000 : -[BX] : -[TX] as instr) = - Xvcvdpsxds (T,B,BX,TX) - -function clause execute (Xvcvdpsxds (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvdpsxws - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011011000 : -[BX] : -[TX] as instr) = - Xvcvdpsxws (T,B,BX,TX) - -function clause execute (Xvcvdpsxws (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvdpuxds - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111001000 : -[BX] : -[TX] as instr) = - Xvcvdpuxds (T,B,BX,TX) - -function clause execute (Xvcvdpuxds (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvdpuxws - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011001000 : -[BX] : -[TX] as instr) = - Xvcvdpuxws (T,B,BX,TX) - -function clause execute (Xvcvdpuxws (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvspdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111001001 : -[BX] : -[TX] as instr) = - Xvcvspdp (T,B,BX,TX) - -function clause execute (Xvcvspdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvspsxds - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110011000 : -[BX] : -[TX] as instr) = - Xvcvspsxds (T,B,BX,TX) - -function clause execute (Xvcvspsxds (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvspsxws - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010011000 : -[BX] : -[TX] as instr) = - Xvcvspsxws (T,B,BX,TX) - -function clause execute (Xvcvspsxws (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvspuxds - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110001000 : -[BX] : -[TX] as instr) = - Xvcvspuxds (T,B,BX,TX) - -function clause execute (Xvcvspuxds (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvspuxws - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010001000 : -[BX] : -[TX] as instr) = - Xvcvspuxws (T,B,BX,TX) - -function clause execute (Xvcvspuxws (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvsxddp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111111000 : -[BX] : -[TX] as instr) = - Xvcvsxddp (T,B,BX,TX) - -function clause execute (Xvcvsxddp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvsxdsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110111000 : -[BX] : -[TX] as instr) = - Xvcvsxdsp (T,B,BX,TX) - -function clause execute (Xvcvsxdsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvsxwdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011111000 : -[BX] : -[TX] as instr) = - Xvcvsxwdp (T,B,BX,TX) - -function clause execute (Xvcvsxwdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvsxwsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010111000 : -[BX] : -[TX] as instr) = - Xvcvsxwsp (T,B,BX,TX) - -function clause execute (Xvcvsxwsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvuxddp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111101000 : -[BX] : -[TX] as instr) = - Xvcvuxddp (T,B,BX,TX) - -function clause execute (Xvcvuxddp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvuxdsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110101000 : -[BX] : -[TX] as instr) = - Xvcvuxdsp (T,B,BX,TX) - -function clause execute (Xvcvuxdsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvuxwdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011101000 : -[BX] : -[TX] as instr) = - Xvcvuxwdp (T,B,BX,TX) - -function clause execute (Xvcvuxwdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvcvuxwsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010101000 : -[BX] : -[TX] as instr) = - Xvcvuxwsp (T,B,BX,TX) - -function clause execute (Xvcvuxwsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvdivdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01111000 : -[AX] : -[BX] : -[TX] as instr) = - Xvdivdp (T,A,B,AX,BX,TX) - -function clause execute (Xvdivdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvdivsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01011000 : -[AX] : -[BX] : -[TX] as instr) = - Xvdivsp (T,A,B,AX,BX,TX) - -function clause execute (Xvdivsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmaddmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01101001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmaddmdp (T,A,B,AX,BX,TX) - -function clause execute (Xvmaddmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmaddadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01100001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmaddadp (T,A,B,AX,BX,TX) - -function clause execute (Xvmaddadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmaddmsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01001001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmaddmsp (T,A,B,AX,BX,TX) - -function clause execute (Xvmaddmsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmaddasp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01000001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmaddasp (T,A,B,AX,BX,TX) - -function clause execute (Xvmaddasp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmaxdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11100000 : -[AX] : -[BX] : -[TX] as instr) = - Xvmaxdp (T,A,B,AX,BX,TX) - -function clause execute (Xvmaxdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmaxsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11000000 : -[AX] : -[BX] : -[TX] as instr) = - Xvmaxsp (T,A,B,AX,BX,TX) - -function clause execute (Xvmaxsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmindp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11101000 : -[AX] : -[BX] : -[TX] as instr) = - Xvmindp (T,A,B,AX,BX,TX) - -function clause execute (Xvmindp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvminsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11001000 : -[AX] : -[BX] : -[TX] as instr) = - Xvminsp (T,A,B,AX,BX,TX) - -function clause execute (Xvminsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmsubmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01111001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmsubmdp (T,A,B,AX,BX,TX) - -function clause execute (Xvmsubmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmsubadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01110001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmsubadp (T,A,B,AX,BX,TX) - -function clause execute (Xvmsubadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmsubmsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01011001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmsubmsp (T,A,B,AX,BX,TX) - -function clause execute (Xvmsubmsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmsubasp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01010001 : -[AX] : -[BX] : -[TX] as instr) = - Xvmsubasp (T,A,B,AX,BX,TX) - -function clause execute (Xvmsubasp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmuldp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01110000 : -[AX] : -[BX] : -[TX] as instr) = - Xvmuldp (T,A,B,AX,BX,TX) - -function clause execute (Xvmuldp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvmulsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01010000 : -[AX] : -[BX] : -[TX] as instr) = - Xvmulsp (T,A,B,AX,BX,TX) - -function clause execute (Xvmulsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvnabsdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111101001 : -[BX] : -[TX] as instr) = - Xvnabsdp (T,B,BX,TX) - -function clause execute (Xvnabsdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvnabssp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110101001 : -[BX] : -[TX] as instr) = - Xvnabssp (T,B,BX,TX) - -function clause execute (Xvnabssp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvnegdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b111111001 : -[BX] : -[TX] as instr) = - Xvnegdp (T,B,BX,TX) - -function clause execute (Xvnegdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvnegsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b110111001 : -[BX] : -[TX] as instr) = - Xvnegsp (T,B,BX,TX) - -function clause execute (Xvnegsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmaddmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11101001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmaddmdp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmaddmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmaddadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11100001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmaddadp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmaddadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmaddmsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11001001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmaddmsp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmaddmsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmaddasp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11000001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmaddasp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmaddasp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmsubmdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11111001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmsubmdp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmsubmdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmsubadp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11110001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmsubadp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmsubadp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmsubmsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11011001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmsubmsp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmsubmsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvnmsubasp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b11010001 : -[AX] : -[BX] : -[TX] as instr) = - Xvnmsubasp (T,A,B,AX,BX,TX) - -function clause execute (Xvnmsubasp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrdpi - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011001001 : -[BX] : -[TX] as instr) = - Xvrdpi (T,B,BX,TX) - -function clause execute (Xvrdpi (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrdpic - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011101011 : -[BX] : -[TX] as instr) = - Xvrdpic (T,B,BX,TX) - -function clause execute (Xvrdpic (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrdpim - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011111001 : -[BX] : -[TX] as instr) = - Xvrdpim (T,B,BX,TX) - -function clause execute (Xvrdpim (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrdpip - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011101001 : -[BX] : -[TX] as instr) = - Xvrdpip (T,B,BX,TX) - -function clause execute (Xvrdpip (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrdpiz - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011011001 : -[BX] : -[TX] as instr) = - Xvrdpiz (T,B,BX,TX) - -function clause execute (Xvrdpiz (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvredp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011011010 : -[BX] : -[TX] as instr) = - Xvredp (T,B,BX,TX) - -function clause execute (Xvredp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvresp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010011010 : -[BX] : -[TX] as instr) = - Xvresp (T,B,BX,TX) - -function clause execute (Xvresp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrspi - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010001001 : -[BX] : -[TX] as instr) = - Xvrspi (T,B,BX,TX) - -function clause execute (Xvrspi (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrspic - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010101011 : -[BX] : -[TX] as instr) = - Xvrspic (T,B,BX,TX) - -function clause execute (Xvrspic (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrspim - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010111001 : -[BX] : -[TX] as instr) = - Xvrspim (T,B,BX,TX) - -function clause execute (Xvrspim (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrspip - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010101001 : -[BX] : -[TX] as instr) = - Xvrspip (T,B,BX,TX) - -function clause execute (Xvrspip (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrspiz - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010011001 : -[BX] : -[TX] as instr) = - Xvrspiz (T,B,BX,TX) - -function clause execute (Xvrspiz (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrsqrtedp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011001010 : -[BX] : -[TX] as instr) = - Xvrsqrtedp (T,B,BX,TX) - -function clause execute (Xvrsqrtedp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvrsqrtesp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010001010 : -[BX] : -[TX] as instr) = - Xvrsqrtesp (T,B,BX,TX) - -function clause execute (Xvrsqrtesp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvsqrtdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b011001011 : -[BX] : -[TX] as instr) = - Xvsqrtdp (T,B,BX,TX) - -function clause execute (Xvsqrtdp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit, bit) Xvsqrtsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) _ : -(bit[5]) B : -0b010001011 : -[BX] : -[TX] as instr) = - Xvsqrtsp (T,B,BX,TX) - -function clause execute (Xvsqrtsp (T, B, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvsubdp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01101000 : -[AX] : -[BX] : -[TX] as instr) = - Xvsubdp (T,A,B,AX,BX,TX) - -function clause execute (Xvsubdp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xvsubsp - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b01001000 : -[AX] : -[BX] : -[TX] as instr) = - Xvsubsp (T,A,B,AX,BX,TX) - -function clause execute (Xvsubsp (T, A, B, AX, BX, TX)) = () - -union ast member (bit[3], bit[5], bit[5], bit, bit) Xvtdivdp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) A : -(bit[5]) B : -0b01111101 : -[AX] : -[BX] : -(bit[1]) _ as instr) = - Xvtdivdp (BF,A,B,AX,BX) - -function clause execute (Xvtdivdp (BF, A, B, AX, BX)) = () - -union ast member (bit[3], bit[5], bit[5], bit, bit) Xvtdivsp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) A : -(bit[5]) B : -0b01011101 : -[AX] : -[BX] : -(bit[1]) _ as instr) = - Xvtdivsp (BF,A,B,AX,BX) - -function clause execute (Xvtdivsp (BF, A, B, AX, BX)) = () - -union ast member (bit[3], bit[5], bit) Xvtsqrtdp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) _ : -(bit[5]) B : -0b011101010 : -[BX] : -(bit[1]) _ as instr) = - Xvtsqrtdp (BF,B,BX) - -function clause execute (Xvtsqrtdp (BF, B, BX)) = () - -union ast member (bit[3], bit[5], bit) Xvtsqrtsp - -function clause decode (0b111100 : -(bit[3]) BF : -(bit[2]) _ : -(bit[5]) _ : -(bit[5]) B : -0b010101010 : -[BX] : -(bit[1]) _ as instr) = - Xvtsqrtsp (BF,B,BX) - -function clause execute (Xvtsqrtsp (BF, B, BX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxland - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10000010 : -[AX] : -[BX] : -[TX] as instr) = - Xxland (T,A,B,AX,BX,TX) - -function clause execute (Xxland (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxlandc - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10001010 : -[AX] : -[BX] : -[TX] as instr) = - Xxlandc (T,A,B,AX,BX,TX) - -function clause execute (Xxlandc (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxlnor - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10100010 : -[AX] : -[BX] : -[TX] as instr) = - Xxlnor (T,A,B,AX,BX,TX) - -function clause execute (Xxlnor (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxlor - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10010010 : -[AX] : -[BX] : -[TX] as instr) = - Xxlor (T,A,B,AX,BX,TX) - -function clause execute (Xxlor (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxlxor - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b10011010 : -[AX] : -[BX] : -[TX] as instr) = - Xxlxor (T,A,B,AX,BX,TX) - -function clause execute (Xxlxor (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxmrghw - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00010010 : -[AX] : -[BX] : -[TX] as instr) = - Xxmrghw (T,A,B,AX,BX,TX) - -function clause execute (Xxmrghw (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit, bit, bit) Xxmrglw - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b00110010 : -[AX] : -[BX] : -[TX] as instr) = - Xxmrglw (T,A,B,AX,BX,TX) - -function clause execute (Xxmrglw (T, A, B, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit, bit, bit) Xxpermdi - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b0 : -(bit[2]) DM : -0b01010 : -[AX] : -[BX] : -[TX] as instr) = - Xxpermdi (T,A,B,DM,AX,BX,TX) - -function clause execute (Xxpermdi (T, A, B, DM, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit[5], bit, bit, bit, bit) Xxsel - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -(bit[5]) C : -0b11 : -[CX] : -[AX] : -[BX] : -[TX] as instr) = - Xxsel (T,A,B,C,CX,AX,BX,TX) - -function clause execute (Xxsel (T, A, B, C, CX, AX, BX, TX)) = () - -union ast member (bit[5], bit[5], bit[5], bit[2], bit, bit, bit) Xxsldwi - -function clause decode (0b111100 : -(bit[5]) T : -(bit[5]) A : -(bit[5]) B : -0b0 : -(bit[2]) SHW : -0b00010 : -[AX] : -[BX] : -[TX] as instr) = - Xxsldwi (T,A,B,SHW,AX,BX,TX) - -function clause execute (Xxsldwi (T, A, B, SHW, AX, BX, TX)) = () - -union ast member (bit[5], bit[2], bit[5], bit, bit) Xxspltw - -function clause decode (0b111100 : -(bit[5]) T : -(bit[3]) _ : -(bit[2]) UIM : -(bit[5]) B : -0b010100100 : -[BX] : -[TX] as instr) = - Xxspltw (T,UIM,B,BX,TX) - -function clause execute (Xxspltw (T, UIM, B, BX, TX)) = () - union ast member (bit[5], bit[5], bit[5], bit) Dlmzb function clause decode (0b011111 : @@ -9948,7 +3756,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001001110 : [Rc] as instr) = - Dlmzb (RS,RA,RB,Rc) + Some(Dlmzb(RS,RA,RB,Rc)) function clause execute (Dlmzb (RS, RA, RB, Rc)) = () @@ -9961,7 +3769,7 @@ function clause decode (0b000100 : [OE] : 0b010101100 : [Rc] as instr) = - Macchw (RT,RA,RB,OE,Rc) + Some(Macchw(RT,RA,RB,OE,Rc)) function clause execute (Macchw (RT, RA, RB, OE, Rc)) = () @@ -9974,7 +3782,7 @@ function clause decode (0b000100 : [OE] : 0b011101100 : [Rc] as instr) = - Macchws (RT,RA,RB,OE,Rc) + Some(Macchws(RT,RA,RB,OE,Rc)) function clause execute (Macchws (RT, RA, RB, OE, Rc)) = () @@ -9987,7 +3795,7 @@ function clause decode (0b000100 : [OE] : 0b010001100 : [Rc] as instr) = - Macchwu (RT,RA,RB,OE,Rc) + Some(Macchwu(RT,RA,RB,OE,Rc)) function clause execute (Macchwu (RT, RA, RB, OE, Rc)) = () @@ -10000,7 +3808,7 @@ function clause decode (0b000100 : [OE] : 0b011001100 : [Rc] as instr) = - Macchwsu (RT,RA,RB,OE,Rc) + Some(Macchwsu(RT,RA,RB,OE,Rc)) function clause execute (Macchwsu (RT, RA, RB, OE, Rc)) = () @@ -10013,7 +3821,7 @@ function clause decode (0b000100 : [OE] : 0b000101100 : [Rc] as instr) = - Machhw (RT,RA,RB,OE,Rc) + Some(Machhw(RT,RA,RB,OE,Rc)) function clause execute (Machhw (RT, RA, RB, OE, Rc)) = () @@ -10026,7 +3834,7 @@ function clause decode (0b000100 : [OE] : 0b001101100 : [Rc] as instr) = - Machhws (RT,RA,RB,OE,Rc) + Some(Machhws(RT,RA,RB,OE,Rc)) function clause execute (Machhws (RT, RA, RB, OE, Rc)) = () @@ -10039,7 +3847,7 @@ function clause decode (0b000100 : [OE] : 0b000001100 : [Rc] as instr) = - Machhwu (RT,RA,RB,OE,Rc) + Some(Machhwu(RT,RA,RB,OE,Rc)) function clause execute (Machhwu (RT, RA, RB, OE, Rc)) = () @@ -10052,7 +3860,7 @@ function clause decode (0b000100 : [OE] : 0b001001100 : [Rc] as instr) = - Machhwsu (RT,RA,RB,OE,Rc) + Some(Machhwsu(RT,RA,RB,OE,Rc)) function clause execute (Machhwsu (RT, RA, RB, OE, Rc)) = () @@ -10065,7 +3873,7 @@ function clause decode (0b000100 : [OE] : 0b110101100 : [Rc] as instr) = - Maclhw (RT,RA,RB,OE,Rc) + Some(Maclhw(RT,RA,RB,OE,Rc)) function clause execute (Maclhw (RT, RA, RB, OE, Rc)) = () @@ -10078,7 +3886,7 @@ function clause decode (0b000100 : [OE] : 0b111101100 : [Rc] as instr) = - Maclhws (RT,RA,RB,OE,Rc) + Some(Maclhws(RT,RA,RB,OE,Rc)) function clause execute (Maclhws (RT, RA, RB, OE, Rc)) = () @@ -10091,7 +3899,7 @@ function clause decode (0b000100 : [OE] : 0b110001100 : [Rc] as instr) = - Maclhwu (RT,RA,RB,OE,Rc) + Some(Maclhwu(RT,RA,RB,OE,Rc)) function clause execute (Maclhwu (RT, RA, RB, OE, Rc)) = () @@ -10104,7 +3912,7 @@ function clause decode (0b000100 : [OE] : 0b111001100 : [Rc] as instr) = - Maclhwsu (RT,RA,RB,OE,Rc) + Some(Maclhwsu(RT,RA,RB,OE,Rc)) function clause execute (Maclhwsu (RT, RA, RB, OE, Rc)) = () @@ -10116,7 +3924,7 @@ function clause decode (0b000100 : (bit[5]) RB : 0b0010101000 : [Rc] as instr) = - Mulchw (RT,RA,RB,Rc) + Some(Mulchw(RT,RA,RB,Rc)) function clause execute (Mulchw (RT, RA, RB, Rc)) = () @@ -10128,7 +3936,7 @@ function clause decode (0b000100 : (bit[5]) RB : 0b0010001000 : [Rc] as instr) = - Mulchwu (RT,RA,RB,Rc) + Some(Mulchwu(RT,RA,RB,Rc)) function clause execute (Mulchwu (RT, RA, RB, Rc)) = () @@ -10140,7 +3948,7 @@ function clause decode (0b000100 : (bit[5]) RB : 0b0000101000 : [Rc] as instr) = - Mulhhw (RT,RA,RB,Rc) + Some(Mulhhw(RT,RA,RB,Rc)) function clause execute (Mulhhw (RT, RA, RB, Rc)) = () @@ -10152,7 +3960,7 @@ function clause decode (0b000100 : (bit[5]) RB : 0b0000001000 : [Rc] as instr) = - Mulhhwu (RT,RA,RB,Rc) + Some(Mulhhwu(RT,RA,RB,Rc)) function clause execute (Mulhhwu (RT, RA, RB, Rc)) = () @@ -10164,7 +3972,7 @@ function clause decode (0b000100 : (bit[5]) RB : 0b0110101000 : [Rc] as instr) = - Mullhw (RT,RA,RB,Rc) + Some(Mullhw(RT,RA,RB,Rc)) function clause execute (Mullhw (RT, RA, RB, Rc)) = () @@ -10176,7 +3984,7 @@ function clause decode (0b000100 : (bit[5]) RB : 0b0110001000 : [Rc] as instr) = - Mullhwu (RT,RA,RB,Rc) + Some(Mullhwu(RT,RA,RB,Rc)) function clause execute (Mullhwu (RT, RA, RB, Rc)) = () @@ -10189,7 +3997,7 @@ function clause decode (0b000100 : [OE] : 0b010101110 : [Rc] as instr) = - Nmacchw (RT,RA,RB,OE,Rc) + Some(Nmacchw(RT,RA,RB,OE,Rc)) function clause execute (Nmacchw (RT, RA, RB, OE, Rc)) = () @@ -10202,7 +4010,7 @@ function clause decode (0b000100 : [OE] : 0b011101110 : [Rc] as instr) = - Nmacchws (RT,RA,RB,OE,Rc) + Some(Nmacchws(RT,RA,RB,OE,Rc)) function clause execute (Nmacchws (RT, RA, RB, OE, Rc)) = () @@ -10215,7 +4023,7 @@ function clause decode (0b000100 : [OE] : 0b000101110 : [Rc] as instr) = - Nmachhw (RT,RA,RB,OE,Rc) + Some(Nmachhw(RT,RA,RB,OE,Rc)) function clause execute (Nmachhw (RT, RA, RB, OE, Rc)) = () @@ -10228,7 +4036,7 @@ function clause decode (0b000100 : [OE] : 0b001101110 : [Rc] as instr) = - Nmachhws (RT,RA,RB,OE,Rc) + Some(Nmachhws(RT,RA,RB,OE,Rc)) function clause execute (Nmachhws (RT, RA, RB, OE, Rc)) = () @@ -10241,7 +4049,7 @@ function clause decode (0b000100 : [OE] : 0b110101110 : [Rc] as instr) = - Nmaclhw (RT,RA,RB,OE,Rc) + Some(Nmaclhw(RT,RA,RB,OE,Rc)) function clause execute (Nmaclhw (RT, RA, RB, OE, Rc)) = () @@ -10254,7 +4062,7 @@ function clause decode (0b000100 : [OE] : 0b111101110 : [Rc] as instr) = - Nmaclhws (RT,RA,RB,OE,Rc) + Some(Nmaclhws(RT,RA,RB,OE,Rc)) function clause execute (Nmaclhws (RT, RA, RB, OE, Rc)) = () @@ -10266,7 +4074,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1111010110 : (bit[1]) _ as instr) = - Icbi (RA,RB) + Some(Icbi(RA,RB)) function clause execute (Icbi (RA, RB)) = () @@ -10279,7 +4087,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000010110 : (bit[1]) _ as instr) = - Icbt (CT,RA,RB) + Some(Icbt(CT,RA,RB)) function clause execute (Icbt (CT, RA, RB)) = () @@ -10291,7 +4099,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1011110110 : (bit[1]) _ as instr) = - Dcba (RA,RB) + Some(Dcba(RA,RB)) function clause execute (Dcba (RA, RB)) = () @@ -10303,7 +4111,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0100010110 : (bit[1]) _ as instr) = - Dcbt (TH,RA,RB) + Some(Dcbt(TH,RA,RB)) function clause execute (Dcbt (TH, RA, RB)) = () @@ -10315,7 +4123,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0011110110 : (bit[1]) _ as instr) = - Dcbtst (TH,RA,RB) + Some(Dcbtst(TH,RA,RB)) function clause execute (Dcbtst (TH, RA, RB)) = () @@ -10327,7 +4135,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1111110110 : (bit[1]) _ as instr) = - Dcbz (RA,RB) + Some(Dcbz(RA,RB)) function clause execute (Dcbz (RA, RB)) = () @@ -10339,7 +4147,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000110110 : (bit[1]) _ as instr) = - Dcbst (RA,RB) + Some(Dcbst(RA,RB)) function clause execute (Dcbst (RA, RB)) = () @@ -10352,7 +4160,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001010110 : (bit[1]) _ as instr) = - Dcbf (L,RA,RB) + Some(Dcbf(L,RA,RB)) function clause execute (Dcbf (L, RA, RB)) = () @@ -10364,9 +4172,9 @@ function clause decode (0b010011 : (bit[5]) _ : 0b0010010110 : (bit[1]) _ as instr) = - Isync () + Some(Isync()) -function clause execute Isync = I_Sync (()) +function clause execute Isync = I_Sync(()) union ast member (bit[5], bit[5], bit[5], bit) Lbarx @@ -10376,7 +4184,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000110100 : [EH] as instr) = - Lbarx (RT,RA,RB,EH) + Some(Lbarx(RT,RA,RB,EH)) function clause execute (Lbarx (RT, RA, RB, EH)) = { @@ -10384,9 +4192,7 @@ function clause execute (Lbarx (RT, RA, RB, EH)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := - 0b00000000000000000000000000000000000000000000000000000000 : - MEMr_reserve (EA,1) + GPR[RT] := 0b00000000000000000000000000000000000000000000000000000000 : MEMr_reserve(EA,1) } union ast member (bit[5], bit[5], bit[5], bit) Lharx @@ -10397,7 +4203,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001110100 : [EH] as instr) = - Lharx (RT,RA,RB,EH) + Some(Lharx(RT,RA,RB,EH)) function clause execute (Lharx (RT, RA, RB, EH)) = { @@ -10405,8 +4211,7 @@ function clause execute (Lharx (RT, RA, RB, EH)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := - 0b000000000000000000000000000000000000000000000000 : MEMr_reserve (EA,2) + GPR[RT] := 0b000000000000000000000000000000000000000000000000 : MEMr_reserve(EA,2) } union ast member (bit[5], bit[5], bit[5], bit) Lwarx @@ -10417,7 +4222,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0000010100 : [EH] as instr) = - Lwarx (RT,RA,RB,EH) + Some(Lwarx(RT,RA,RB,EH)) function clause execute (Lwarx (RT, RA, RB, EH)) = { @@ -10425,7 +4230,7 @@ function clause execute (Lwarx (RT, RA, RB, EH)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := 0b00000000000000000000000000000000 : MEMr_reserve (EA,4) + GPR[RT] := 0b00000000000000000000000000000000 : MEMr_reserve(EA,4) } union ast member (bit[5], bit[5], bit[5]) Stbcx @@ -10436,7 +4241,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1010110110 : 0b1 as instr) = - Stbcx (RS,RA,RB) + Some(Stbcx(RS,RA,RB)) function clause execute (Stbcx (RS, RA, RB)) = () @@ -10448,7 +4253,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b1011010110 : 0b1 as instr) = - Sthcx (RS,RA,RB) + Some(Sthcx(RS,RA,RB)) function clause execute (Sthcx (RS, RA, RB)) = () @@ -10460,7 +4265,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0010010110 : 0b1 as instr) = - Stwcx (RS,RA,RB) + Some(Stwcx(RS,RA,RB)) function clause execute (Stwcx (RS, RA, RB)) = () @@ -10472,7 +4277,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0001010100 : [EH] as instr) = - Ldarx (RT,RA,RB,EH) + Some(Ldarx(RT,RA,RB,EH)) function clause execute (Ldarx (RT, RA, RB, EH)) = { @@ -10480,7 +4285,7 @@ function clause execute (Ldarx (RT, RA, RB, EH)) = (bit[64]) EA := 0; if RA == 0 then b := 0 else b := GPR[RA]; EA := b + GPR[RB]; - GPR[RT] := MEMr_reserve (EA,8) + GPR[RT] := MEMr_reserve(EA,8) } union ast member (bit[5], bit[5], bit[5]) Stdcx @@ -10491,7 +4296,7 @@ function clause decode (0b011111 : (bit[5]) RB : 0b0011010110 : 0b1 as instr) = - Stdcx (RS,RA,RB) + Some(Stdcx(RS,RA,RB)) function clause execute (Stdcx (RS, RA, RB)) = () @@ -10504,10 +4309,10 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1001010110 : (bit[1]) _ as instr) = - Sync (L) + Some(Sync(L)) function clause execute (Sync (L)) = - switch L { case 0b00 -> { H_Sync (()) } case 0b01 -> { LW_Sync (()) } } + switch L { case 0b00 -> { H_Sync(()) } case 0b01 -> { LW_Sync(()) } } union ast member Eieio @@ -10517,9 +4322,9 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1101010110 : (bit[1]) _ as instr) = - Eieio () + Some(Eieio()) -function clause execute Eieio = EIEIO_Sync (()) +function clause execute Eieio = EIEIO_Sync(()) union ast member (bit[5]) Mbar @@ -10529,7 +4334,7 @@ function clause decode (0b011111 : (bit[5]) _ : 0b1101010110 : (bit[1]) _ as instr) = - Mbar (MO) + Some(Mbar(MO)) function clause execute (Mbar (MO)) = () @@ -10542,26 +4347,26 @@ function clause decode (0b011111 : (bit[5]) _ : 0b0000111110 : (bit[1]) _ as instr) = - Wait (WC) + Some(Wait(WC)) function clause execute (Wait (WC)) = () typedef decode_failure = enumerate { no_matching_pattern; unsupported_instruction; illegal_instruction } -function clause decode _ = exit no_matching_pattern +function clause decode _ = None end decode end execute end ast -val ast -> ast effect pure supported_instructions -function ast supported_instructions ((ast) instr) = { +val ast -> option<ast> effect pure supported_instructions +function option<ast> supported_instructions ((ast) instr) = { switch instr { - case (Mbar(_)) -> exit unsupported_instruction - case (Sync(0b10)) -> exit unsupported_instruction - case (Sync(0b11)) -> exit unsupported_instruction - case _ -> instr + case (Mbar(_)) -> None + case (Sync(0b10)) -> None + case (Sync(0b11)) -> None + case _ -> Some(instr) } } @@ -10604,8 +4409,9 @@ function bit illegal_instructions_pred ((ast) instr) = { let ((bit[5]) upper_bound) = (RT + ceil) in (RT <= RA & RA <= upper_bound) | (RT <= RB & RB <= upper_bound) | - (RT == RA) | (RT == RB)*) - case (Lfsu(FRT,RA,D)) -> (RA == 0) + (RT == RA) | (RT == RB)*) +(*Floating point instructions*) +(* case (Lfsu(FRT,RA,D)) -> (RA == 0) case (Lfsux(FRT,RA,RB)) -> (RA == 0) case (Lfdu(FRT,RA,D)) -> (RA == 0) case (Lfdux(FRT,RA,RB)) -> (RA == 0) @@ -10616,7 +4422,7 @@ function bit illegal_instructions_pred ((ast) instr) = { case (Lfdp(FRTp,RA,DS)) -> (FRTp mod 2 == 1) case (Stfdp(FRSp,RA,DS)) -> (FRSp mod 2 == 1) case (Lfdpx(FRTp,RA,RB)) -> (FRTp mod 2 == 1) - case (Stfdpx(FRSp,RA,RB)) -> (FRSp mod 2 == 1) + case (Stfdpx(FRSp,RA,RB)) -> (FRSp mod 2 == 1)*) case (Lq(RTp,RA,DQ,Pt)) -> ((RTp mod 2 ==1) | RTp == RA) case (Stq(RSp,RA,RS)) -> (RSp mod 2 == 1) case (Mtspr(RS, spr)) -> @@ -10641,16 +4447,16 @@ function bit illegal_instructions_pred ((ast) instr) = { } } -val ast -> ast effect pure illegal_instructions -function ast illegal_instructions ((ast) instr) = - if (illegal_instructions_pred ((ast) instr)) - then exit illegal_instruction else instr +val ast -> option<ast> effect pure illegal_instructions +function option<ast> illegal_instructions instr = + if (illegal_instructions_pred (instr)) + then None else Some(instr) -(* fetch-decode-execute *) -function unit fde () = { +(* old fetch-decode-execute *) +(*function unit fde () = { NIA := CIA + 4; instr := decode(MEMr(CIA, 4)); instr := supported_instructions(instr); execute(instr); CIA := NIA; -} +}*) |
