diff options
author | Zandra <[email protected]> | 2016-02-02 11:24:51 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2016-02-02 11:24:51 +0100 |
commit | 61ef7511c5ffae0b061d7cc45e9d564b02b891db (patch) | |
tree | a658adcfc0006d1a79f4bc36ce5f6efc8ccceedf /erts/emulator/hipe/hipe_native_bif.c | |
parent | 7cb403e4aa044fd2cc7702dbe8e2d0eea68e81f3 (diff) | |
parent | 34380bad4985bc827866129597e0bea940e076f4 (diff) | |
download | otp-61ef7511c5ffae0b061d7cc45e9d564b02b891db.tar.gz otp-61ef7511c5ffae0b061d7cc45e9d564b02b891db.tar.bz2 otp-61ef7511c5ffae0b061d7cc45e9d564b02b891db.zip |
Merge branch 'margnus1/bs_unit_fix' into maint
* margnus1/bs_unit_fix:
hipe: Fix signed compares of unsigned sizes
beam: Fix overflow bug in i_bs_add_jId
hipe: Add tests for bad bit syntax float sizes
Add a case testing the handling of guards involving binaries
Add some more binary syntax construction tests
hipe: Guard against enormous numbers in ranges
hipe: Fix constructing huge binaries
hipe: Fix binary constructions failing with badarith
Add missing corner-case to bs_construct_SUITE
hipe: Allow unsigned args in hipe_rtl_arith
hipe: test unit size match in bs_put_binary_all
hipe: test unit size match in bs_append
Fix hipe_rtl_binary_construct:floorlog2/1
OTP-13272
Diffstat (limited to 'erts/emulator/hipe/hipe_native_bif.c')
-rw-r--r-- | erts/emulator/hipe/hipe_native_bif.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_native_bif.c b/erts/emulator/hipe/hipe_native_bif.c index 688378b2fe..119b0b0895 100644 --- a/erts/emulator/hipe/hipe_native_bif.c +++ b/erts/emulator/hipe/hipe_native_bif.c @@ -504,6 +504,18 @@ int hipe_bs_validate_unicode_retract(ErlBinMatchBuffer* mb, Eterm arg) return 1; } +BIF_RETTYPE hipe_is_divisible(BIF_ALIST_2) +{ + /* Arguments are Eterm-sized unsigned integers */ + Uint dividend = BIF_ARG_1; + Uint divisor = BIF_ARG_2; + if (dividend % divisor) { + BIF_ERROR(BIF_P, BADARG); + } else { + return NIL; + } +} + /* This is like the loop_rec_fr BEAM instruction */ Eterm hipe_check_get_msg(Process *c_p) |