Commit graph

13 commits

Author SHA1 Message Date
Dhruv Maroo
87f889efa7 Fix conversion of 80-bit floats
* Add a new unit test for the same
2024-02-17 15:46:11 +08:00
Dhruv Maroo
70fb3be17f 80-bit float initialization works now
* Added a test in `test_float.c` for it
    * It is kind of unfortunate to deal with the idiosyncrasy of 80-bit
      float this way. There are cleaner ways, but they would require
      more refactor, and are probably not worth it since we wouldn't be
      modifying the float code that often.
2024-02-17 15:46:11 +08:00
Anton Kochkov
8e4faa3906
Remove scr.rainbow option (#4199)
* Remove scr.rainbow option
* Update librz/util/float/float.c
2024-02-10 12:02:50 +08:00
Heersin
803aa3951e
ARMv7 NEON and VFP for rzil (#3528)
* Export float basic op to op_builder header

* Basic vmov with note and question

* Add vmov for immediate

* Add vmov for NEON and VFP

* Add vmsr, vmrs. shared instruction of vfp and neon done

* Add vector logical operations for arm32 il

* Add vmvn for arm32 il

* Solve op builder for rzil float

* Add vector compare instructions (vceq/vcge/vcle/vcgt/vclt, and abs version)

* Rename vcmp to vec_cmp to avoid conflict with VCMP instruction

* Add vtst of NEON instruction set

* Fix FEQ

* Discard unecessary changes

* Add vldn for multiple n-elements

* Add vldn for single-lane and all-lane

* Add vstn

* Add vcvt for float-integer and float-float

* Check codeql warning

* Add vdup

* Fix according to reviewer

* Add vext

* Add vzip

* Fix reg_bits shadowing

* Add vuzp

* Init some eff as EMPTY for loop-seq

* Add vswap

* Add vadd and vsub

* Add vmul for float point in vfp

* Fix test_validate_forder

* Fix reg binding by add missing reg(fpscr)

* Fix memory broken caused by misuse of REG_VAL and others

* Add vldr and vstr

* Fix some bug in rzil float

* Fix a format typo bug in rzfloat

* Add rzil emulateme test for vfp

* Fix fpscr in db arm32 related tests

* Add extra argument info in vfp test

* Remove duplicated macro of float
2023-07-09 00:43:18 +08:00
Giovanni
105bc0ed50
Revert "Add float to raw bitvector conversion. (#3509)" (#3517)
This reverts commit 74c044ad63.
2023-05-20 15:39:31 +08:00
Giovanni
74c044ad63
Add float to raw bitvector conversion. (#3509) 2023-05-14 13:14:11 +08:00
Heersin
b2ace2664c
Add macroses to generate Inf/NaN for different types (#3373)
* Add macros to generate inf/nan for different types
* Move header dependency to rz_float and multiple renames
2023-02-19 20:55:23 +08:00
Heersin
2b748567fa
Add fbasic theory to rzil using rz_util/float (#3184)
* Fbasic dev build test

* Add fbasic structure and enums

* Add fbasic op new

* Add fbasic op dup

* Add fbasic op free

* Add partial theory of float

* Add fbasic handlers to pure table default

* Add fbasic stringfy

* Add temporary float functions

* Add rz-float value and evaluation

* Add float json dump functions, todo add mode info in il_opdmp_* functions and compelete il_resolve_pure

* Complete fbasic il in il_export

* Fix detected error in compilation

* Add doxygen for il/definition/float

* Pack float_round function

* Add new version of rounding

* Add cast and convert, todo add 'float_get_sign' and 'float_get_no_bias_exp'

* Add comments and fix new version rounding

* Add util float functions

* Implement theory fbasic : cast, convert and round

* Remove bv_one warning

* Move basic functions into rz_util from definition/float

* Add two basic test cmp and extra format test

* Add test to fsucc, fpred and fneg

* Add round significant test case 1 and fix bug to pass it

* Test round significant and bug fixes

* Add 6 types test cases to round_and_pack function

* Finish round significant and round_pack test with bug fixes and signature changes

* Leave fround as unimplement now

* Pass all test to cast and convert

* Add SPDX header

* Add SPDX header

* Add round to integral float with test and bug fixes

* Add more tests to cast_sint and bug fixes

* Fix mem leak in cast_sfloat

* Replace the deprecated rounding method, fix bugs and pass tests

* Resolve some reviewed issues

* Fix most memleak and bug found

* Remove deprecated round_bv

* Remove unused functions to eliminate warnings

* Fix typo in comments

* Uncommented implmented operations

* Add test cases and bug fixes for fbasic theory in rzil

* Fix ret type of new_bitv_from_* from Bool to BitVector

* Add new float op from f32 and f64
2023-02-15 18:18:40 +08:00
wargio
bf6d162909 Implement float80 and RzFloat to decimal string 2022-11-01 10:58:16 +08:00
Giovanni
4bd9d19473
RzFloat: Fix endianness conversion (#3079) 2022-10-09 08:05:20 +08:00
wargio
19beda6c66 Refactor softfloat error messages. 2022-09-16 21:55:58 +08:00
wargio
8f40517990 Refactor rz_float_new_from_utXX_as_fXX 2022-09-16 21:55:58 +08:00
Heersin
b13202b934
RzUtil: softfloat support based on bitvector (#2784) 2022-09-14 14:38:22 +02:00