Add DBGLOC fate op

This commit is contained in:
Gaith Hallak 2022-12-06 17:25:27 +03:00
parent 2a0a397afa
commit da64e6ce51
3 changed files with 7 additions and 0 deletions

View File

@ -143,6 +143,8 @@
-define( 'RETURN', 16#f3).
-define( 'DELEGATECALL', 16#f4).
-define( 'DBGLOC', 16#b1).
-define( 'STATICCALL', 16#fa).
-define( 'REVERT', 16#fd).

View File

@ -242,6 +242,8 @@ ops_defs() ->
, { 'BSL', 16#af, false, true, true, ?GAS(10), [a, a, a], bin_sl, {integer, integer}, integer, "Arg0 := Arg1 << Arg2"}
, { 'BSR', 16#b0, false, true, true, ?GAS(10), [a, a, a], bin_sr, {integer, integer}, integer, "Arg0 := Arg1 >> Arg2"}
, { 'DBGLOC', 16#b1, false, true, true, ?GAS(0), [a, a, a], dbgloc, {string, integer, integer}, none, "Arg" }
, { 'DEACTIVATE', 16#fa, false, true, true, ?GAS(10), [], deactivate, {}, none, "Mark the current contract for deactivation."}
, { 'ABORT', 16#fb, true, true, true, ?GAS(10), [a], abort, {string}, none, "Abort execution (dont use all gas) with error message in Arg0."}
, { 'EXIT', 16#fc, true, true, true, ?GAS(10), [a], exit, {string}, none, "Abort execution (use upp all gas) with error message in Arg0."}

View File

@ -162,6 +162,7 @@ opcode(?DELEGATECALL) -> ?DELEGATECALL;
opcode(?STATICCALL) -> ?STATICCALL; %% TODO
opcode(?REVERT) -> ?REVERT;
opcode({comment,X}) -> ?COMMENT(X);
opcode(?DBGLOC) -> ?DBGLOC;
opcode(?SUICIDE) -> ?SUICIDE.
@ -303,6 +304,7 @@ mnemonic(?DELEGATECALL) -> 'DELEGATECALL' ;
mnemonic(?STATICCALL) -> 'STATICCALL' ;
mnemonic(?REVERT) -> 'REVERT' ;
mnemonic({comment,_}) -> 'COMMENT' ;
mnemonic(?DBGLOC) -> 'DBGLOC' ;
mnemonic(?SUICIDE) -> 'SUICIDE' .
@ -446,6 +448,7 @@ m_to_op('STATICCALL') -> ?STATICCALL ;
m_to_op('REVERT') -> ?REVERT ;
m_to_op('COMMENT') -> ?COMMENT("") ;
m_to_op('SUICIDE') -> ?SUICIDE ;
m_to_op('DBGLOC') -> ?DBGLOC ;
m_to_op(Data) when 0=<Data, Data=<255
-> Data .