Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java @ 14065:5dec26f3d4a4
Use LIR instead of LIRGenerator as parameter in emitCode.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 05 Mar 2014 11:24:42 +0100 |
parents | d1c1f103d42c |
children | 4eac66a9b87d |
comparison
equal
deleted
inserted
replaced
14064:fe8d6e12c75e | 14065:5dec26f3d4a4 |
---|---|
223 crb.setFrameSize(frameMap.frameSize()); | 223 crb.setFrameSize(frameMap.frameSize()); |
224 return crb; | 224 return crb; |
225 } | 225 } |
226 | 226 |
227 @Override | 227 @Override |
228 public void emitCode(CompilationResultBuilder crb, LIRGenerator lirGen, ResolvedJavaMethod method) { | 228 public void emitCode(CompilationResultBuilder crb, LIR lir, ResolvedJavaMethod method) { |
229 assert method != null : lirGen.getGraph() + " is not associated with a method"; | 229 assert method != null : lir + " is not associated with a method"; |
230 // Emit the prologue. | 230 // Emit the prologue. |
231 Assembler asm = crb.asm; | 231 Assembler asm = crb.asm; |
232 asm.emitString0("version 0:95: $full : $large;"); | 232 asm.emitString0("version 0:95: $full : $large;"); |
233 asm.emitString(""); | 233 asm.emitString(""); |
234 | 234 |
382 } else { | 382 } else { |
383 asm.emitString("ld_global_u64 " + iterationObjArgReg + ", " + "[" + tmpReg + "]" + "; // Load from array element into parameter reg"); | 383 asm.emitString("ld_global_u64 " + iterationObjArgReg + ", " + "[" + tmpReg + "]" + "; // Load from array element into parameter reg"); |
384 } | 384 } |
385 } | 385 } |
386 // Prologue done, Emit code for the LIR. | 386 // Prologue done, Emit code for the LIR. |
387 crb.emit(lirGen.lir); | 387 crb.emit(lir); |
388 // Now that code is emitted go back and figure out what the upper Bound stack size was. | 388 // Now that code is emitted go back and figure out what the upper Bound stack size was. |
389 long maxStackSize = ((HSAILAssembler) crb.asm).upperBoundStackSize(); | 389 long maxStackSize = ((HSAILAssembler) crb.asm).upperBoundStackSize(); |
390 String spillsegStringFinal; | 390 String spillsegStringFinal; |
391 if (maxStackSize == 0) { | 391 if (maxStackSize == 0) { |
392 // If no spilling, get rid of spillseg declaration. | 392 // If no spilling, get rid of spillseg declaration. |