diff options
author | Björn Gustavsson <[email protected]> | 2019-03-11 13:15:02 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-03-20 16:19:30 +0100 |
commit | 4e0430638635083c199f81375a6c14f2ffb726fb (patch) | |
tree | feaa70c8e46e8a82469ff10a237c336b905d4437 /lib/hipe/icode | |
parent | 0ffc8346553a5fc9322a75d4d8be5417dad67f29 (diff) | |
download | otp-4e0430638635083c199f81375a6c14f2ffb726fb.tar.gz otp-4e0430638635083c199f81375a6c14f2ffb726fb.tar.bz2 otp-4e0430638635083c199f81375a6c14f2ffb726fb.zip |
HiPE: Don't fail the compilation for unimplemented instructions
Diffstat (limited to 'lib/hipe/icode')
-rw-r--r-- | lib/hipe/icode/hipe_beam_to_icode.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl index ffe81ef9b8..8e7e56b6c4 100644 --- a/lib/hipe/icode/hipe_beam_to_icode.erl +++ b/lib/hipe/icode/hipe_beam_to_icode.erl @@ -1189,6 +1189,21 @@ trans_fun([raw_raise|Instructions], Env) -> [hipe_icode:mk_primop(Dst,raw_raise,Vars) | trans_fun(Instructions, Env)]; %%-------------------------------------------------------------------- +%% New binary matching added in OTP 22. +%%-------------------------------------------------------------------- +%%--- bs_get_tail --- +trans_fun([{bs_get_tail=Name,_,_,_}|_Instructions], _Env) -> + nyi(Name); +%%--- bs_start_match3 --- +trans_fun([{bs_start_match3=Name,_,_,_,_}|_Instructions], _Env) -> + nyi(Name); +%%--- bs_get_position --- +trans_fun([{bs_get_position=Name,_,_,_}|_Instructions], _Env) -> + nyi(Name); +%%--- bs_set_position --- +trans_fun([{bs_set_position=Name,_,_}|_Instructions], _Env) -> + nyi(Name); +%%-------------------------------------------------------------------- %%--- ERROR HANDLING --- %%-------------------------------------------------------------------- trans_fun([X|_], _) -> @@ -1196,6 +1211,9 @@ trans_fun([X|_], _) -> trans_fun([], _) -> []. +nyi(Name) -> + throw({unimplemented_instruction,Name}). + %%-------------------------------------------------------------------- %% trans_call and trans_enter generate correct Icode calls/tail-calls, %% recognizing explicit fails. |