diff options
author | Jerry Ge <jerry.ge@arm.com> | 2023-03-06 13:07:36 -0800 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-03-17 18:47:04 +0000 |
commit | cf305dbb7f3e3be7c4e6c71174e1183eb489ec03 (patch) | |
tree | a542921c739be36ff3133a20017e500b5405cb91 /reference_model/src/arith_util.h | |
parent | 2eb3d63318c139eda94775730878c6c2168ac148 (diff) | |
download | reference_model-cf305dbb7f3e3be7c4e6c71174e1183eb489ec03.tar.gz |
Refactor 1L to INT64_C()
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: If3f8c5a1f2dffac36448101959557f86b6ab6c7f
Diffstat (limited to 'reference_model/src/arith_util.h')
-rw-r--r-- | reference_model/src/arith_util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/reference_model/src/arith_util.h b/reference_model/src/arith_util.h index 9c84a03..59bdf44 100644 --- a/reference_model/src/arith_util.h +++ b/reference_model/src/arith_util.h @@ -1,5 +1,5 @@ -// Copyright (c) 2020, ARM Limited. +// Copyright (c) 2020-2023, ARM Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -105,7 +105,7 @@ inline size_t _count_leading_ones(T val) #define DIV_CEIL(a, b) ((a) % (b) ? ((a) / (b) + 1) : ((a) / (b))) // Returns a mask of 1's of this size -#define ONES_MASK(SIZE) ((uint64_t)((SIZE) >= 64 ? 0xffffffffffffffffULL : ((uint64_t)(1) << (SIZE)) - 1)) +#define ONES_MASK(SIZE) ((uint64_t)((SIZE) >= 64 ? UINT64_C(0xffffffffffffffff) : (UINT64_C(1) << (SIZE)) - 1)) // Returns a field of bits from HIGH_BIT to LOW_BIT, right-shifted // include both side, equivalent VAL[LOW_BIT:HIGH_BIT] in verilog |