File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/src/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64 Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3434import static org .graalvm .compiler .asm .amd64 .AMD64Assembler .AMD64MOp .MUL ;
3535import static org .graalvm .compiler .lir .LIRInstruction .OperandFlag .ILLEGAL ;
3636import static org .graalvm .compiler .lir .LIRInstruction .OperandFlag .REG ;
37- import static org .graalvm .compiler .lir .LIRInstruction .OperandFlag .STACK ;
3837
3938import org .graalvm .compiler .asm .amd64 .AMD64Address ;
4039import org .graalvm .compiler .asm .amd64 .AMD64Assembler .AMD64MOp ;
@@ -66,7 +65,12 @@ public class AMD64MulDivOp extends AMD64LIRInstruction {
6665 @ Use ({REG , ILLEGAL }) protected AllocatableValue highX ;
6766 @ Use ({REG }) protected AllocatableValue lowX ;
6867
69- @ Use ({REG , STACK }) protected AllocatableValue y ;
68+ // Even though an idiv instruction can use a memory address for its
69+ // second operand, HotSpot on Windows does not recognize this form of
70+ // instruction when handling the special case of MININT/-1:
71+ // https://github.com/openjdk/jdk/blob/4b0e656bb6a823f50507039df7855183ab98cd83/src/hotspot/os/windows/os_windows.cpp#L2397
72+ // As such, force the operand to be in a register.
73+ @ Use ({REG }) protected AllocatableValue y ;
7074
7175 @ State protected LIRFrameState state ;
7276
You can’t perform that action at this time.
0 commit comments