[PATCH] [compiler-rt][builtins][MIPS] Add test-cases for mips16 wrappers for float arithmetic, comparison & conversion

Faraz Shahbazker Faraz.Shahbazker at imgtec.com
Thu Jul 10 02:39:03 PDT 2014


Hi samsonov,

This patch adds unit test cases for mips16 wrappers for floating-point arithmetic, comparison and type-conversion operations.

Background: mips16 code is not aware of floating point registers and call-conventions. For platforms that support floating point operations, mips16 code resorts to calling an appropriate low-level wrapper function with the float arguments in general purpose registers. The low-level function copies the arguments to FP registers, performs the operation and returns the result to the caller in a GP register. For some operations, test results are compared either against pre-calculated reference output, while for others, the corresponding soft-float implementation is used as reference.

Test cases are provided for the following wrappers:
Arithmetic(single & double precision): add, sub, mul, div 
Comparison(single & double precision): eq, ne, gt, ge, lt, le, unord
Type conversions:
  To signed integer: fix_truncXfsi
  To float: floatunsiXf, floatsiXf
  Within float formats: truncdfsf, extendsfdf

http://reviews.llvm.org/D4453

Files:
  test/builtins/Unit/mips/mips16_cmpdf2_test.c
  test/builtins/Unit/mips/mips16_cmpsf2_test.c
  test/builtins/Unit/mips/mips16_extendsfdf2_test.c
  test/builtins/Unit/mips/mips16_fix_truncdfsi_test.c
  test/builtins/Unit/mips/mips16_fix_truncsfsi_test.c
  test/builtins/Unit/mips/mips16_floatdf_test.c
  test/builtins/Unit/mips/mips16_floatsf_test.c
  test/builtins/Unit/mips/mips16_opdf3_test.c
  test/builtins/Unit/mips/mips16_opsf3_test.c
  test/builtins/Unit/mips/mips16_truncdfsf2_test.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4453.11251.patch
Type: text/x-patch
Size: 151211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140710/969b8586/attachment.bin>


More information about the llvm-commits mailing list