diff options
author | Björn Gustavsson <[email protected]> | 2010-11-11 13:49:32 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-01-17 15:23:40 +0100 |
commit | 21cd0c4f8654286ce8b14157529fcfc916fc209e (patch) | |
tree | 935f25fc42a89afab0abe82145ba5959614bf91a /erts/emulator/test/beam_SUITE.erl | |
parent | 30f8eebe7b74a978de7acdb889b5d9e7a6f19ef9 (diff) | |
download | otp-21cd0c4f8654286ce8b14157529fcfc916fc209e.tar.gz otp-21cd0c4f8654286ce8b14157529fcfc916fc209e.tar.bz2 otp-21cd0c4f8654286ce8b14157529fcfc916fc209e.zip |
Eliminate the special instructions for selecting floats and bignums
Diffstat (limited to 'erts/emulator/test/beam_SUITE.erl')
-rw-r--r-- | erts/emulator/test/beam_SUITE.erl | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/erts/emulator/test/beam_SUITE.erl b/erts/emulator/test/beam_SUITE.erl index 228ff15341..32ac07cb2d 100644 --- a/erts/emulator/test/beam_SUITE.erl +++ b/erts/emulator/test/beam_SUITE.erl @@ -20,7 +20,8 @@ -module(beam_SUITE). -export([all/1, packed_registers/1, apply_last/1, apply_last_bif/1, - buildo_mucho/1, heap_sizes/1, big_lists/1, fconv/1]). + buildo_mucho/1, heap_sizes/1, big_lists/1, fconv/1, + select_val/1]). -export([applied/2]). @@ -28,7 +29,7 @@ all(suite) -> [packed_registers, apply_last, apply_last_bif, buildo_mucho, - heap_sizes, big_lists]. + heap_sizes, big_lists, select_val]. %% Verify that apply(M, F, A) is really tail recursive. @@ -302,3 +303,19 @@ do_fconv(nil, Float) when is_float(Float) -> Float + []; do_fconv(tuple_literal, Float) when is_float(Float) -> Float + {a,b}. + +select_val(Config) when is_list(Config) -> + ?line zero = do_select_val(0), + ?line big = do_select_val(1 bsl 64), + ?line integer = do_select_val(42), + ok. + +do_select_val(X) -> + case X of + 0 -> + zero; + 1 bsl 64 -> + big; + Int when is_integer(Int) -> + integer + end. |