| Index: src/compiler/ia32/code-generator-ia32.cc
|
| diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc
|
| index 586d5488e906c6c3777b8b2704b974671c32c205..aaa34dcfd66f3dcc58fc70edc50f044651074dbf 100644
|
| --- a/src/compiler/ia32/code-generator-ia32.cc
|
| +++ b/src/compiler/ia32/code-generator-ia32.cc
|
| @@ -480,7 +480,6 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| break;
|
| case kSSEFloat32Abs: {
|
| // TODO(bmeurer): Use 128-bit constants.
|
| - // TODO(turbofan): Add AVX version with relaxed register constraints.
|
| __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| __ psrlq(kScratchDoubleReg, 33);
|
| __ andps(i.OutputDoubleRegister(), kScratchDoubleReg);
|
| @@ -488,7 +487,6 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| }
|
| case kSSEFloat32Neg: {
|
| // TODO(bmeurer): Use 128-bit constants.
|
| - // TODO(turbofan): Add AVX version with relaxed register constraints.
|
| __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| __ psllq(kScratchDoubleReg, 31);
|
| __ xorps(i.OutputDoubleRegister(), kScratchDoubleReg);
|
| @@ -542,7 +540,6 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| }
|
| case kSSEFloat64Abs: {
|
| // TODO(bmeurer): Use 128-bit constants.
|
| - // TODO(turbofan): Add AVX version with relaxed register constraints.
|
| __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| __ psrlq(kScratchDoubleReg, 1);
|
| __ andpd(i.OutputDoubleRegister(), kScratchDoubleReg);
|
| @@ -550,7 +547,6 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| }
|
| case kSSEFloat64Neg: {
|
| // TODO(bmeurer): Use 128-bit constants.
|
| - // TODO(turbofan): Add AVX version with relaxed register constraints.
|
| __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| __ psllq(kScratchDoubleReg, 63);
|
| __ xorpd(i.OutputDoubleRegister(), kScratchDoubleReg);
|
| @@ -683,6 +679,38 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| i.InputOperand(1));
|
| break;
|
| }
|
| + case kAVXFloat32Abs: {
|
| + // TODO(bmeurer): Use RIP relative 128-bit constants.
|
| + __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| + __ psrlq(kScratchDoubleReg, 33);
|
| + CpuFeatureScope avx_scope(masm(), AVX);
|
| + __ vandps(i.OutputDoubleRegister(), kScratchDoubleReg, i.InputOperand(0));
|
| + break;
|
| + }
|
| + case kAVXFloat32Neg: {
|
| + // TODO(bmeurer): Use RIP relative 128-bit constants.
|
| + __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| + __ psllq(kScratchDoubleReg, 31);
|
| + CpuFeatureScope avx_scope(masm(), AVX);
|
| + __ vxorps(i.OutputDoubleRegister(), kScratchDoubleReg, i.InputOperand(0));
|
| + break;
|
| + }
|
| + case kAVXFloat64Abs: {
|
| + // TODO(bmeurer): Use RIP relative 128-bit constants.
|
| + __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| + __ psrlq(kScratchDoubleReg, 1);
|
| + CpuFeatureScope avx_scope(masm(), AVX);
|
| + __ vandpd(i.OutputDoubleRegister(), kScratchDoubleReg, i.InputOperand(0));
|
| + break;
|
| + }
|
| + case kAVXFloat64Neg: {
|
| + // TODO(bmeurer): Use RIP relative 128-bit constants.
|
| + __ pcmpeqd(kScratchDoubleReg, kScratchDoubleReg);
|
| + __ psllq(kScratchDoubleReg, 63);
|
| + CpuFeatureScope avx_scope(masm(), AVX);
|
| + __ vxorpd(i.OutputDoubleRegister(), kScratchDoubleReg, i.InputOperand(0));
|
| + break;
|
| + }
|
| case kIA32Movsxbl:
|
| __ movsx_b(i.OutputRegister(), i.MemoryOperand());
|
| break;
|
|
|