summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Kerneis2014-03-13 17:40:10 +0000
committerGabriel Kerneis2014-03-13 17:40:10 +0000
commitaa733ed518e6fc4ebc901465eee4afb5d4ddeb34 (patch)
tree15ab555df85256649aa7d1daa60099d18f83a421 /src
parent2a6a69df9575c7b704e53606385bd43bbad5ec12 (diff)
Make test_power compiling again
Diffstat (limited to 'src')
-rw-r--r--src/test/power.sail6
-rw-r--r--src/type_internal.ml4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/power.sail b/src/test/power.sail
index fc90c654..ba7d76c7 100644
--- a/src/test/power.sail
+++ b/src/test/power.sail
@@ -62,8 +62,8 @@ scattered function ast decode
{
if mode64bit then M := 0 else M := 32 ;
if ( ~ ( (( BO )[ 2 ]) )) then CTR := ( CTR - 1 ) ;
- ctr_ok := ( (( BO )[ 2 ]) || ( ( (( CTR )[ M .. 63 ]) != 0 ) ^ (( BO )[ 3 ]) ) ) ;
- cond_ok := ( (( BO )[ 0 ]) || ( (( CR )[ ( BI + 32 ) ]) ^ ( ~ ( (( BO )[ 1 ]) )) ) ) ;
+ ctr_ok := ( (( BO )[ 2 ]) | ( ( (( CTR )[ 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 ) ;
if LK then LR := ( CIA + 4 ) ;
}
@@ -87,7 +87,7 @@ scattered function ast decode
OR ( instr[11..15] (* RA *), instr[16..20] (* RB *), instr[6..10] (* RS *), instr[31] (* Rc *) )
function clause execute ( OR ( RA, RB, RS, Rc ) ) =
- GPR[ RA ] := ( (GPR[ RS ]) || (GPR[ RB ]) )
+ GPR[ RA ] := ( (GPR[ RS ]) | (GPR[ RB ]) )
union ast member bit [ 15 ] (* D *) * bit [ 4 ] (* RA *) * bit [ 4 ] (* RS *) StoreWord
diff --git a/src/type_internal.ml b/src/type_internal.ml
index 6f4b746f..13c20e9f 100644
--- a/src/type_internal.ml
+++ b/src/type_internal.ml
@@ -213,9 +213,9 @@ let initial_typ_env =
("to_vec_inc",Some(([("a",{k=K_Typ})],{t= Tfn (nat_typ,{t=Tvar "a"},pure_e)}),External None,[],pure_e));
("to_vec_dec",Some(([("a",{k=K_Typ})],{t= Tfn (nat_typ,{t=Tvar "a"},pure_e)}),External None,[],pure_e));
("==",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},bit_t,pure_e)}),External (Some "eq"),[],pure_e));
- ("neq",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},bit_t,pure_e)}),External (Some "neq"),[],pure_e));
+ ("!=",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},bit_t,pure_e)}),External (Some "neq"),[],pure_e));
("is_one",Some(([],{t= Tfn (bit_t,bool_t,pure_e)}),External (Some "is_one"),[],pure_e));
- ("~",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},{t=Tvar "a"},pure_e)}),External (Some "bitwise_not"),[],pure_e));
+ ("~",Some((["a",{k=K_Typ}],{t= Tfn ({t=Tvar "a"},{t=Tvar "a"},pure_e)}),External (Some "bitwise_not"),[],pure_e));
("|",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},{t=Tvar "a"},pure_e)}),External (Some "bitwise_or"),[],pure_e));
("^",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},{t=Tvar "a"},pure_e)}),External (Some "bitwise_xor"),[],pure_e));
("&",Some((["a",{k=K_Typ}],{t= Tfn ({t=Ttup([{t=Tvar "a"};{t=Tvar "a"}])},{t=Tvar "a"},pure_e)}),External (Some "bitwise_and"),[],pure_e));