[PATCH] [compiler-rt][builtins][MIPS] Add mips16 wrappers for float arithmetic, comparison and conversion
Faraz Shahbazker
Faraz.Shahbazker at imgtec.com
Thu Jul 10 02:51:30 PDT 2014
Hi howard.hinnant,
This patch adds 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 equipped with hardware floating point, mips16 code resorts to calling an appropriate libgcc 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.
Operations provided in this patch are:
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
Patch for unit tests is: http://reviews.llvm.org/D4453
http://reviews.llvm.org/D4454
Files:
lib/builtins/CMakeLists.txt
lib/builtins/mips/mips16_cmpdf2.c
lib/builtins/mips/mips16_cmpsf2.c
lib/builtins/mips/mips16_extendsfdf2.c
lib/builtins/mips/mips16_fix_truncdfsi.c
lib/builtins/mips/mips16_fix_truncsfsi.c
lib/builtins/mips/mips16_floatdf.c
lib/builtins/mips/mips16_floatsf.c
lib/builtins/mips/mips16_gen.h
lib/builtins/mips/mips16_opdf3.c
lib/builtins/mips/mips16_opsf3.c
lib/builtins/mips/mips16_truncdfsf2.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4454.11253.patch
Type: text/x-patch
Size: 15352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140710/ed596d79/attachment.bin>
More information about the llvm-commits
mailing list