Mercurial > hg > graal-compiler
comparison graal/GraalCompiler/src/com/sun/c1x/target/amd64/AMD64LIRGenerator.java @ 2541:0f9eeb15e636
More Value.Flag clean up.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 20:58:01 +0200 |
parents | 2f271a85d104 |
children | 3558ca7088c0 |
comparison
equal
deleted
inserted
replaced
2540:3fc322165071 | 2541:0f9eeb15e636 |
---|---|
195 | 195 |
196 public void visitArithmeticOpLong(ArithmeticOp x) { | 196 public void visitArithmeticOpLong(ArithmeticOp x) { |
197 int opcode = x.opcode; | 197 int opcode = x.opcode; |
198 if (opcode == Bytecodes.LDIV || opcode == Bytecodes.LREM) { | 198 if (opcode == Bytecodes.LDIV || opcode == Bytecodes.LREM) { |
199 // emit inline 64-bit code | 199 // emit inline 64-bit code |
200 LIRDebugInfo info = x.needsZeroCheck() ? stateFor(x) : null; | 200 LIRDebugInfo info = stateFor(x); |
201 CiValue dividend = force(x.x(), RAX_L); // dividend must be in RAX | 201 CiValue dividend = force(x.x(), RAX_L); // dividend must be in RAX |
202 CiValue divisor = load(x.y()); // divisor can be in any (other) register | 202 CiValue divisor = load(x.y()); // divisor can be in any (other) register |
203 | 203 |
204 CiValue result = createResultVariable(x); | 204 CiValue result = createResultVariable(x); |
205 CiValue resultReg; | 205 CiValue resultReg; |
243 | 243 |
244 // Call 'stateFor' before 'force()' because 'stateFor()' may | 244 // Call 'stateFor' before 'force()' because 'stateFor()' may |
245 // force the evaluation of other instructions that are needed for | 245 // force the evaluation of other instructions that are needed for |
246 // correct debug info. Otherwise the live range of the fixed | 246 // correct debug info. Otherwise the live range of the fixed |
247 // register might be too long. | 247 // register might be too long. |
248 LIRDebugInfo info = x.needsZeroCheck() ? stateFor(x) : null; | 248 LIRDebugInfo info = stateFor(x); |
249 | 249 |
250 CiValue dividend = force(x.x(), RAX_I); // dividend must be in RAX | 250 CiValue dividend = force(x.x(), RAX_I); // dividend must be in RAX |
251 CiValue divisor = load(x.y()); // divisor can be in any (other) register | 251 CiValue divisor = load(x.y()); // divisor can be in any (other) register |
252 | 252 |
253 // idiv and irem use rdx in their implementation so the | 253 // idiv and irem use rdx in their implementation so the |
317 public void visitArithmeticOpWord(ArithmeticOp x) { | 317 public void visitArithmeticOpWord(ArithmeticOp x) { |
318 int opcode = x.opcode; | 318 int opcode = x.opcode; |
319 if (opcode == Bytecodes.WDIV || opcode == Bytecodes.WREM || opcode == Bytecodes.WDIVI || opcode == Bytecodes.WREMI) { | 319 if (opcode == Bytecodes.WDIV || opcode == Bytecodes.WREM || opcode == Bytecodes.WDIVI || opcode == Bytecodes.WREMI) { |
320 // emit code for long division or modulus | 320 // emit code for long division or modulus |
321 // emit inline 64-bit code | 321 // emit inline 64-bit code |
322 LIRDebugInfo info = x.needsZeroCheck() ? stateFor(x) : null; | 322 LIRDebugInfo info = stateFor(x); |
323 CiValue dividend = force(x.x(), RAX_L); // dividend must be in RAX | 323 CiValue dividend = force(x.x(), RAX_L); // dividend must be in RAX |
324 CiValue divisor = load(x.y()); // divisor can be in any (other) register | 324 CiValue divisor = load(x.y()); // divisor can be in any (other) register |
325 | 325 |
326 CiValue result = createResultVariable(x); | 326 CiValue result = createResultVariable(x); |
327 CiValue resultReg; | 327 CiValue resultReg; |