Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.max.asm/src/com/oracle/max/asm/NumUtil.java @ 4525:681e969888a7
Separate LIR and new register allocator into separate projects
author | Christian Wimmer <Christian.Wimmer@Oracle.com> |
---|---|
date | Wed, 08 Feb 2012 19:25:29 -0800 |
parents | e233f5660da4 |
children |
comparison
equal
deleted
inserted
replaced
4524:dcc8f5c6f394 | 4525:681e969888a7 |
---|---|
96 | 96 |
97 public static short safeToShort(int v) { | 97 public static short safeToShort(int v) { |
98 assert isShort(v); | 98 assert isShort(v); |
99 return (short) v; | 99 return (short) v; |
100 } | 100 } |
101 | |
102 public static int roundUp(int number, int mod) { | |
103 return ((number + mod - 1) / mod) * mod; | |
104 } | |
101 } | 105 } |