diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-08-14 15:55:46 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-23 07:46:40 +0200 |
| commit | dc4117c69ef98d2e79de1fab18ea0ba9d1496344 (patch) | |
| tree | c27eba2819576ac4878a1c92672cc79b62407c76 /validation/linear | |
| parent | 52856c815a191b73530557133bd44ec478f3fece (diff) | |
| download | sparse-dev-dc4117c69ef98d2e79de1fab18ea0ba9d1496344.tar.gz | |
cast: specialize casts from unsigned to pointers
Currently all casts to pointers are processed alike.
This is simple but rather unconvenient as it correspond to
different operations that obeys to different rules and
which later need extra checks.
Change this by using a specific instructions (OP_UTPTR) for
unsigned integer to pointers.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/linear')
| -rw-r--r-- | validation/linear/cast-kinds.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/validation/linear/cast-kinds.c b/validation/linear/cast-kinds.c index d07a9419..4449d0af 100644 --- a/validation/linear/cast-kinds.c +++ b/validation/linear/cast-kinds.c @@ -55,7 +55,7 @@ static double double_2_double(double a) { return a; } /* * check-name: cast-kinds - * check-command: test-linearize -m64 $file + * check-command: test-linearize -Wno-int-to-pointer-cast -m64 $file * * check-output-start uint_2_int: @@ -288,28 +288,28 @@ iptr_2_vptr: int_2_iptr: .L66: <entry-point> - ptrcast.64 %r101 <- (32) %arg1 + utptr.64 %r101 <- (32) %arg1 ret.64 %r101 uint_2_iptr: .L68: <entry-point> - ptrcast.64 %r104 <- (32) %arg1 + utptr.64 %r104 <- (32) %arg1 ret.64 %r104 long_2_iptr: .L70: <entry-point> - ptrcast.64 %r107 <- (64) %arg1 + utptr.64 %r107 <- (64) %arg1 ret.64 %r107 ulong_2_iptr: .L72: <entry-point> - ptrcast.64 %r110 <- (64) %arg1 + utptr.64 %r110 <- (64) %arg1 ret.64 %r110 |
