Commit 5aea9c39 authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC: [wasm-simd] Add debug info the simd instructions:

- vspltb
- vspltw
- vsplth


Change-Id: I76d42f301c10ff357a6b34825a3f6790b83758f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2173243Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#67482}
parent 6bbcdc3d
...@@ -2593,7 +2593,8 @@ enum Opcode : uint32_t { ...@@ -2593,7 +2593,8 @@ enum Opcode : uint32_t {
opcode_name = opcode_value, opcode_name = opcode_value,
PPC_OPCODE_LIST(DECLARE_INSTRUCTION) PPC_OPCODE_LIST(DECLARE_INSTRUCTION)
#undef DECLARE_INSTRUCTION #undef DECLARE_INSTRUCTION
EXT1 = 0x4C000000, // Extended code set 1 EXT0 = 0x10000000, // Extended code set 0
EXT1 = 0x4C000000, // Extended code set 1
EXT2 = 0x7C000000, // Extended code set 2 EXT2 = 0x7C000000, // Extended code set 2
EXT3 = 0xEC000000, // Extended code set 3 EXT3 = 0xEC000000, // Extended code set 3
EXT4 = 0xFC000000, // Extended code set 4 EXT4 = 0xFC000000, // Extended code set 4
......
...@@ -74,6 +74,7 @@ class Decoder { ...@@ -74,6 +74,7 @@ class Decoder {
void Unknown(Instruction* instr); void Unknown(Instruction* instr);
void UnknownFormat(Instruction* instr, const char* opcname); void UnknownFormat(Instruction* instr, const char* opcname);
void DecodeExt0(Instruction* instr);
void DecodeExt1(Instruction* instr); void DecodeExt1(Instruction* instr);
void DecodeExt2(Instruction* instr); void DecodeExt2(Instruction* instr);
void DecodeExt3(Instruction* instr); void DecodeExt3(Instruction* instr);
...@@ -219,6 +220,11 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { ...@@ -219,6 +220,11 @@ int Decoder::FormatOption(Instruction* instr, const char* format) {
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "%d", value); out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "%d", value);
return 6; return 6;
} }
case 'U': { // UIM
int32_t value = instr->Bits(20, 16);
out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "%d", value);
return 3;
}
case 'l': { case 'l': {
// Link (LK) Bit 0 // Link (LK) Bit 0
if (instr->Bit(0) == 1) { if (instr->Bit(0) == 1) {
...@@ -351,6 +357,23 @@ void Decoder::UnknownFormat(Instruction* instr, const char* name) { ...@@ -351,6 +357,23 @@ void Decoder::UnknownFormat(Instruction* instr, const char* name) {
Format(instr, buffer); Format(instr, buffer);
} }
void Decoder::DecodeExt0(Instruction* instr) {
switch (EXT0 | (instr->BitField(10, 0))) {
case VSPLTB: {
Format(instr, "vspltb 'Dt, 'Db, 'UIM");
break;
}
case VSPLTW: {
Format(instr, "vspltw 'Dt, 'Db, 'UIM");
break;
}
case VSPLTH: {
Format(instr, "vsplth 'Dt, 'Db, 'UIM");
break;
}
}
}
void Decoder::DecodeExt1(Instruction* instr) { void Decoder::DecodeExt1(Instruction* instr) {
switch (EXT1 | (instr->BitField(10, 1))) { switch (EXT1 | (instr->BitField(10, 1))) {
case MCRF: { case MCRF: {
...@@ -1276,6 +1299,10 @@ int Decoder::InstructionDecode(byte* instr_ptr) { ...@@ -1276,6 +1299,10 @@ int Decoder::InstructionDecode(byte* instr_ptr) {
Format(instr, "b'l'a 'target26"); Format(instr, "b'l'a 'target26");
break; break;
} }
case EXT0: {
DecodeExt0(instr);
break;
}
case EXT1: { case EXT1: {
DecodeExt1(instr); DecodeExt1(instr);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment