Skip to content

Commit a33c825

Browse files
dtigCommit Bot
authored andcommitted
[wasm-simd] Remove PrefetchTemporal and PrefetchNonTemporal operations
Removing prefetch operations as per the vote in the github issue: WebAssembly/simd#352 Bug:v8:11168 Change-Id: Ia72684e68ce886f8f26a7d3b5bea601be416dfab Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2771758 Reviewed-by: Jakob Kummerow <[email protected]> Reviewed-by: Maya Lekova <[email protected]> Reviewed-by: Zhi An Ng <[email protected]> Commit-Queue: Deepti Gandluri <[email protected]> Cr-Commit-Position: refs/heads/master@{#73578}
1 parent c1b2c87 commit a33c825

35 files changed

+9
-451
lines changed

src/codegen/arm64/assembler-arm64.cc

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,37 +1429,6 @@ void Assembler::stlxrh(const Register& rs, const Register& rt,
14291429
Emit(STLXR_h | Rs(rs) | Rt2(x31) | RnSP(rn) | Rt(rt));
14301430
}
14311431

1432-
void Assembler::prfm(int prfop, const MemOperand& addr) {
1433-
// Restricted support for prfm, only register offset.
1434-
// This can probably be merged with Assembler::LoadStore as we expand support.
1435-
DCHECK(addr.IsRegisterOffset());
1436-
DCHECK(is_uint5(prfop));
1437-
Instr memop = PRFM | prfop | RnSP(addr.base());
1438-
1439-
Extend ext = addr.extend();
1440-
Shift shift = addr.shift();
1441-
unsigned shift_amount = addr.shift_amount();
1442-
1443-
// LSL is encoded in the option field as UXTX.
1444-
if (shift == LSL) {
1445-
ext = UXTX;
1446-
}
1447-
1448-
// Shifts are encoded in one bit, indicating a left shift by the memory
1449-
// access size.
1450-
DCHECK((shift_amount == 0) ||
1451-
(shift_amount == static_cast<unsigned>(CalcLSDataSize(PRFM))));
1452-
1453-
Emit(LoadStoreRegisterOffsetFixed | memop | Rm(addr.regoffset()) |
1454-
ExtendMode(ext) | ImmShiftLS((shift_amount > 0) ? 1 : 0));
1455-
}
1456-
1457-
void Assembler::prfm(PrefetchOperation prfop, const MemOperand& addr) {
1458-
// Restricted support for prfm, only register offset.
1459-
// This can probably be merged with Assembler::LoadStore as we expand support.
1460-
prfm(static_cast<int>(prfop), addr);
1461-
}
1462-
14631432
void Assembler::NEON3DifferentL(const VRegister& vd, const VRegister& vn,
14641433
const VRegister& vm, NEON3DifferentOp vop) {
14651434
DCHECK(AreSameFormat(vn, vm));

src/codegen/arm64/assembler-arm64.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,6 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
880880
// Store-release exclusive half-word.
881881
void stlxrh(const Register& rs, const Register& rt, const Register& rn);
882882

883-
void prfm(int prfop, const MemOperand& addr);
884-
void prfm(PrefetchOperation prfop, const MemOperand& addr);
885-
886883
// Move instructions. The default shift of -1 indicates that the move
887884
// instruction will calculate an appropriate 16-bit immediate and left shift
888885
// that is equal to the 64-bit immediate argument. If an explicit left shift

src/codegen/arm64/constants-arm64.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ using float16 = uint16_t;
159159
/* store second source. */ \
160160
V_(Rs, 20, 16, Bits) /* Store-exclusive status */ \
161161
V_(PrefetchMode, 4, 0, Bits) \
162-
V_(PrefetchHint, 4, 3, Bits) \
163-
V_(PrefetchTarget, 2, 1, Bits) \
164-
V_(PrefetchStream, 0, 0, Bits) \
165162
\
166163
/* Common bits */ \
167164
V_(SixtyFourBits, 31, 31, Bits) \
@@ -219,7 +216,6 @@ using float16 = uint16_t;
219216
V_(LSOpc, 23, 22, Bits) \
220217
V_(LSVector, 26, 26, Bits) \
221218
V_(LSSize, 31, 30, Bits) \
222-
V_(ImmPrefetchOperation, 4, 0, Bits) \
223219
\
224220
/* NEON generic fields */ \
225221
V_(NEONQ, 30, 30, Bits) \
@@ -447,27 +443,6 @@ enum SystemRegister {
447443
ImmSystemRegister_offset
448444
};
449445

450-
enum PrefetchOperation {
451-
PLDL1KEEP = 0x00,
452-
PLDL1STRM = 0x01,
453-
PLDL2KEEP = 0x02,
454-
PLDL2STRM = 0x03,
455-
PLDL3KEEP = 0x04,
456-
PLDL3STRM = 0x05,
457-
PLIL1KEEP = 0x08,
458-
PLIL1STRM = 0x09,
459-
PLIL2KEEP = 0x0a,
460-
PLIL2STRM = 0x0b,
461-
PLIL3KEEP = 0x0c,
462-
PLIL3STRM = 0x0d,
463-
PSTL1KEEP = 0x10,
464-
PSTL1STRM = 0x11,
465-
PSTL2KEEP = 0x12,
466-
PSTL2STRM = 0x13,
467-
PSTL3KEEP = 0x14,
468-
PSTL3STRM = 0x15,
469-
};
470-
471446
// Instruction enumerations.
472447
//
473448
// These are the masks that define a class of instructions, and the list of

src/codegen/x64/assembler-x64.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,16 +1202,6 @@ void Assembler::cpuid() {
12021202
emit(0xA2);
12031203
}
12041204

1205-
void Assembler::prefetch(Operand src, int level) {
1206-
DCHECK(is_uint2(level));
1207-
EnsureSpace ensure_space(this);
1208-
emit(0x0F);
1209-
emit(0x18);
1210-
// Emit hint number in Reg position of RegR/M.
1211-
XMMRegister code = XMMRegister::from_code(level);
1212-
emit_sse_operand(code, src);
1213-
}
1214-
12151205
void Assembler::cqo() {
12161206
EnsureSpace ensure_space(this);
12171207
emit_rex_64();

src/codegen/x64/assembler-x64.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,6 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
786786
void ret(int imm16);
787787
void ud2();
788788
void setcc(Condition cc, Register reg);
789-
void prefetch(Operand src, int level);
790789

791790
void pblendw(XMMRegister dst, Operand src, uint8_t mask);
792791
void pblendw(XMMRegister dst, XMMRegister src, uint8_t mask);

src/compiler/backend/arm64/code-generator-arm64.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,10 +1501,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
15011501
}
15021502
break;
15031503
}
1504-
case kArm64Prfm: {
1505-
__ prfm(MiscField::decode(opcode), i.MemoryOperand(0));
1506-
break;
1507-
}
15081504
case kArm64Clz:
15091505
__ Clz(i.OutputRegister64(), i.InputRegister64(0));
15101506
break;

src/compiler/backend/arm64/instruction-codes-arm64.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ namespace compiler {
9393
V(Arm64Poke) \
9494
V(Arm64PokePair) \
9595
V(Arm64Peek) \
96-
V(Arm64Prfm) \
9796
V(Arm64Float32Cmp) \
9897
V(Arm64Float32Add) \
9998
V(Arm64Float32Sub) \

src/compiler/backend/arm64/instruction-scheduler-arm64.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ int InstructionScheduler::GetTargetInstructionFlags(
391391
case kArm64StrCompressTagged:
392392
case kArm64DmbIsh:
393393
case kArm64DsbIsb:
394-
case kArm64Prfm:
395394
case kArm64StoreLane:
396395
return kHasSideEffect;
397396

src/compiler/backend/arm64/instruction-selector-arm64.cc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -622,26 +622,6 @@ void EmitLoad(InstructionSelector* selector, Node* node, InstructionCode opcode,
622622
selector->Emit(opcode, arraysize(outputs), outputs, input_count, inputs);
623623
}
624624

625-
void InstructionSelector::VisitPrefetchTemporal(Node* node) {
626-
Arm64OperandGenerator g(this);
627-
InstructionOperand inputs[2] = {g.UseRegister(node->InputAt(0)),
628-
g.UseRegister(node->InputAt(1))};
629-
InstructionCode opcode = kArm64Prfm;
630-
opcode |= AddressingModeField::encode(kMode_MRR);
631-
opcode |= MiscField::encode(PLDL1KEEP);
632-
Emit(opcode, 0, nullptr, 2, inputs);
633-
}
634-
635-
void InstructionSelector::VisitPrefetchNonTemporal(Node* node) {
636-
Arm64OperandGenerator g(this);
637-
InstructionOperand inputs[2] = {g.UseRegister(node->InputAt(0)),
638-
g.UseRegister(node->InputAt(1))};
639-
InstructionCode opcode = kArm64Prfm;
640-
opcode |= AddressingModeField::encode(kMode_MRR);
641-
opcode |= MiscField::encode(PLDL1STRM);
642-
Emit(opcode, 0, nullptr, 2, inputs);
643-
}
644-
645625
namespace {
646626
// Manually add base and index into a register to get the actual address.
647627
// This should be used prior to instructions that only support

src/compiler/backend/ia32/code-generator-ia32.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4067,12 +4067,6 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
40674067
ASSEMBLE_SIMD_ALL_TRUE(pcmpeqb);
40684068
break;
40694069
}
4070-
case kIA32Prefetch:
4071-
__ prefetch(i.MemoryOperand(), 1);
4072-
break;
4073-
case kIA32PrefetchNta:
4074-
__ prefetch(i.MemoryOperand(), 0);
4075-
break;
40764070
case kIA32Word32AtomicPairLoad: {
40774071
XMMRegister tmp = i.ToDoubleRegister(instr->TempAt(0));
40784072
__ movq(tmp, i.MemoryOperand());

0 commit comments

Comments
 (0)