Request For Review (XS), 7077806, ARM: java.lang.InternalError: bound subword value does not fit into the subword type (original) (raw)
Bertrand Delsart bertrand.delsart at oracle.com
Wed Sep 14 04:13:35 PDT 2011
- Previous message: hg: hsx/hotspot-comp/hotspot: 7057978: improve robustness of c1 ARM back-end wrt non encodable constants
- Next message: Request For Review (XS), 7077806, ARM: java.lang.InternalError: bound subword value does not fit into the subword type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Small shared fix for a bug in JSR292 ports:
http://cr.openjdk.java.net/~bdelsart/7077806/webrev.00/
Error comes form the fact that shifting by values higher than the number of bits is undefined in standard C and C++: "The integer promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined."
On SPARC and x86, the high bits were ignored and the code was behaving as expected.
On ARM, this is not the case. The shifts were actually resulting in 0.
Ensuring that the shift is a legal C value solves the problem.
Bertrand.
-- Bertrand Delsart, bertrand.delsart at oracle.com, Sun-Oracle France, 180 av. de l'Europe, ZIRST de Montbonnot, 38334 Saint Ismier, FRANCE
- Previous message: hg: hsx/hotspot-comp/hotspot: 7057978: improve robustness of c1 ARM back-end wrt non encodable constants
- Next message: Request For Review (XS), 7077806, ARM: java.lang.InternalError: bound subword value does not fit into the subword type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list