Mesa (master): intel/compiler: avoid truncating int64_t to int

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 26 17:46:38 UTC 2019


Module: Mesa
Branch: master
Commit: e16fadd545d82e7dac5b5cd57144d2459618adc9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e16fadd545d82e7dac5b5cd57144d2459618adc9

Author: Maya Rashish <maya at netbsd.org>
Date:   Thu Sep 26 17:14:34 2019 +0300

intel/compiler: avoid truncating int64_t to int

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Maya Rashish <maya at netbsd.org>

---

 src/intel/compiler/brw_fs_combine_constants.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_fs_combine_constants.cpp b/src/intel/compiler/brw_fs_combine_constants.cpp
index 0fff87820e1..182c24b5558 100644
--- a/src/intel/compiler/brw_fs_combine_constants.cpp
+++ b/src/intel/compiler/brw_fs_combine_constants.cpp
@@ -232,7 +232,7 @@ get_constant_value(const struct gen_device_info *devinfo,
       break;
    }
    case BRW_REGISTER_TYPE_Q: {
-      int64_t val = !can_do_source_mods ? src->d64 : abs(src->d64);
+      int64_t val = !can_do_source_mods ? src->d64 : llabs(src->d64);
       memcpy(out, &val, 8);
       break;
    }




More information about the mesa-commit mailing list