summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp2
-rw-r--r--llvm/lib/Target/AMDGPU/SOPInstructions.td2
-rw-r--r--llvm/test/MC/AMDGPU/s_endpgm.s7
3 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
index a12e634c846..01df0040ad5 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
@@ -1439,7 +1439,7 @@ void AMDGPUInstPrinter::printEndpgm(const MCInst *MI, unsigned OpNo,
return;
}
- O << formatDec(Imm);
+ O << ' ' << formatDec(Imm);
}
#include "AMDGPUGenAsmWriter.inc"
diff --git a/llvm/lib/Target/AMDGPU/SOPInstructions.td b/llvm/lib/Target/AMDGPU/SOPInstructions.td
index f00f9888063..4caa8a99706 100644
--- a/llvm/lib/Target/AMDGPU/SOPInstructions.td
+++ b/llvm/lib/Target/AMDGPU/SOPInstructions.td
@@ -937,7 +937,7 @@ def S_NOP : SOPP <0x00000000, (ins i16imm:$simm16), "s_nop $simm16">;
let isTerminator = 1 in {
-def S_ENDPGM : SOPP <0x00000001, (ins EndpgmImm:$simm16), "s_endpgm $simm16"> {
+def S_ENDPGM : SOPP <0x00000001, (ins EndpgmImm:$simm16), "s_endpgm$simm16"> {
let isBarrier = 1;
let isReturn = 1;
}
diff --git a/llvm/test/MC/AMDGPU/s_endpgm.s b/llvm/test/MC/AMDGPU/s_endpgm.s
index 8674a32f7a9..49b3323e7e3 100644
--- a/llvm/test/MC/AMDGPU/s_endpgm.s
+++ b/llvm/test/MC/AMDGPU/s_endpgm.s
@@ -1,17 +1,18 @@
+// RUN: llvm-mc -arch=amdgcn %s | FileCheck -strict-whitespace %s -check-prefix=WHITESPACE
// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s --check-prefix=GCN
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -filetype=obj %s | llvm-objcopy -S -K keep_symbol - | llvm-objdump -disassemble -mcpu=gfx900 - | FileCheck %s --check-prefix=BIN
+// WHITESPACE: s_endpgm{{$}}
// GCN: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
// BIN: s_endpgm // 000000000000: BF810000
s_endpgm
+// WHITESPACE: s_endpgm{{$}}
// GCN: s_endpgm ; encoding: [0x00,0x00,0x81,0xbf]
// BIN: s_endpgm // 000000000004: BF810000
s_endpgm 0
-
+// WHITESPACE: s_endpgm 1{{$}}
// GCN: s_endpgm 1 ; encoding: [0x01,0x00,0x81,0xbf]
// BIN: s_endpgm 1 // 000000000008: BF810001
s_endpgm 1
-
-
OpenPOWER on IntegriCloud