aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-08-16 09:52:54 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-23 07:46:40 +0200
commitc6d4716f71de8de9683464b677207304583dc2a0 (patch)
tree9b49d056f48ae59fe666f75fe47aa8492090e0a3 /validation
parentd0694a238744b642714e7cd226193dd1365176d0 (diff)
downloadsparse-dev-c6d4716f71de8de9683464b677207304583dc2a0.tar.gz
cast: specialize FPCAST into [USF]CVTF
Currently, all casts to a floating point type use OP_FPCAST. This is maybe simple but rather uncovenient as it correspond to several quite different operations that later need extra checks. Change this by directly using different instructions for the different cases: - FCVTF for float-float conversions - UCVTF for unsigned integer to floats - SCVTF for signed integer to floats and reject attempts to cast a pointer to a float. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/linear/cast-kinds.c20
-rw-r--r--validation/optim/fpcast-constant.c2
2 files changed, 11 insertions, 11 deletions
diff --git a/validation/linear/cast-kinds.c b/validation/linear/cast-kinds.c
index e686c01e..d8ac5d34 100644
--- a/validation/linear/cast-kinds.c
+++ b/validation/linear/cast-kinds.c
@@ -320,70 +320,70 @@ vptr_2_iptr:
int_2_float:
.L76:
<entry-point>
- fpcast.32 %r116 <- (32) %arg1
+ scvtf.32 %r116 <- (32) %arg1
ret.32 %r116
uint_2_float:
.L78:
<entry-point>
- fpcast.32 %r119 <- (32) %arg1
+ ucvtf.32 %r119 <- (32) %arg1
ret.32 %r119
long_2_float:
.L80:
<entry-point>
- fpcast.32 %r122 <- (64) %arg1
+ scvtf.32 %r122 <- (64) %arg1
ret.32 %r122
ulong_2_float:
.L82:
<entry-point>
- fpcast.32 %r125 <- (64) %arg1
+ ucvtf.32 %r125 <- (64) %arg1
ret.32 %r125
double_2_float:
.L84:
<entry-point>
- fpcast.32 %r128 <- (64) %arg1
+ fcvtf.32 %r128 <- (64) %arg1
ret.32 %r128
int_2_double:
.L86:
<entry-point>
- fpcast.64 %r131 <- (32) %arg1
+ scvtf.64 %r131 <- (32) %arg1
ret.64 %r131
uint_2_double:
.L88:
<entry-point>
- fpcast.64 %r134 <- (32) %arg1
+ ucvtf.64 %r134 <- (32) %arg1
ret.64 %r134
long_2_double:
.L90:
<entry-point>
- fpcast.64 %r137 <- (64) %arg1
+ scvtf.64 %r137 <- (64) %arg1
ret.64 %r137
ulong_2_double:
.L92:
<entry-point>
- fpcast.64 %r140 <- (64) %arg1
+ ucvtf.64 %r140 <- (64) %arg1
ret.64 %r140
float_2_double:
.L94:
<entry-point>
- fpcast.64 %r143 <- (32) %arg1
+ fcvtf.64 %r143 <- (32) %arg1
ret.64 %r143
diff --git a/validation/optim/fpcast-constant.c b/validation/optim/fpcast-constant.c
index c0f906b3..49355d00 100644
--- a/validation/optim/fpcast-constant.c
+++ b/validation/optim/fpcast-constant.c
@@ -8,6 +8,6 @@ static double foo(double a, int p)
* check-command: test-linearize $file
*
* check-output-ignore
- * check-output-contains: fpcast\\.
+ * check-output-contains: scvtf\\.
* check-output-excludes: fmul\\..*\\$2
*/