aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/latent_entropy_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gcc-plugins/latent_entropy_plugin.c')
-rw-r--r--scripts/gcc-plugins/latent_entropy_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gcc-plugins/latent_entropy_plugin.c b/scripts/gcc-plugins/latent_entropy_plugin.c
index 12541126575b..8ff203ad4809 100644
--- a/scripts/gcc-plugins/latent_entropy_plugin.c
+++ b/scripts/gcc-plugins/latent_entropy_plugin.c
@@ -328,9 +328,9 @@ static enum tree_code get_op(tree *rhs)
328 op = LROTATE_EXPR; 328 op = LROTATE_EXPR;
329 /* 329 /*
330 * This code limits the value of random_const to 330 * This code limits the value of random_const to
331 * the size of a wide int for the rotation 331 * the size of a long for the rotation
332 */ 332 */
333 random_const &= HOST_BITS_PER_WIDE_INT - 1; 333 random_const %= TYPE_PRECISION(long_unsigned_type_node);
334 break; 334 break;
335 } 335 }
336 336