Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java @ 18526:be44c1ca8f00
removed static access to HotSpotGraalRuntime from some AMD64 HotSpot classes
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 26 Nov 2014 12:05:56 +0100 |
parents | ca81508f2a19 |
children | 99ee1fa4d446 |
comparison
equal
deleted
inserted
replaced
18525:c538c2c6b7e2 | 18526:be44c1ca8f00 |
---|---|
23 package com.oracle.graal.hotspot.amd64; | 23 package com.oracle.graal.hotspot.amd64; |
24 | 24 |
25 import static com.oracle.graal.amd64.AMD64.*; | 25 import static com.oracle.graal.amd64.AMD64.*; |
26 import static com.oracle.graal.api.code.ValueUtil.*; | 26 import static com.oracle.graal.api.code.ValueUtil.*; |
27 import static com.oracle.graal.hotspot.HotSpotBackend.*; | 27 import static com.oracle.graal.hotspot.HotSpotBackend.*; |
28 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*; | 28 //import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*; |
29 | 29 |
30 import java.util.*; | 30 import java.util.*; |
31 | 31 |
32 import com.oracle.graal.amd64.*; | 32 import com.oracle.graal.amd64.*; |
33 import com.oracle.graal.api.code.*; | 33 import com.oracle.graal.api.code.*; |
164 emitMove(operand, input); | 164 emitMove(operand, input); |
165 } | 165 } |
166 if (pollOnReturnScratchRegister == null) { | 166 if (pollOnReturnScratchRegister == null) { |
167 pollOnReturnScratchRegister = findPollOnReturnScratchRegister(); | 167 pollOnReturnScratchRegister = findPollOnReturnScratchRegister(); |
168 } | 168 } |
169 append(new AMD64HotSpotReturnOp(operand, getStub() != null, pollOnReturnScratchRegister)); | 169 append(new AMD64HotSpotReturnOp(operand, getStub() != null, pollOnReturnScratchRegister, config)); |
170 } | 170 } |
171 | 171 |
172 @Override | 172 @Override |
173 public boolean needOnlyOopMaps() { | 173 public boolean needOnlyOopMaps() { |
174 // Stubs only need oop maps | 174 // Stubs only need oop maps |
385 emitMove(exceptionParameter, exception); | 385 emitMove(exceptionParameter, exception); |
386 append(new AMD64HotSpotUnwindOp(exceptionParameter)); | 386 append(new AMD64HotSpotUnwindOp(exceptionParameter)); |
387 } | 387 } |
388 | 388 |
389 private void moveDeoptValuesToThread(Value actionAndReason, Value speculation) { | 389 private void moveDeoptValuesToThread(Value actionAndReason, Value speculation) { |
390 moveValueToThread(actionAndReason, runtime().getConfig().pendingDeoptimizationOffset); | 390 moveValueToThread(actionAndReason, config.pendingDeoptimizationOffset); |
391 moveValueToThread(speculation, runtime().getConfig().pendingFailedSpeculationOffset); | 391 moveValueToThread(speculation, config.pendingFailedSpeculationOffset); |
392 } | 392 } |
393 | 393 |
394 private void moveValueToThread(Value v, int offset) { | 394 private void moveValueToThread(Value v, int offset) { |
395 LIRKind wordKind = LIRKind.value(getProviders().getCodeCache().getTarget().wordKind); | 395 LIRKind wordKind = LIRKind.value(getProviders().getCodeCache().getTarget().wordKind); |
396 RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind); | 396 RegisterValue thread = getProviders().getRegisters().getThreadRegister().asValue(wordKind); |
436 public void emitPushInterpreterFrame(Value frameSize, Value framePc, Value senderSp, Value initialInfo) { | 436 public void emitPushInterpreterFrame(Value frameSize, Value framePc, Value senderSp, Value initialInfo) { |
437 Variable frameSizeVariable = load(frameSize); | 437 Variable frameSizeVariable = load(frameSize); |
438 Variable framePcVariable = load(framePc); | 438 Variable framePcVariable = load(framePc); |
439 Variable senderSpVariable = load(senderSp); | 439 Variable senderSpVariable = load(senderSp); |
440 Variable initialInfoVariable = load(initialInfo); | 440 Variable initialInfoVariable = load(initialInfo); |
441 append(new AMD64HotSpotPushInterpreterFrameOp(frameSizeVariable, framePcVariable, senderSpVariable, initialInfoVariable)); | 441 append(new AMD64HotSpotPushInterpreterFrameOp(frameSizeVariable, framePcVariable, senderSpVariable, initialInfoVariable, config)); |
442 } | 442 } |
443 | 443 |
444 @Override | 444 @Override |
445 public Variable emitLoad(LIRKind kind, Value address, LIRFrameState state) { | 445 public Variable emitLoad(LIRKind kind, Value address, LIRFrameState state) { |
446 AMD64AddressValue loadAddress = asAddressValue(address); | 446 AMD64AddressValue loadAddress = asAddressValue(address); |