mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-08 23:55:03 +00:00
times. This patch causes llc and llvm-mc (which both default to verbose-asm) to print out comments after a few common shuffle instructions which indicates the shuffle mask, e.g.: insertps $113, %xmm3, %xmm0 ## xmm0 = zero,xmm0[1,2],xmm3[1] unpcklps %xmm1, %xmm0 ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] pshufd $1, %xmm1, %xmm1 ## xmm1 = xmm1[1,0,0,0] This is carefully factored to keep the information extraction (of the shuffle mask) separate from the printing logic. I plan to move the extraction part out somewhere else at some point for other parts of the x86 backend that want to introspect on the behavior of shuffles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112387 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
800 B
C++
26 lines
800 B
C++
//===-- X86InstComments.h - Generate verbose-asm comments for instrs ------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This defines functionality used to emit comments about X86 instructions to
|
|
// an output stream for -fverbose-asm.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef X86_INST_COMMENTS_H
|
|
#define X86_INST_COMMENTS_H
|
|
|
|
namespace llvm {
|
|
class MCInst;
|
|
class raw_ostream;
|
|
void EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
|
|
const char *(*getRegName)(unsigned));
|
|
}
|
|
|
|
#endif
|