Skip to content

Commit 0585e7d

Browse files
committed
Add CRYPT primop range and ECVERIVY primp
1 parent 99bf097 commit 0585e7d

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

include/aeb_opcodes.hrl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,5 @@
179179
-define(PRIM_CALL_MAP_SIZE, 304).
180180
-define(PRIM_CALL_MAP_TOLIST, 305).
181181

182+
-define(PRIM_CALL_IN_CRYPTO_RANGE(__TTYPE__), (((__TTYPE__) > 399) andalso ((__TTYPE__) < 500))).
183+
-define(PRIM_CALL_CRYPTO_ECVERIFY, 400).

src/aeb_primops.erl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414

1515
-include("aeb_opcodes.hrl").
1616

17-
is_local_primop_op(Op) when ?PRIM_CALL_IN_MAP_RANGE(Op) -> true;
18-
is_local_primop_op(Op) when is_integer(Op) -> false.
17+
is_local_primop_op(Op) when ?PRIM_CALL_IN_MAP_RANGE(Op) -> true;
18+
is_local_primop_op(Op) when ?PRIM_CALL_IN_CRYPTO_RANGE(Op) -> true;
19+
is_local_primop_op(Op) when is_integer(Op) -> false.
1920

2021
op_needs_type_check(Op) ->
2122
(not is_local_primop_op(Op)) andalso op_has_dynamic_type(Op).

0 commit comments

Comments
 (0)