Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/target/amd64/AMD64MathIntrinsicOp.java @ 5506:56860d3f9f39
More refactorings and renamings in preparation of ci/ri split.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 07 Jun 2012 18:12:01 +0200 |
parents | e808627bd16f |
children | dc71b06d09f8 |
comparison
equal
deleted
inserted
replaced
5505:28af6dff047f | 5506:56860d3f9f39 |
---|---|
25 import static com.oracle.max.cri.ci.CiValueUtil.*; | 25 import static com.oracle.max.cri.ci.CiValueUtil.*; |
26 | 26 |
27 import java.util.*; | 27 import java.util.*; |
28 | 28 |
29 import com.oracle.max.asm.target.amd64.*; | 29 import com.oracle.max.asm.target.amd64.*; |
30 import com.oracle.max.cri.ci.*; | 30 import com.oracle.max.cri.ri.*; |
31 import com.oracle.graal.graph.*; | 31 import com.oracle.graal.graph.*; |
32 import com.oracle.graal.lir.*; | 32 import com.oracle.graal.lir.*; |
33 import com.oracle.graal.lir.amd64.*; | 33 import com.oracle.graal.lir.amd64.*; |
34 import com.oracle.graal.lir.asm.*; | 34 import com.oracle.graal.lir.asm.*; |
35 | 35 |
38 SQRT, | 38 SQRT, |
39 SIN, COS, TAN, | 39 SIN, COS, TAN, |
40 LOG, LOG10; | 40 LOG, LOG10; |
41 } | 41 } |
42 | 42 |
43 public AMD64MathIntrinsicOp(Opcode opcode, CiValue result, CiValue input) { | 43 public AMD64MathIntrinsicOp(Opcode opcode, RiValue result, RiValue input) { |
44 super(opcode, new CiValue[] {result}, null, new CiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); | 44 super(opcode, new RiValue[] {result}, null, new RiValue[] {input}, LIRInstruction.NO_OPERANDS, LIRInstruction.NO_OPERANDS); |
45 } | 45 } |
46 | 46 |
47 @Override | 47 @Override |
48 public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { | 48 public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler masm) { |
49 Opcode opcode = (Opcode) code; | 49 Opcode opcode = (Opcode) code; |
50 CiValue result = output(0); | 50 RiValue result = output(0); |
51 CiValue input = input(0); | 51 RiValue input = input(0); |
52 | 52 |
53 switch (opcode) { | 53 switch (opcode) { |
54 case SQRT: masm.sqrtsd(asDoubleReg(result), asDoubleReg(input)); break; | 54 case SQRT: masm.sqrtsd(asDoubleReg(result), asDoubleReg(input)); break; |
55 case LOG: masm.flog(asDoubleReg(result), asDoubleReg(input), false); break; | 55 case LOG: masm.flog(asDoubleReg(result), asDoubleReg(input), false); break; |
56 case LOG10: masm.flog(asDoubleReg(result), asDoubleReg(input), true); break; | 56 case LOG10: masm.flog(asDoubleReg(result), asDoubleReg(input), true); break; |